소스 검색

llama : remove "first token must be BOS" restriction (#2153)

oobabooga 2 년 전
부모
커밋
1d16309969
1개의 변경된 파일0개의 추가작업 그리고 6개의 파일을 삭제
  1. 0 6
      llama.cpp

+ 0 - 6
llama.cpp

@@ -1291,12 +1291,6 @@ static bool llama_eval_internal(
 
     LLAMA_ASSERT((!tokens && embd) || (tokens && !embd));
 
-    // enforce that the first token is BOS
-    if (tokens && n_past == 0 && tokens[0] != llama_token_bos()) {
-        fprintf(stderr, "%s: first token must be BOS\n", __func__);
-        return false;
-    }
-
     const int64_t t_start_us = ggml_time_us();
 
     const int N = n_tokens;