Skip to content

Commit

Permalink
llama : backward comp for "phi2"
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Dec 27, 2023
1 parent b0583f7 commit 79dc929
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static std::map<llm_arch, std::string> LLM_ARCH_NAMES = {
{ LLM_ARCH_BLOOM, "bloom" },
{ LLM_ARCH_STABLELM, "stablelm" },
{ LLM_ARCH_QWEN, "qwen" },
{ LLM_ARCH_PHI, "phi" },
{ LLM_ARCH_PHI, "phi" },
{ LLM_ARCH_PLAMO, "plamo" },
};

Expand Down Expand Up @@ -2119,6 +2119,12 @@ struct llama_model_loader {
}

get_key(llm_kv(LLM_KV_GENERAL_ARCHITECTURE), arch_name, false);

// TODO: remove after Mar 2024
if (arch_name == "phi2") {
arch_name = "phi";
}

llm_kv = LLM_KV(llm_arch_from_string(arch_name));

n_kv = gguf_get_n_kv(ctx_gguf);
Expand Down

0 comments on commit 79dc929

Please sign in to comment.