From fb32f50834da8c22919624726b9edb3ca7056897 Mon Sep 17 00:00:00 2001 From: teleprint-me <77757836+teleprint-me@users.noreply.github.com> Date: Tue, 21 May 2024 01:07:13 -0400 Subject: [PATCH] feat: Add hf model mapping descriptors for each repo --- gguf-py/gguf/constants.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gguf-py/gguf/constants.py b/gguf-py/gguf/constants.py index b9534ef24..51bc463b0 100644 --- a/gguf-py/gguf/constants.py +++ b/gguf-py/gguf/constants.py @@ -973,16 +973,22 @@ HF_MODEL_MAP = ( { "model_repo": "meta-llama/Llama-2-7b-hf", "model_arch": MODEL_ARCH.LLAMA, + "model_parts": 2, + "model_type": LLaMaModelType.SFT, "vocab_type": LLaMaVocabType.SPM, "vocab_pre": [], + "vocab_files": [], }, { - "model_arch": MODEL_ARCH.LLAMA, - "vocab_type": LLaMaVocabType.BPE, "repo": "meta-llama/Meta-Llama-3-8B", + "model_arch": MODEL_ARCH.LLAMA, + "model_parts": 4, + "model_type": LLaMaModelType.SFT, + "vocab_type": LLaMaVocabType.BPE, "vocab_pre": [ "(?:'[sS]|'[tT]|'[rR][eE]|'[vV][eE]|'[mM]|'[lL][lL]|'[dD])|[^\\r\\n\\p{L}\\p{N}]?\\p{L}+|\\p{N}{1,3}| ?[^\\s\\p{L}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+" ], + "vocab_files": [], }, {"model_arch": MODEL_ARCH.PHI3, "vocab_type": LLaMaVocabType.SPM, "repo": "microsoft/Phi-3-mini-4k-instruct", }, {"model_arch": MODEL_ARCH.LLAMA, "vocab_type": LLaMaVocabType.BPE, "repo": "deepseek-ai/deepseek-llm-7b-base", },