update model_config.py

This commit is contained in:
imClumsyPanda 2023-05-19 23:12:39 +08:00
parent 00d80335fe
commit 7d837078e7
2 changed files with 16 additions and 16 deletions

View File

@ -30,44 +30,44 @@ llm_model_dict 处理了loader的一些预设行为如加载位置模型
llm_model_dict = { llm_model_dict = {
"chatglm-6b-int4-qe": { "chatglm-6b-int4-qe": {
"name": "chatglm-6b-int4-qe", "name": "chatglm-6b-int4-qe",
"remote-checkpoint": "THUDM/chatglm-6b-int4-qe", "pretrained_model_name": "THUDM/chatglm-6b-int4-qe",
"path": None, "local_model_path": None,
"provides": "ChatGLM" "provides": "ChatGLM"
}, },
"chatglm-6b-int4": { "chatglm-6b-int4": {
"name": "chatglm-6b-int4", "name": "chatglm-6b-int4",
"remote-checkpoint": "THUDM/chatglm-6b-int4", "pretrained_model_name": "THUDM/chatglm-6b-int4",
"path": None, "local_model_path": None,
"provides": "ChatGLM" "provides": "ChatGLM"
}, },
"chatglm-6b": { "chatglm-6b": {
"name": "chatglm-6b", "name": "chatglm-6b",
"remote-checkpoint": "THUDM/chatglm-6b-int4", "pretrained_model_name": "THUDM/chatglm-6b-int4",
"path": None, "local_model_path": None,
"provides": "ChatGLM" "provides": "ChatGLM"
}, },
"llama-7b-hf": { "llama-7b-hf": {
"name": "llama-7b-hf", "name": "llama-7b-hf",
"remote-checkpoint": "llama-7b-hf", "pretrained_model_name": "llama-7b-hf",
"path": None, "local_model_path": None,
"provides": "LLamaLLM" "provides": "LLamaLLM"
}, },
"vicuna-13b-hf": { "vicuna-13b-hf": {
"name": "vicuna-13b-hf", "name": "vicuna-13b-hf",
"remote-checkpoint": "vicuna-13b-hf", "pretrained_model_name": "vicuna-13b-hf",
"path": None, "local_model_path": None,
"provides": "LLamaLLM" "provides": "LLamaLLM"
}, },
"chatyuan": { "chatyuan": {
"name": "chatyuan", "name": "chatyuan",
"remote-checkpoint": "ClueAI/ChatYuan-large-v2", "pretrained_model_name": "ClueAI/ChatYuan-large-v2",
"path": None, "local_model_path": None,
"provides": None "provides": None
}, },
"chatglm-6b-int8":{ "chatglm-6b-int8":{
"name": "chatglm-6b-int8", "name": "chatglm-6b-int8",
"remote-checkpoint": "THUDM/chatglm-6b-int8", "pretrained_model_name": "THUDM/chatglm-6b-int8",
"path": None, "local_model_path": None,
"provides": "ChatGLM" "provides": "ChatGLM"
}, },
} }

View File

@ -32,9 +32,9 @@ def loaderLLM(llm_model: str = None, no_remote_model: bool = False, use_ptuning_
if loaderCheckPoint.no_remote_model: if loaderCheckPoint.no_remote_model:
loaderCheckPoint.model_name = llm_model_info['name'] loaderCheckPoint.model_name = llm_model_info['name']
else: else:
loaderCheckPoint.model_name = llm_model_info['remote-checkpoint'] loaderCheckPoint.model_name = llm_model_info['pretrained_model_name']
loaderCheckPoint.model_path = llm_model_info['path'] loaderCheckPoint.model_path = llm_model_info["local_model_path"]
loaderCheckPoint.reload_model() loaderCheckPoint.reload_model()