const bool add_bos = llama_vocab_type(model) == LLAMA_VOCAB_TYPE_SPM; const bool add_bos = llama_should_add_bos_token(model); LOG("add_bos: %d\n", add_bos); std::vector<llama_token> embd_inp;8 changes: 3 additions & 5 deletions 8 examples/perplexity/perplexity.cpp @@ -149,...
eos_token_id = tokenizer.eos_token_id if tokenizer.bos_token != args.bos_token: tokenizer.bos_token = args.bos_token model.config.bos_token_id = tokenizer.bos_token_id if model.generation_config: model.generation_config.bos_token_id = tokenizer.bos_token_id if tokenizer.pad_token != ...