QLU-NLP commited on
Commit
ddd49a6
·
verified ·
1 Parent(s): 21551ec

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +509 -4
README.md CHANGED
@@ -1,4 +1,509 @@
1
- https://github.com/QLU-NLP/BianCang
2
- ---
3
- license: apache-2.0
4
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 扁仓中医大模型(BianCang: A Traditional Chinese Medicine Large Language Model)
2
+
3
+ <div align="center">
4
+ <p>
5
+ <img src="assets/BianCang-logo.png" width="500px"/>
6
+ </p>
7
+ </div>
8
+
9
+ <p align="center">
10
+ 💻 <a href="" target="_blank">在线体验(待开放)</a> |⬇️ <a href="https://huggingface.co/QLU-NLP" target="_blank">HuggingFace模型下载</a> |⬇️ <a href="https://www.modelscope.cn/profile/QLUNLP" target="_blank">ModelScope模型下载</a> | 📃 <a href="" target="_blank">Paper</a> <br>
11
+ </p>
12
+
13
+
14
+
15
+ ## 🎉新闻
16
+
17
+ - [11/18/2024] 我们在该仓库发布了扁仓系列模型,包括BianCang-Qwen2-7B、BianCang-Qwen2-7B-Instruct、BianCang-Qwen2.5-7B、BianCang-Qwen2.5-7B-Instruct。
18
+ - [11/18/2024] 我们公开了ChP-TCM数据集。
19
+ - [11/18/2024] 我们发布了扁仓论文。扁仓在中医领域取得了当前最先进的结果。
20
+ - [10/28/2024] 10月28日,“[超级计算 智创未来](https://mp.weixin.qq.com/s/vN-FbmvksRT79Ci9p3RTLg)”顶尖科学家论坛在山东济南举行。会议期间,刘大响、陈润生、张宏科、王军成、曹进德、董勤喜六位院士共同登台发布国家超算济南中心系列大模型,其中包括“扁仓中医大模型”。山东新闻联播、大众日报、济南日报、济南新闻联播等媒体进行了详细报道。
21
+
22
+ ## 📅未来规划
23
+
24
+ - [ ] 开源BianCang-Qwen2.5-14B、BianCang-Qwen2.5-14B-Instruct。
25
+
26
+ ## 💡介绍
27
+
28
+ 你好,欢迎来到扁仓中医大模型的开源仓库。
29
+
30
+ 为推动大语言模型在传统中医领域的落地应用,辅助医生进行疾病诊断,辅助患者进行自我评估,推动大模型赋能传统中医,我们在该仓库推出了**扁仓**系列中医大模型。扁仓是古代名医扁鹊、仓公的并称,泛指名医。我们期待扁仓中医大模型能够在延续中医传承和提升我国人民医疗健康水平方面做出一定的贡献。
31
+
32
+ 扁仓以Qwen2/2.5作为基座,采用先注入领域知识再进行知识激活和对齐的两阶段训练方法而得到。扁仓在中医辨病辨证等中医特色任务上取得了最先进的性能,并且在各种医学执照考试中表现优异。
33
+
34
+ 我们在该仓库中开源以下资源:
35
+
36
+ - 扁仓基座模型权重:包括BianCang-Qwen2-7B、BianCang-Qwen2.5-7B。
37
+
38
+ - 扁仓指令精调模型权重:包括BianCang-Qwen2-7B-Instruct、BianCang-Qwen2.5-7B-Instruct。
39
+
40
+
41
+ ## 🤖模型
42
+
43
+ 你可以在Huggingface上下载扁仓的模型权重:
44
+
45
+ | 模型 | 基座 | 链接 |
46
+ | ---------------------------- | ------------------- | ------------------------------------------------------------ |
47
+ | BianCang-Qwen2-7B | Qwen2-7B | [HF](https://huggingface.co/QLU-NLP/BianCang-Qwen2-7B) |
48
+ | BianCang-Qwen2-7B-Instruct | BianCang-Qwen2-7B | [HF](https://huggingface.co/QLU-NLP/BianCang-Qwen2-7B-Instruct) |
49
+ | BianCang-Qwen2.5-7B | Qwen2.5-7B | [HF](https://huggingface.co/QLU-NLP/BianCang-Qwen2.5-7B) |
50
+ | BianCang-Qwen2.5-7B-Instruct | BianCang-Qwen2.5-7B | [HF](https://huggingface.co/QLU-NLP/BianCang-Qwen2.5-7B-Instruct) |
51
+
52
+ 也可以在ModelScope上下载扁仓的模型权重,这对国内网络更友好:
53
+
54
+ | 模型 | 基座 | 链接 |
55
+ | ---------------------------- | ------------------- | ------------------------------------------------------------ |
56
+ | BianCang-Qwen2-7B | Qwen2-7B | [MS](https://www.modelscope.cn/models/QLUNLP/BianCang-Qwen2.5-7B) |
57
+ | BianCang-Qwen2-7B-Instruct | BianCang-Qwen2-7B | [MS](https://www.modelscope.cn/models/QLUNLP/BianCang-Qwen2-7B-Instruct) |
58
+ | BianCang-Qwen2.5-7B | Qwen2.5-7B | [MS](https://www.modelscope.cn/models/QLUNLP/BianCang-Qwen2.5-7B) |
59
+ | BianCang-Qwen2.5-7B-Instruct | BianCang-Qwen2.5-7B | [MS](https://www.modelscope.cn/models/QLUNLP/BianCang-Qwen2.5-7B-Instruct) |
60
+
61
+ ## 🚀推理
62
+
63
+ ### 使用SWIFT
64
+
65
+ #### 环境安装
66
+
67
+ 在[Release v2.4.2 · modelscope/ms-swift](https://github.com/modelscope/ms-swift/releases/tag/v2.4.2)处下载SWIFT源码,切换到对应目录,然后执行安装命令:
68
+
69
+ ```shell
70
+ cd swift
71
+ pip install -e .
72
+ ```
73
+
74
+ 你可以根据自己的GPU驱动版本去选择合适的torch版本进行替换,SWIFT至少需要torch >= 1.13,推荐torch >= 2.0.0。
75
+
76
+ 注意:由于我们进行SFT训练时使用的Chat Template为*qwen*,因此如果你使用的SWIFT版本大于我们提供的版本,可能会遇到Qwen2.5 Chat Template不对应的问题,请手动将Chat Template指定为*qwen*而不是*qwen2_5*。具体原因参考:[fix qwen2.5 template by Jintao-Huang · Pull Request #2081 · modelscope/ms-swift](https://github.com/modelscope/ms-swift/pull/2081)
77
+
78
+ #### 推理方式1-代码推理
79
+
80
+ ```python
81
+ import os
82
+ os.environ['CUDA_VISIBLE_DEVICES'] = '0'
83
+
84
+ from swift.llm import (
85
+ get_model_tokenizer, get_template, inference, ModelType
86
+ )
87
+ from swift.utils import seed_everything
88
+
89
+ model_type = ModelType.qwen2_5_7b_instruct
90
+ template_type = 'qwen'
91
+
92
+ model_id_or_path = 'QLU-NLP/BianCang-Qwen2.5-7B-Instruct'
93
+ model, tokenizer = get_model_tokenizer(model_type, model_id_or_path=model_id_or_path, model_kwargs={'device_map': 'auto'})
94
+ model.generation_config.max_new_tokens = 256
95
+
96
+ template = get_template(template_type, tokenizer)
97
+ seed_everything(42)
98
+ query = '你好,你是谁?'
99
+ response, history = inference(model, template, query)
100
+ print(f'query: {query}')
101
+ print(f'response: {response}')
102
+ query = '下面是一名患者的基本情况。年龄:78岁,性别:女。主 诉:活动后胸痛一周。现病史:患者一周前活动后出现胸口隐隐作痛,如针刺样乏力气短,活动后汗出,偏头痛。中医望闻切诊:表情自然,面色红润,形体正常,语气清,气息平;无异常气味,舌暗红,苔少。请你根据上述患者的主诉、病史和中医望闻切诊情况,判断该患者的主要中医疾病和中医证型,并给出中医辨病辨证的依据。'
103
+ response, history = inference(model, template, query, history)
104
+ print(f'query: {query}')
105
+ print(f'response: {response}')
106
+ print(f'history: {history}')
107
+ ```
108
+
109
+ 输出:
110
+
111
+ ```
112
+ query: 你好,你是谁?
113
+ response: 你好!我是一个名为扁仓中医大模型的人工智能,由齐鲁工业大学(山东省科学院)计算机科学与技术学部(国家超级计算济南中心)自然语言处理与认知计算团队研发。我被设计成能够理解和生成自然语言文本,以便与人类进行中医辩证、中医处方推荐、中医知识问答、中医问题咨询等方面的对话交流,辅助人们完成疾病诊断相关的任务。请问有什么我可以帮助您的吗?
114
+ query: 下面是一名患者的基本情况。年龄:78岁,性别:女。主 诉:活动后胸痛一周。现病史:患者一周前活动后出现胸口隐隐作痛,如针刺样乏力气短,活动后汗出,偏头痛。中医望闻切诊:表情自然,面色红润,形体正常,语气清,气息平;无异常气味,舌暗红,苔少。请你根据上述患者的主诉、病史和中医望闻切诊情况,判断该患者的主要中医疾病和中医证型,并给出中医辨病辨证的依据。
115
+ response: 根据中医的诊断方法,患者患有胸痹心痛,中医证型属于气虚血瘀证。综合脉证,四诊合参,本病当属祖国医学“胸痹心痛病”范畴,证属“气虚血瘀”。患者素体虚弱,久病伤正,伤及心气,心气衰微,机能不健,致阴邪易于上乘阳位,况心脉为宗气之所,百脉朝会之枢,宗气的鼓动形成了心气推动血液运行全身,心气不足则血行无力瘀滞,发为本病,舌脉俱为佐证。
116
+ history: [['你好,你是谁?', '你好!我是一个名为扁仓中医大模型的人工智能,由齐鲁工业大学(山东省科学院)计算机科学与技术学部(国家超级计算济南中心)自然语言处理与认知计算团队研发。我被设计成能够理解和生成自然语言文本,以便与人类进行中医辩证、中医处方推荐、中医知识问答、中医问题咨询等方面的对话交流,辅助人们完成疾病诊断相关的任务。请问有什么我可以帮助您的吗?'], ['下面是一名患者的基本情况。年龄:78岁,性别:女。主 诉:活动后胸痛一周。现病史:患者一周前活动后出现胸口隐隐作痛,如针刺样乏力气短,活动后汗出,偏头痛。中医望闻切诊:表情自然,面色红润,形体正常,语气清,气息平;无异常气味,舌暗红,苔少。请你根据上述患者的主诉、病史和中医望闻切诊情况,判断该患者的主要中医疾病和中医证型,并给出中医辨病辨证的依据。', '根据中医的诊断方法,患者患有胸痹心痛,中医证型属于气虚血瘀证。综合脉证,四诊合参,本病当属祖国医学“胸痹心痛病”范畴,证属“气虚血瘀”。患者素体虚弱,久病伤正,伤及心气,心气衰微,机能不健,致阴邪易于上乘阳位,况心脉为宗气之所,百脉朝会之枢,宗气的鼓动形成了心气推动血液运行全身,心气不足则血行无力瘀滞,发为本病,舌脉俱为佐证。']]
117
+ ```
118
+
119
+ #### 推理方式2-部署API
120
+
121
+ 使用以下命令部署API:
122
+
123
+ ```shell
124
+ CUDA_VISIBLE_DEVICES=0 swift deploy --model_type qwen2_5-7b-instruct --model_id_or_path QLU-NLP/BianCang-Qwen2.5-7B-Instruct --port 8090 --template_type qwen
125
+ ```
126
+
127
+ 使用curl进行测试:
128
+
129
+ ```shell
130
+ curl http://localhost:8090/v1/chat/completions \
131
+ -H "Content-Type: application/json" \
132
+ -d '{
133
+ "model": "qwen2_5-7b-instruct",
134
+ "messages": [{"role": "user", "content": "你好,你是谁?"}],
135
+ "max_tokens": 256,
136
+ "temperature": 0.3
137
+ }'
138
+ ```
139
+
140
+ 响应如下:
141
+
142
+ ```json
143
+ {"model":"qwen2_5-7b-instruct",
144
+ "choices":[{"index":0,"message":{"role":"assistant","content":"你好!我是一个名为扁仓中医大模型的人工智能,由齐鲁工业大学(山东省科学院)计算机科学与技术学部(国家超级计算济南中心)自然语言处理与认知计算团队研发。我被设计成能够理解和生成自然语言文本,以便与人类进行中医辩证、中医处方推荐、中医知识问答、中医问题咨询等方面的对话交流,辅助人们完成疾病诊断相关的任务。请问有什么我可以帮助您的吗?",
145
+ "tool_calls":null},"finish_reason":null,"logprobs":null}],
146
+ "usage":{"prompt_tokens":24,"completion_tokens":92,"total_tokens":116},
147
+ "id":"chatcmpl-6b4a02dee57a42238b27b5c40085df16",
148
+ "object":"chat.completion","created":1730209011}
149
+ ```
150
+
151
+ 使用代码进行测试:
152
+
153
+ ```python
154
+ from swift.llm import get_model_list_client, XRequestConfig, inference_client
155
+
156
+ model_list = get_model_list_client(port=8090)
157
+ model_type = model_list.data[0].id
158
+ print(f'model_type: {model_type}')
159
+
160
+ query = "你好,你是谁?"
161
+ request_config = XRequestConfig(seed=42)
162
+ resp = inference_client(model_type, query, request_config=request_config, port=8090)
163
+ response = resp.choices[0].message.content
164
+ print(f'query: {query}')
165
+ print(f'response: {response}')
166
+
167
+ history = [(query, response)]
168
+ query = '下面是一名患者的基本情况。年龄:78岁,性别:女。主 诉:活动后胸痛一周。现病史:患者一周前活动后出现胸口隐隐作痛,如针刺样乏力气短,活动后汗出,偏头痛。中医望闻切诊:表情自然,面色红润,形体正常,语气清,气息平;无异常气味,舌暗红,苔少。请你根据上述患者的主诉、病史和中医望闻切诊情况,判断该患者的主要中医疾病和中医证型,并给出中医辨病辨证的依据。'
169
+ request_config = XRequestConfig(stream=True, seed=42)
170
+ stream_resp = inference_client(model_type, query, history, request_config=request_config, port=8090)
171
+ print(f'query: {query}')
172
+ print('response: ', end='')
173
+ for chunk in stream_resp:
174
+ print(chunk.choices[0].delta.content, end='', flush=True)
175
+ print()
176
+ ```
177
+
178
+ 输出如下:
179
+
180
+ ```
181
+ model_type: qwen2_5-7b-instruct
182
+ query: 你好,你是谁?
183
+ response: 你好!我是一个名为扁仓中医大模型的人工智能,由齐鲁工业大学(山东省科学院)计算机科学与技术学部(国家超级计算济南中心)自然语言处理与认知计算团队研发。我被设计成能够理解和生成自然语言文本,以便与人类进行中医辩证、中医处方推荐、中医知识问答、中医问题咨询等方面的对话交流,辅助人们完成疾病诊断相关的任务。请问有什么我可以帮助您的吗?
184
+ query: 下面是一名患者的基本情况。年龄:78岁,性别:女。主 诉:活动后胸痛一周。现病史:患者一周前活动后出现胸口隐隐作痛,如针刺样乏力气短,活动后汗出,偏头痛。中医望闻切诊:表情自然,面色红润,形体正常,语气清,气息平;无异常气味,舌暗红,苔少。请你根据上述患者的主诉、病史和中医望闻切诊情况,判断该患者的主要中医疾病和中医证型,并给出中医辨病辨证的依据。
185
+ response: 根据中医的诊断方法,患者患有胸痹心痛,中医证型属于气虚血瘀证。综合脉证,四诊合参,本病当属祖国医学“胸痹心痛病”范畴,证属“气虚血瘀”。患者素体虚弱,久病伤正,伤及心气,心气衰微,机能不健,致阴邪易于上乘阳位,况心脉为宗气之所,百脉朝会之枢,宗气的鼓动形成了心气推动血液运行全身,心气不足则血行无力瘀滞,发为本病,舌脉俱为佐证。
186
+ ```
187
+
188
+ ### 使用Transformers
189
+
190
+ 你也可以使用transformers包进行推理:
191
+
192
+ ```python
193
+ from transformers import AutoModelForCausalLM, AutoTokenizer
194
+
195
+ model_name = "QLU-NLP/BianCang-Qwen2.5-7B-Instruct"
196
+
197
+ model = AutoModelForCausalLM.from_pretrained(
198
+ model_name,
199
+ torch_dtype="auto",
200
+ device_map="auto"
201
+ )
202
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
203
+
204
+ prompt = "你好,你是谁?"
205
+ messages = [
206
+ {"role": "system", "content": "You are a helpful assistant."},
207
+ {"role": "user", "content": prompt}
208
+ ]
209
+ text = tokenizer.apply_chat_template(
210
+ messages,
211
+ tokenize=False,
212
+ add_generation_prompt=True
213
+ )
214
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
215
+
216
+ generated_ids = model.generate(
217
+ **model_inputs,
218
+ max_new_tokens=256
219
+ )
220
+ generated_ids = [
221
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
222
+ ]
223
+
224
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
225
+ print(response)
226
+
227
+ ```
228
+
229
+ ### 使用Web UI
230
+
231
+ 我们提供了一个简单的演示Web UI。
232
+
233
+ 安装streamlit:
234
+
235
+ ```shell
236
+ pip install streamlit
237
+ ```
238
+
239
+ 使用SWIFT部署API:
240
+
241
+ ```shell
242
+ CUDA_VISIBLE_DEVICES=0 swift deploy --model_type qwen2_5-7b-instruct --model_id_or_path QLU-NLP/BianCang-Qwen2.5-7B-Instruct --port 8090 --template_type qwen
243
+ ```
244
+
245
+ 启动streamlit:
246
+
247
+ ```shell
248
+ streamlit run web_ui.py
249
+ ```
250
+
251
+ ![image-20241029215908096](assets/webui.png)
252
+
253
+ ## 🥇中医能力测试
254
+
255
+
256
+ <table border="1" cellpadding="5" cellspacing="0">
257
+ <thead>
258
+ <tr>
259
+ <th rowspan="2">Model</th>
260
+ <th colspan="4">TCM Syndrome Differentiation</th>
261
+ <th colspan="4">TCM Disease Diagnosis</th>
262
+ <th colspan="4">TCM Exam</th>
263
+ </tr>
264
+ <tr>
265
+ <th colspan="2">TCMSD <br>Acc.(%)</th>
266
+ <th colspan="2">TCMSD-BC<br> Acc.(%)</th>
267
+ <th colspan="2">TCMDD<br> Acc.(%)</th>
268
+ <th colspan="2">TCMDD-BC<br> Acc.(%)</th>
269
+ <th colspan="2">MLEC-TCM<br> Acc.(%)</th>
270
+ <th colspan="2">MLEC-CWM<br> Acc.(%)</th>
271
+ </tr>
272
+ <tr>
273
+ <th></th><th>DI</th><th>CoT</th><th>DI</th><th>CoT</th><th>DI</th><th>CoT</th><th>DI</th><th>CoT</th><th>ZS</th><th>FS</th><th>ZS</th><th>FS</th>
274
+ </tr>
275
+ </thead>
276
+ <tbody align="center" valign="center">
277
+ <tr><td>GPT-4</td><td>24.53</td><td>45.21</td><td>16.67</td><td>70.73</td><td>27.83</td><td>54.54</td><td>41.80</td><td>68.33</td><td>74.70</td><td>76.35</td><td>76.26</td><td>76.37</td></tr>
278
+ <tr><td>Qwen2-7B</td><td>31.74</td><td>27.18</td><td>32.73</td><td>28.40</td><td>41.60</td><td>54.59</td><td>74.87</td><td>77.93</td><td>86.01</td><td>89.18</td><td>84.45</td><td>87.89</td></tr>
279
+ <tr><td>Qwen2-7B-Instruct</td><td>25.70</td><td>33.41</td><td>14.27</td><td>57.00</td><td>32.87</td><td>52.92</td><td>60.40</td><td>60.13</td><td>83.61</td><td>84.22</td><td>79.89</td><td>82.99</td></tr>
280
+ <tr><td>Qwen2.5-7B</td><td>30.44</td><td>21.29</td><td>17.87</td><td>35.73</td><td>23.71</td><td>43.88</td><td>63.87</td><td>71.27</td><td>83.32</td><td>85.52</td><td>82.02</td><td>84.04</td></tr>
281
+ <tr><td>Qwen2.5-7B-Instruct</td><td>24.30</td><td>32.19</td><td>9.93</td><td>57.07</td><td>36.29</td><td>51.51</td><td>62.93</td><td>55.53</td><td>78.72</td><td>79.88</td><td>77.27</td><td>78.43</td></tr>
282
+ <tr><td>Qwen2.5-14B</td><td>35.62</td><td>25.21</td><td>33.93</td><td>30.13</td><td>24.33</td><td>36.64</td><td>33.33</td><td>32.80</td><td>86.59</td><td>89.93</td><td>87.10</td><td>90.06</td></tr>
283
+ <tr><td>Qwen2.5-14B-Instruct</td><td>25.94</td><td>35.03</td><td>16.07</td><td>60.00</td><td>38.30</td><td>49.31</td><td>46.27</td><td>53.67</td><td>82.25</td><td>84.81</td><td>81.79</td><td>85.68</td></tr>
284
+ <tr><td>BianCang-Qwen2-7B</td><td>42.14</td><td>30.30</td><td>57.80</td><td>48.00</td><td>43.73</td><td>54.67</td><td>74.73</td><td>80.67</td><td>90.86</td><td>91.87</td><td>89.08</td><td>90.36</td></tr>
285
+ <tr><td>BianCang-Qwen2-7B-Instruct</td><td>68.88</td><td>75.96</td><td>57.33</td><td>75.40</td><td>64.42</td><td>77.71</td><td>89.07</td><td>85.67</td><td>92.39</td><td>92.39</td><td>91.14</td><td>91.48</td></tr>
286
+ <tr><td>BianCang-Qwen2.5-7B</td><td>46.57</td><td>26.72</td><td>52.93</td><td>45.47</td><td>49.80</td><td>53.15</td><td>68.13</td><td>61.73</td><td>86.46</td><td>86.30</td><td>83.93</td><td>85.35</td></tr>
287
+ <tr><td>BianCang-Qwen2.5-7B-Instruct</td><td>79.80</td><td>82.10</td><td>66.73</td><td>77.73</td><td>73.73</td><td>82.65</td><td>87.87</td><td>89.40</td><td>90.22</td><td>90.57</td><td>90.32</td><td>90.62</td></tr>
288
+ <tr><td>BianCang-Qwen2.5-14B</td><td>43.77</td><td>33.96</td><td>61.93</td><td>53.47</td><td>66.61</td><td>60.39</td><td>82.93</td><td>77.07</td><td>89.28</td><td>90.86</td><td>89.42</td><td>90.58</td></tr>
289
+ <tr><td>BianCang-Qwen2.5-14B-Instruct</td><td>79.38</td><td>75.54</td><td>62.27</td><td>70.73</td><td>77.63</td><td>82.05</td><td>86.33</td><td>88.73</td><td>92.29</td><td>92.29</td><td>92.75</td><td>92.86</td></tr>
290
+ </tbody>
291
+ </table>
292
+
293
+ <br>
294
+
295
+
296
+ <table border="1">
297
+ <tr>
298
+ <th>Model</th>
299
+ <th>CMB Acc.(%)</th>
300
+ <th colspan="2">MLEC-Clinic <br>Acc.(%)</th>
301
+ <th colspan="2">MLEC-PublicHealth<br> Acc.(%)</th>
302
+ <th colspan="2">MLEC-Stomatology<br> Acc.(%)</th>
303
+ </tr>
304
+ <tr>
305
+ <th></th>
306
+ <th>ZS/FS</th>
307
+ <th>ZS</th>
308
+ <th>FS</th>
309
+ <th>ZS</th>
310
+ <th>FS</th>
311
+ <th>ZS</th>
312
+ <th>FS</th>
313
+ </tr>
314
+ <tr>
315
+ <td>GPT-4</td>
316
+ <td>59.46*</td>
317
+ <td>82.63</td>
318
+ <td>82.69</td>
319
+ <td>81.55</td>
320
+ <td>82.58</td>
321
+ <td>72.97</td>
322
+ <td>75.43</td>
323
+ </tr>
324
+ <tr>
325
+ <td>Qwen2-7B</td>
326
+ <td>81.63</td>
327
+ <td>87.63</td>
328
+ <td>90.63</td>
329
+ <td>82.63</td>
330
+ <td>86.79</td>
331
+ <td>80.34</td>
332
+ <td>84.65</td>
333
+ </tr>
334
+ <tr>
335
+ <td>Qwen2-7B-Instruct</td>
336
+ <td>83.45</td>
337
+ <td>85.16</td>
338
+ <td>83.35</td>
339
+ <td>81.61</td>
340
+ <td>81.07</td>
341
+ <td>76.29</td>
342
+ <td>75.88</td>
343
+ </tr>
344
+ <tr>
345
+ <td>Qwen2.5-7B</td>
346
+ <td>79.60</td>
347
+ <td>86.65</td>
348
+ <td>88.55</td>
349
+ <td>83.39</td>
350
+ <td>85.17</td>
351
+ <td>78.03</td>
352
+ <td>80.79</td>
353
+ </tr>
354
+ <tr>
355
+ <td>Qwen2.5-7B-Instruct</td>
356
+ <td>79.51</td>
357
+ <td>82.81</td>
358
+ <td>83.73</td>
359
+ <td>80.96</td>
360
+ <td>80.85</td>
361
+ <td>72.93</td>
362
+ <td>74.40</td>
363
+ </tr>
364
+ <tr>
365
+ <td>Qwen2.5-14B</td>
366
+ <td>84.07</td>
367
+ <td>90.40</td>
368
+ <td>93.13</td>
369
+ <td>86.46</td>
370
+ <td>89.54</td>
371
+ <td>84.31</td>
372
+ <td>88.20</td>
373
+ </tr>
374
+ <tr>
375
+ <td>Qwen2.5-14B-Instruct</td>
376
+ <td>83.69</td>
377
+ <td>86.47</td>
378
+ <td>88.02</td>
379
+ <td>83.17</td>
380
+ <td>86.14</td>
381
+ <td>78.94</td>
382
+ <td>82.57</td>
383
+ </tr>
384
+ <tr>
385
+ <td>BianCang-Qwen2-7B (Ours)</td>
386
+ <td>83.27</td>
387
+ <td>91.88</td>
388
+ <td>93.31</td>
389
+ <td>88.57</td>
390
+ <td>90.72</td>
391
+ <td>85.29</td>
392
+ <td>88.47</td>
393
+ </tr>
394
+ <tr>
395
+ <td>BianCang-Qwen2-7B-Instruct (Ours)</td>
396
+ <td>84.08</td>
397
+ <td>94.35</td>
398
+ <td>94.35</td>
399
+ <td>91.37</td>
400
+ <td>91.64</td>
401
+ <td>89.19</td>
402
+ <td>90.02</td>
403
+ </tr>
404
+ <tr>
405
+ <td>BianCang-Qwen2.5-7B (Ours)</td>
406
+ <td>80.13</td>
407
+ <td>90.43</td>
408
+ <td>91.32</td>
409
+ <td>85.65</td>
410
+ <td>87.22</td>
411
+ <td>82.19</td>
412
+ <td>82.65</td>
413
+ </tr>
414
+ <tr>
415
+ <td>BianCang-Qwen2.5-7B-Instruct (Ours)</td>
416
+ <td>80.71</td>
417
+ <td>93.40</td>
418
+ <td>93.43</td>
419
+ <td>89.91</td>
420
+ <td>89.91</td>
421
+ <td>86.43</td>
422
+ <td>86.77</td>
423
+ </tr>
424
+ <tr>
425
+ <td>BianCang-Qwen2.5-14B (Ours)</td>
426
+ <td>84.34</td>
427
+ <td>91.70</td>
428
+ <td>93.37</td>
429
+ <td>87.92</td>
430
+ <td>89.97</td>
431
+ <td>86.16</td>
432
+ <td>87.94</td>
433
+ </tr>
434
+ <tr>
435
+ <td>BianCang-Qwen2.5-14B-Instruct (Ours)</td>
436
+ <td>83.80</td>
437
+ <td>94.74</td>
438
+ <td>94.97</td>
439
+ <td>91.86</td>
440
+ <td>91.53</td>
441
+ <td>90.43</td>
442
+ <td>90.51</td>
443
+ </tr>
444
+ </table>
445
+
446
+
447
+ 更多测评结果请关注我们的技术报告。
448
+
449
+ ## 🧡致谢
450
+
451
+ 本项目基于开源项目进行开发,在此对相关项目和研究开发人员表示感谢。
452
+
453
+ - [Qwen2](https://github.com/vitanova/Qwen2)
454
+ - [Qwen2.5](https://github.com/QwenLM/Qwen2.5)
455
+ - [SWIFT](https://github.com/modelscope/ms-swift)
456
+ - [ModelScope](https://github.com/modelscope/modelscope)
457
+ - [ShenNong-TCM-LLM](https://github.com/michael-wzhu/ShenNong-TCM-LLM?tab=readme-ov-file)
458
+ - [HuatuoGPT-II](https://github.com/FreedomIntelligence/HuatuoGPT-II)
459
+ - [DISC-MedLLM](https://github.com/FudanDISC/DISC-MedLLM)
460
+ - [MLEC-QA](https://github.com/Judenpech/MLEC-QA)
461
+ - [CMB](https://github.com/FreedomIntelligence/CMB?tab=readme-ov-file)
462
+ - [ZY-BERT](https://github.com/Borororo/ZY-BERT)
463
+ - [COIG](https://github.com/BAAI-Zlab/COIG)
464
+ - [APE210k](https://github.com/Chenny0808/ape210k)
465
+ - [Evol-Instruction-66K](https://github.com/Continuum-Labs-HQ/EvolInstruct)
466
+
467
+ ## ❔关于我们
468
+
469
+ 本项目由齐鲁工业大学(山东省科学院)计算学部(国家超级计算济南中心)自然语言处理与认知计算团队、山东~~省~~中医药大学附属医院临床研究中心合作完成。
470
+
471
+ <div align="center">
472
+ <p>
473
+ <img src="assets/QLU-NLP-logo.png" width="500px"/>
474
+ </p>
475
+ </div>
476
+
477
+
478
+
479
+ <div align="center">
480
+ <p>
481
+ <img src="assets/超算logo.png" width="500px"/>
482
+ </p>
483
+ </div>
484
+
485
+ <p>
486
+
487
+ <div align="center">
488
+ <p>
489
+ <img src="assets/山中医logo.png" width="500px"/>
490
+ </p>
491
+ </div>
492
+
493
+ ## ❕免责声明
494
+
495
+ - 本项目相关资源仅供学术研究之用。
496
+ - 扁仓中医大模型作为基于语言模型的智能助手,具有局限性,无法保证所有响应的准确性,其不能代替中医/西医进行医学诊断和给出医学建议。如有需要,请咨询专业医生或前往医院就诊。
497
+ - 由于医疗领域的数据不准确可能造成严重后果,我们强烈建议用户在处理生成的信息时要小心谨慎,并向专家寻求建议。
498
+
499
+ ## 📖引用
500
+
501
+ ```
502
+ @article{Wei2024BianCang,
503
+ title={BianCang: A Traditional Chinese Medicine Large Language Model},
504
+ author={Sibo, Wei and Xueping, Peng and Yi-fei, Wang and Jiasheng, Si and Weiyu, Zhang and Wenpeng, Lu and Xiaoming, Wu and Yinglong, Wang},
505
+ journal={arXiv preprint},
506
+ year={2024}
507
+ }
508
+ ```
509
+