From 7217e3391d976b42ec169a1041c643cace657950 Mon Sep 17 00:00:00 2001 From: stc2001 <46279716+stc2001@users.noreply.github.com> Date: Tue, 4 Jul 2023 19:04:57 +0800 Subject: [PATCH] Update model_config.py (#768) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加ChatGLM2-6b-int4和ChatGLM2-6b-int8 --- configs/model_config.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/configs/model_config.py b/configs/model_config.py index f1fd894..b18d03d 100644 --- a/configs/model_config.py +++ b/configs/model_config.py @@ -64,7 +64,18 @@ llm_model_dict = { "local_model_path": None, "provides": "ChatGLM" }, - + "chatglm2-6b-int4": { + "name": "chatglm2-6b-int4", + "pretrained_model_name": "THUDM/chatglm2-6b-int4", + "local_model_path": None, + "provides": "ChatGLM" + }, + "chatglm2-6b-int8": { + "name": "chatglm2-6b-int8", + "pretrained_model_name": "THUDM/chatglm2-6b-int8", + "local_model_path": None, + "provides": "ChatGLM" + }, "chatyuan": { "name": "chatyuan", "pretrained_model_name": "ClueAI/ChatYuan-large-v2", @@ -141,7 +152,7 @@ PROMPT_TEMPLATE = """已知信息: 根据上述已知信息,简洁和专业的来回答用户的问题。如果无法从中得到答案,请说 “根据已知信息无法回答该问题” 或 “没有提供足够的相关信息”,不允许在答案中添加编造成分,答案请使用中文。 问题是:{question}""" -# 缓存知识库数量 +# 缓存知识库数量,如果是ChatGLM2,ChatGLM2-int4,ChatGLM2-int8模型若检索效果不好可以调成’10’ CACHED_VS_NUM = 1 # 文本分句长度