Skip to content

Commit

Permalink
llama : make general.name optional (ggerganov#6709)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov authored Apr 16, 2024
1 parent 666867b commit 532c173
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4136,9 +4136,11 @@ static void llm_load_vocab(
// CodeGemma (LLM_ARCH_GEMMA). This can potentially be removed once
// new versions of these models have been published.
std::string gen_name;
ml.get_key(LLM_KV_GENERAL_NAME, gen_name);
ml.get_key(LLM_KV_GENERAL_NAME, gen_name, false);

std::transform(gen_name.begin(), gen_name.end(), gen_name.begin(),
[](unsigned char c){ return std::tolower(c); });

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

0 comments on commit 532c173

Please sign in to comment.