[论文解读] MedAlpaca -- An Open-Source Collection of Medical Conversational AI Models and Training Data
本文提出一个开源的医学 LLM 微调数据集,并在 USMLE 自测任务上对微调模型与预训练基线进行比较,结果显示拥有高质量医学数据的更大预训练模型能提升性能。还讨论了 LoRA 等训练技术及 8 位方法,并强调就地部署的隐私优势。
As large language models (LLMs) like OpenAI's GPT series continue to make strides, we witness the emergence of artificial intelligence applications in an ever-expanding range of fields. In medicine, these LLMs hold considerable promise for improving medical workflows, diagnostics, patient care, and education. Yet, there is an urgent need for open-source models that can be deployed on-premises to safeguard patient privacy. In our work, we present an innovative dataset consisting of over 160,000 entries, specifically crafted to fine-tune LLMs for effective medical applications. We investigate the impact of fine-tuning these datasets on publicly accessible pre-trained LLMs, and subsequently, we juxtapose the performance of pre-trained-only models against the fine-tuned models concerning the examinations that future medical doctors must pass to achieve certification.
研究动机与目标
- 创建一个开放获取、就地友好的一组医学语言模型及训练数据。
- 评估对公开可用的 LLM 进行微调对医学任务的影响。
- 评估在 USMLE Step 1–3 自测中的模型表现以衡量医学能力。
- 就部署医疗 AI 的隐私、偏见与可靠性等考虑提供指南。
提出的方法
- 组装 Medical Meadow,这是一个多样化的医学 NLP 任务与互联网上数据的再格式化,用于指令微调。
- 使用全量微调和参数高效微调方法(LoRA、8-bit 训练)对 LLaMA 基础模型(7B 和 13B)进行微调。
- 采用不同学习率和训练轮次,使用余弦调度器和梯度累积实现有效批量大小 256。
- 在 USMLE Step 1、2、3 自测数据集上进行零-shot 评估,排除基于图像的题目,强制输出格式为“Option: Answer”。
- 比较全量微调与 LoRA 及 8-bit 变体,以评估性能与计算之间的权衡。
实验结果
研究问题
- RQ1微调的医学 LLM 是否在 USMLE 自测任务上优于仅有预训练的对照组?
- RQ2模型尺寸(7B 与 13B)在微调后对医学知识表现有何影响?
- RQ3参数高效微调(LoRA、8-bit)相对于全量微调对准确性的影响如何?
- RQ4在微调数据中提高数据质量和领域专用性是否能提升 USMLE 风格的表现?
主要发现
| 模型 | 步骤1 | 步骤2 | 步骤3 |
|---|---|---|---|
| LLaMA 7b [15] | 0.198 | 0.202 | 0.203 |
| Alpaca 7b naive [11] | 0.275 | 0.266 | 0.293 |
| Alpaca 7b LoRA | 0.220 | 0.138 | 0.252 |
| MedAlpaca 7b | 0.297 | 0.312 | 0.398 |
| MedAlpaca 7b LoRA | 0.231 | 0.202 | 0.179 |
| MedAlpaca 7b LoRA 8bit | 0.231 | 0.241 | 0.211 |
| ChatDoctor (7b) [10] | 0.187 | 0.185 | 0.148 |
| LLaMA 13b [15] | 0.222 | 0.248 | 0.276 |
| Alpaca 13b naive | 0.319 | 0.312 | 0.301 |
| MedAlpaca 13b | 0.473 | 0.477 | 0.602 |
| MedAlpaca 13b LoRA | 0.250 | 0.255 | 0.255 |
| MedAlpaca 13b LoRA 8bit | 0.189 | 0.303 | 0.289 |
- 微调后的 MedAlpaca 模型在 USMLE Step 1、Step 2、Step 3 上优于仅有预训练的基线。
- MedAlpaca 13b 在原始分数上高于较小模型(Step 1: 0.473, Step 2: 0.477, Step 3: 0.602)。
- LoRA 与 8-bit 微调在加速训练方面表现良好,但总体上相对于纯粹的全量微调的准确性略有下降。
- 随着更大预训练模型和高质量医学数据,性能有所提升。
- 开源模型使就地部署成为可能,从而在医疗场景中缓解隐私问题。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。