Skip to content

Commit 1f2e844

Browse files
authored
feat(model): Support Qwen2.5 models (#2030)
1 parent 1328c56 commit 1f2e844

File tree

5 files changed

+47
-4
lines changed

5 files changed

+47
-4
lines changed

README.ja.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,15 @@ DB-GPTのアーキテクチャは以下の図に示されています:
154154
私たちは、LLaMA/LLaMA2、Baichuan、ChatGLM、Wenxin、Tongyi、Zhipuなど、オープンソースおよびAPIエージェントからの数十の大規模言語モデル(LLM)を含む幅広いモデルをサポートしています。
155155

156156
- ニュース
157+
- 🔥🔥🔥 [Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct)
158+
- 🔥🔥🔥 [Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct)
159+
- 🔥🔥🔥 [Qwen2.5-14B-Instruct](https://huggingface.co/Qwen/Qwen2.5-14B-Instruct)
160+
- 🔥🔥🔥 [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)
161+
- 🔥🔥🔥 [Qwen2.5-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct)
162+
- 🔥🔥🔥 [Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct)
163+
- 🔥🔥🔥 [Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct)
164+
- 🔥🔥🔥 [Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct)
165+
- 🔥🔥🔥 [Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct)
157166
- 🔥🔥🔥 [Meta-Llama-3.1-405B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-405B-Instruct)
158167
- 🔥🔥🔥 [Meta-Llama-3.1-70B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-70B-Instruct)
159168
- 🔥🔥🔥 [Meta-Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct)

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,15 @@ At present, we have introduced several key features to showcase our current capa
168168
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.
169169

170170
- News
171+
- 🔥🔥🔥 [Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct)
172+
- 🔥🔥🔥 [Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct)
173+
- 🔥🔥🔥 [Qwen2.5-14B-Instruct](https://huggingface.co/Qwen/Qwen2.5-14B-Instruct)
174+
- 🔥🔥🔥 [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)
175+
- 🔥🔥🔥 [Qwen2.5-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct)
176+
- 🔥🔥🔥 [Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct)
177+
- 🔥🔥🔥 [Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct)
178+
- 🔥🔥🔥 [Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct)
179+
- 🔥🔥🔥 [Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct)
171180
- 🔥🔥🔥 [Meta-Llama-3.1-405B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-405B-Instruct)
172181
- 🔥🔥🔥 [Meta-Llama-3.1-70B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-70B-Instruct)
173182
- 🔥🔥🔥 [Meta-Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct)

README.zh.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,15 @@
163163
海量模型支持,包括开源、API代理等几十种大语言模型。如LLaMA/LLaMA2、Baichuan、ChatGLM、文心、通义、智谱等。当前已支持如下模型:
164164

165165
- 新增支持模型
166+
- 🔥🔥🔥 [Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct)
167+
- 🔥🔥🔥 [Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct)
168+
- 🔥🔥🔥 [Qwen2.5-14B-Instruct](https://huggingface.co/Qwen/Qwen2.5-14B-Instruct)
169+
- 🔥🔥🔥 [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)
170+
- 🔥🔥🔥 [Qwen2.5-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct)
171+
- 🔥🔥🔥 [Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct)
172+
- 🔥🔥🔥 [Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct)
173+
- 🔥🔥🔥 [Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct)
174+
- 🔥🔥🔥 [Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct)
166175
- 🔥🔥🔥 [Meta-Llama-3.1-405B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-405B-Instruct)
167176
- 🔥🔥🔥 [Meta-Llama-3.1-70B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-70B-Instruct)
168177
- 🔥🔥🔥 [Meta-Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct)

dbgpt/configs/model_config.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,17 @@ def get_device() -> str:
173173
"qwen2-0.5b-instruct-gptq-int4": os.path.join(
174174
MODEL_PATH, "Qwen2-0.5B-Instruct-GPTQ-Int4"
175175
),
176+
"qwen2.5-0.5b-instruct": os.path.join(MODEL_PATH, "Qwen2.5-0.5B-Instruct"),
177+
"qwen2.5-1.5b-instruct": os.path.join(MODEL_PATH, "Qwen2.5-1.5B-Instruct"),
178+
"qwen2.5-3b-instruct": os.path.join(MODEL_PATH, "Qwen2.5-3B-Instruct"),
179+
"qwen2.5-7b-instruct": os.path.join(MODEL_PATH, "Qwen2.5-7B-Instruct"),
180+
"qwen2.5-14b-instruct": os.path.join(MODEL_PATH, "Qwen2.5-14B-Instruct"),
181+
"qwen2.5-32b-instruct": os.path.join(MODEL_PATH, "Qwen2.5-32B-Instruct"),
182+
"qwen2.5-72b-instruct": os.path.join(MODEL_PATH, "Qwen2.5-72B-Instruct"),
183+
"qwen2.5-coder-1.5b-instruct": os.path.join(
184+
MODEL_PATH, "Qwen2.5-Coder-1.5B-Instruct"
185+
),
186+
"qwen2.5-coder-7b-instruct": os.path.join(MODEL_PATH, "Qwen2.5-Coder-7B-Instruct"),
176187
# (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
177188
"wizardlm-13b": os.path.join(MODEL_PATH, "WizardLM-13B-V1.2"),
178189
# 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

dbgpt/model/adapter/hf_adapter.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,15 @@ class Qwen2Adapter(QwenAdapter):
370370
support_8bit: bool = True
371371

372372
def do_match(self, lower_model_name_or_path: Optional[str] = None):
373-
return (
374-
lower_model_name_or_path
375-
and "qwen2" in lower_model_name_or_path
376-
and "instruct" in lower_model_name_or_path
373+
return lower_model_name_or_path and (
374+
(
375+
"qwen2" in lower_model_name_or_path
376+
and "instruct" in lower_model_name_or_path
377+
)
378+
or (
379+
"qwen2.5" in lower_model_name_or_path
380+
and "instruct" in lower_model_name_or_path
381+
)
377382
)
378383

379384

0 commit comments

Comments
 (0)