Skip to content

Commit

Permalink
一些细节更新 (#2235)
Browse files Browse the repository at this point in the history
* 更新Langchain依赖到0.0.342以上版本

* 更改了一些提示词和依赖,修改了openai异常的问题

* 注释data的打印日志

* 增加Qwen新模型的支持
  • Loading branch information
zRzRzRzRzRzRzR committed Nov 30, 2023
1 parent 40918c2 commit 8b70b1d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 12 deletions.
45 changes: 35 additions & 10 deletions configs/model_config.py.example
Expand Up @@ -112,7 +112,7 @@ ONLINE_LLM_MODEL = {
"api_key": "",
"provider": "AzureWorker",
},

# 昆仑万维天工 API https://model-platform.tiangong.cn/
"tiangong-api": {
"version":"SkyChat-MegaVerse",
Expand Down Expand Up @@ -163,6 +163,25 @@ MODEL_PATH = {

"chatglm3-6b": "THUDM/chatglm3-6b",
"chatglm3-6b-32k": "THUDM/chatglm3-6b-32k",
"chatglm3-6b-base": "THUDM/chatglm3-6b-base",

"Qwen-1_8B": "Qwen/Qwen-1_8B",
"Qwen-1_8B-Chat":"Qwen/Qwen-1_8B-Chat",
"Qwen-1_8B-Chat-Int8":"Qwen/Qwen-1_8B-Chat-Int8",
"Qwen-1_8B-Chat-Int4":"Qwen/Qwen-1_8B-Chat-Int4",

"Qwen-7B": "Qwen/Qwen-7B",
"Qwen-7B-Chat": "Qwen/Qwen-7B-Chat",

"Qwen-14B": "Qwen/Qwen-14B",
"Qwen-14B-Chat": "Qwen/Qwen-14B-Chat",
"Qwen-14B-Chat-Int8": "Qwen/Qwen-14B-Chat-Int8",
"Qwen-14B-Chat-Int4": "Qwen/Qwen-14B-Chat-Int4",

"Qwen-72B": "Qwen/Qwen-72B",
"Qwen-72B-Chat": "Qwen/Qwen-72B-Chat",
"Qwen-72B-Chat-Int8":"Qwen/Qwen-72B-Chat-Int8"
"Qwen-72B-Chat-Int4":"Qwen/Qwen-72B-Chat-Int4"

"baichuan2-13b": "baichuan-inc/Baichuan2-13B-Chat",
"baichuan2-7b": "baichuan-inc/Baichuan2-7B-Chat",
Expand Down Expand Up @@ -204,18 +223,11 @@ MODEL_PATH = {
"opt-66b": "facebook/opt-66b",
"opt-iml-max-30b": "facebook/opt-iml-max-30b",

"Qwen-7B": "Qwen/Qwen-7B",
"Qwen-14B": "Qwen/Qwen-14B",
"Qwen-7B-Chat": "Qwen/Qwen-7B-Chat",
"Qwen-14B-Chat": "Qwen/Qwen-14B-Chat",
"Qwen-14B-Chat-Int8": "Qwen/Qwen-14B-Chat-Int8", # 确保已经安装了auto-gptq optimum flash-attn
"Qwen-14B-Chat-Int4": "Qwen/Qwen-14B-Chat-Int4", # 确保已经安装了auto-gptq optimum flash-attn

"agentlm-7b": "THUDM/agentlm-7b",
"agentlm-13b": "THUDM/agentlm-13b",
"agentlm-70b": "THUDM/agentlm-70b",

"Yi-34B-Chat": "https://huggingface.co/01-ai/Yi-34B-Chat", # 更多01-ai模型尚未进行测试。如果需要使用,请自行测试。
"Yi-34B-Chat": "https://huggingface.co/01-ai/Yi-34B-Chat",
},
}

Expand Down Expand Up @@ -273,10 +285,23 @@ VLLM_MODEL_DICT = {
"opt-66b": "facebook/opt-66b",
"opt-iml-max-30b": "facebook/opt-iml-max-30b",

"Qwen-1_8B": "Qwen/Qwen-1_8B",
"Qwen-1_8B-Chat":"Qwen/Qwen-1_8B-Chat",
"Qwen-1_8B-Chat-Int8":"Qwen/Qwen-1_8B-Chat-Int8",
"Qwen-1_8B-Chat-Int4":"Qwen/Qwen-1_8B-Chat-Int4",

"Qwen-7B": "Qwen/Qwen-7B",
"Qwen-14B": "Qwen/Qwen-14B",
"Qwen-7B-Chat": "Qwen/Qwen-7B-Chat",

"Qwen-14B": "Qwen/Qwen-14B",
"Qwen-14B-Chat": "Qwen/Qwen-14B-Chat",
"Qwen-14B-Chat-Int8": "Qwen/Qwen-14B-Chat-Int8",
"Qwen-14B-Chat-Int4": "Qwen/Qwen-14B-Chat-Int4",

"Qwen-72B": "Qwen/Qwen-72B",
"Qwen-72B-Chat": "Qwen/Qwen-72B-Chat",
"Qwen-72B-Chat-Int8":"Qwen/Qwen-72B-Chat-Int8"
"Qwen-72B-Chat-Int4":"Qwen/Qwen-72B-Chat-Int4"

"agentlm-7b": "THUDM/agentlm-7b",
"agentlm-13b": "THUDM/agentlm-13b",
Expand Down
4 changes: 2 additions & 2 deletions webui_pages/utils.py
Expand Up @@ -313,8 +313,8 @@ def chat_chat(
"prompt_name": prompt_name,
}

print(f"received input message:")
pprint(data)
# print(f"received input message:")
# pprint(data)

response = self.post("/chat/chat", json=data, stream=True, **kwargs)
return self._httpx_stream2generator(response, as_json=True)
Expand Down

0 comments on commit 8b70b1d

Please sign in to comment.