From 45dedd4f2823d2767733290b1c8bd0a996bd908f Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Wed, 27 Dec 2023 18:10:27 +0200 Subject: [PATCH] llama : backward comp for "phi2" --- llama.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index 99e0dd98807da4..c36c8592254e38 100644 --- a/llama.cpp +++ b/llama.cpp @@ -216,7 +216,7 @@ static std::map 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" }, }; @@ -2119,6 +2119,13 @@ struct llama_model_loader { } get_key(llm_kv(LLM_KV_GENERAL_ARCHITECTURE), arch_name, false); + + // backwards compatibility with pre-#4552 + // 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);