Skip to content

Commit

Permalink
More checks before assuming FIM tokens for Llama arch
Browse files Browse the repository at this point in the history
  • Loading branch information
CISC authored May 30, 2024
1 parent db10f01 commit 998d208
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4330,7 +4330,7 @@ static void llm_load_vocab(
[](unsigned char c){ return std::tolower(c); });

if (gen_name.find("code") != std::string::npos) {
if (model.arch == LLM_ARCH_LLAMA) {
if (model.arch == LLM_ARCH_LLAMA && gen_name.find("llama") != std::string::npos) {
vocab.special_prefix_id = 32007;
vocab.special_suffix_id = 32008;
vocab.special_middle_id = 32009;
Expand Down

0 comments on commit 998d208

Please sign in to comment.