mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-22 10:08:34 +00:00
feat(model): Support Qwen2 models (#1612)
This commit is contained in:
parent
20e7ccc831
commit
e11087aa7e
@ -154,6 +154,11 @@ DB-GPTのアーキテクチャは以下の図に示されています:
|
||||
私たちは、LLaMA/LLaMA2、Baichuan、ChatGLM、Wenxin、Tongyi、Zhipuなど、オープンソースおよびAPIエージェントからの数十の大規模言語モデル(LLM)を含む幅広いモデルをサポートしています。
|
||||
|
||||
- ニュース
|
||||
- 🔥🔥🔥 [Qwen2-57B-A14B-Instruct](https://huggingface.co/Qwen/Qwen2-57B-A14B-Instruct)
|
||||
- 🔥🔥🔥 [Qwen2-72B-Instruct](https://huggingface.co/Qwen/Qwen2-72B-Instruct)
|
||||
- 🔥🔥🔥 [Qwen2-7B-Instruct](https://huggingface.co/Qwen/Qwen2-7B-Instruct)
|
||||
- 🔥🔥🔥 [Qwen2-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2-1.5B-Instruct)
|
||||
- 🔥🔥🔥 [Qwen2-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct)
|
||||
- 🔥🔥🔥 [glm-4-9b-chat](https://huggingface.co/THUDM/glm-4-9b-chat)
|
||||
- 🔥🔥🔥 [Phi-3](https://huggingface.co/collections/microsoft/phi-3-6626e15e9585a200d2d761e3)
|
||||
- 🔥🔥🔥 [Yi-1.5-34B-Chat](https://huggingface.co/01-ai/Yi-1.5-34B-Chat)
|
||||
|
@ -158,6 +158,11 @@ At present, we have introduced several key features to showcase our current capa
|
||||
We offer extensive model support, including dozens of large language models (LLMs) from both open-source and API agents, such as LLaMA/LLaMA2, Baichuan, ChatGLM, Wenxin, Tongyi, Zhipu, and many more.
|
||||
|
||||
- News
|
||||
- 🔥🔥🔥 [Qwen2-57B-A14B-Instruct](https://huggingface.co/Qwen/Qwen2-57B-A14B-Instruct)
|
||||
- 🔥🔥🔥 [Qwen2-72B-Instruct](https://huggingface.co/Qwen/Qwen2-72B-Instruct)
|
||||
- 🔥🔥🔥 [Qwen2-7B-Instruct](https://huggingface.co/Qwen/Qwen2-7B-Instruct)
|
||||
- 🔥🔥🔥 [Qwen2-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2-1.5B-Instruct)
|
||||
- 🔥🔥🔥 [Qwen2-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct)
|
||||
- 🔥🔥🔥 [glm-4-9b-chat](https://huggingface.co/THUDM/glm-4-9b-chat)
|
||||
- 🔥🔥🔥 [Phi-3](https://huggingface.co/collections/microsoft/phi-3-6626e15e9585a200d2d761e3)
|
||||
- 🔥🔥🔥 [Yi-1.5-34B-Chat](https://huggingface.co/01-ai/Yi-1.5-34B-Chat)
|
||||
|
@ -152,6 +152,11 @@
|
||||
海量模型支持,包括开源、API代理等几十种大语言模型。如LLaMA/LLaMA2、Baichuan、ChatGLM、文心、通义、智谱等。当前已支持如下模型:
|
||||
|
||||
- 新增支持模型
|
||||
- 🔥🔥🔥 [Qwen2-57B-A14B-Instruct](https://huggingface.co/Qwen/Qwen2-57B-A14B-Instruct)
|
||||
- 🔥🔥🔥 [Qwen2-72B-Instruct](https://huggingface.co/Qwen/Qwen2-72B-Instruct)
|
||||
- 🔥🔥🔥 [Qwen2-7B-Instruct](https://huggingface.co/Qwen/Qwen2-7B-Instruct)
|
||||
- 🔥🔥🔥 [Qwen2-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2-1.5B-Instruct)
|
||||
- 🔥🔥🔥 [Qwen2-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct)
|
||||
- 🔥🔥🔥 [glm-4-9b-chat](https://huggingface.co/THUDM/glm-4-9b-chat)
|
||||
- 🔥🔥🔥 [Phi-3](https://huggingface.co/collections/microsoft/phi-3-6626e15e9585a200d2d761e3)
|
||||
- 🔥🔥🔥 [Yi-1.5-34B-Chat](https://huggingface.co/01-ai/Yi-1.5-34B-Chat)
|
||||
|
@ -54,6 +54,7 @@ LLM_MODEL_CONFIG = {
|
||||
"chatglm3-6b": os.path.join(MODEL_PATH, "chatglm3-6b"),
|
||||
# https://huggingface.co/THUDM/glm-4-9b-chat
|
||||
"glm-4-9b-chat": os.path.join(MODEL_PATH, "glm-4-9b-chat"),
|
||||
"glm-4-9b-chat-1m": os.path.join(MODEL_PATH, "glm-4-9b-chat-1m"),
|
||||
"guanaco-33b-merged": os.path.join(MODEL_PATH, "guanaco-33b-merged"),
|
||||
"falcon-40b": os.path.join(MODEL_PATH, "falcon-40b"),
|
||||
"gorilla-7b": os.path.join(MODEL_PATH, "gorilla-7b"),
|
||||
@ -124,6 +125,42 @@ LLM_MODEL_CONFIG = {
|
||||
"codeqwen1.5-7b-chat": os.path.join(MODEL_PATH, "CodeQwen1.5-7B-Chat"),
|
||||
# https://huggingface.co/Qwen/Qwen1.5-MoE-A2.7B-Chat
|
||||
"qwen1.5-moe-a2.7b-chat": os.path.join(MODEL_PATH, "Qwen1.5-MoE-A2.7B-Chat"),
|
||||
"qwen2-57b-a14b-instruct": os.path.join(MODEL_PATH, "Qwen2-57B-A14B-Instruct"),
|
||||
"qwen2-57b-a14b-instruct-gptq-int4": os.path.join(
|
||||
MODEL_PATH, "Qwen2-57B-A14B-Instruct-GPTQ-Int4"
|
||||
),
|
||||
"qwen2-72b-instruct": os.path.join(MODEL_PATH, "Qwen2-72B-Instruct"),
|
||||
"qwen2-72b-instruct-awq": os.path.join(MODEL_PATH, "Qwen2-72B-Instruct-AWQ"),
|
||||
"qwen2-72b-instruct-gptq-int8": os.path.join(
|
||||
MODEL_PATH, "Qwen2-72B-Instruct-GPTQ-Int8"
|
||||
),
|
||||
"qwen2-72b-instruct-gptq-int4": os.path.join(
|
||||
MODEL_PATH, "Qwen2-72B-Instruct-GPTQ-Int4"
|
||||
),
|
||||
"qwen2-7b-instruct": os.path.join(MODEL_PATH, "Qwen2-7B-Instruct"),
|
||||
"qwen2-7b-instruct-awq": os.path.join(MODEL_PATH, "Qwen2-7B-Instruct-AWQ"),
|
||||
"qwen2-7b-instruct-gptq-int8": os.path.join(
|
||||
MODEL_PATH, "Qwen2-7B-Instruct-GPTQ-Int8"
|
||||
),
|
||||
"qwen2-7b-instruct-gptq-int4": os.path.join(
|
||||
MODEL_PATH, "Qwen2-7B-Instruct-GPTQ-Int4"
|
||||
),
|
||||
"qwen2-1.5b-instruct": os.path.join(MODEL_PATH, "Qwen2-1.5B-Instruct"),
|
||||
"qwen2-1.5b-instruct-awq": os.path.join(MODEL_PATH, "Qwen2-1.5B-Instruct-AWQ"),
|
||||
"qwen2-1.5b-instruct-gptq-int8": os.path.join(
|
||||
MODEL_PATH, "Qwen2-1.5B-Instruct-GPTQ-Int8"
|
||||
),
|
||||
"qwen2-1.5b-instruct-gptq-int4": os.path.join(
|
||||
MODEL_PATH, "Qwen2-1.5B-Instruct-GPTQ-Int4"
|
||||
),
|
||||
"qwen2-0.5b-instruct": os.path.join(MODEL_PATH, "Qwen2-0.5B-Instruct"),
|
||||
"qwen2-0.5b-instruct-awq": os.path.join(MODEL_PATH, "Qwen2-0.5B-Instruct-AWQ"),
|
||||
"qwen2-0.5b-instruct-gptq-int8": os.path.join(
|
||||
MODEL_PATH, "Qwen2-0.5B-Instruct-GPTQ-Int8"
|
||||
),
|
||||
"qwen2-0.5b-instruct-gptq-int4": os.path.join(
|
||||
MODEL_PATH, "Qwen2-0.5B-Instruct-GPTQ-Int4"
|
||||
),
|
||||
# (Llama2 based) We only support WizardLM-13B-V1.2 for now, which is trained from Llama-2 13b, see https://huggingface.co/WizardLM/WizardLM-13B-V1.2
|
||||
"wizardlm-13b": os.path.join(MODEL_PATH, "WizardLM-13B-V1.2"),
|
||||
# wget https://huggingface.co/TheBloke/vicuna-13B-v1.5-GGUF/resolve/main/vicuna-13b-v1.5.Q4_K_M.gguf -O models/ggml-model-q4_0.gguf
|
||||
|
@ -310,6 +310,20 @@ class QwenAdapter(NewHFChatModelAdapter):
|
||||
and "qwen" in lower_model_name_or_path
|
||||
and "1.5" in lower_model_name_or_path
|
||||
and "moe" not in lower_model_name_or_path
|
||||
and "qwen2" not in lower_model_name_or_path
|
||||
)
|
||||
|
||||
|
||||
class Qwen2Adapter(QwenAdapter):
|
||||
|
||||
support_4bit: bool = True
|
||||
support_8bit: bool = True
|
||||
|
||||
def do_match(self, lower_model_name_or_path: Optional[str] = None):
|
||||
return (
|
||||
lower_model_name_or_path
|
||||
and "qwen2" in lower_model_name_or_path
|
||||
and "instruct" in lower_model_name_or_path
|
||||
)
|
||||
|
||||
|
||||
@ -517,3 +531,4 @@ register_model_adapter(PhiAdapter)
|
||||
register_model_adapter(SQLCoderAdapter)
|
||||
register_model_adapter(OpenChatAdapter)
|
||||
register_model_adapter(GLM4Aapter)
|
||||
register_model_adapter(Qwen2Adapter)
|
||||
|
Loading…
Reference in New Issue
Block a user