add other codellama models

This commit is contained in:
wangzaistone 2023-10-31 17:24:54 +08:00
parent 48539d7206
commit a670e5c00d
3 changed files with 12 additions and 2 deletions

View File

@ -78,8 +78,15 @@ LLM_MODEL_CONFIG = {
"internlm-7b": os.path.join(MODEL_PATH, "internlm-chat-7b"),
"internlm-7b-8k": os.path.join(MODEL_PATH, "internlm-chat-7b-8k"),
"internlm-20b": os.path.join(MODEL_PATH, "internlm-chat-20b"),
"codellama-7b": os.path.join(MODEL_PATH, "CodeLlama-7b-Instruct-hf"),
"codellama-7b-sql-sft": os.path.join(MODEL_PATH, "codellama-7b-sql-sft"),
"codellama-13b": os.path.join(MODEL_PATH, "CodeLlama-13b-Instruct-hf"),
"codellama-13b-sql-sft": os.path.join(MODEL_PATH, "codellama-13b-sql-sft"),
# For test now
"opt-125m": os.path.join(MODEL_PATH, "opt-125m"),
}

View File

@ -323,7 +323,7 @@ class CodeLlamaAdapter(BaseLLMAdaper):
"""The model adapter for codellama """
def match(self, model_path: str):
return "codelama" in model_path.lower()
return "codellama" in model_path.lower()
def loader(self, model_path: str, from_pretrained_kwargs: dict):
model, tokenizer = super().loader(model_path, from_pretrained_kwargs)

View File

@ -45,7 +45,10 @@ _OLD_MODELS = [
"llama-cpp",
"proxyllm",
"gptj-6b",
"codellama-13b-sql-sft"
"codellama-13b-sql-sft",
"codellama-7b",
"codellama-7b-sql-sft",
"codellama-13b"
]