🚀 医学mT5:医疗领域的开源多语言文本到文本大语言模型
医学mT5是首个面向医疗领域的开源文本到文本多语言模型。它基于公开可用的mT5检查点,在英语、西班牙语、法语和意大利语的医疗领域数据上继续训练而成,能有效提升多语言医疗文本处理能力。
🚀 快速开始
你可以使用以下代码加载模型:
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("HiTZ/Medical-mT5-large")
model = AutoModelForSeq2SeqLM.from_pretrained("HiTZ/Medical-mT5-large")
该模型使用T5掩码语言建模任务进行训练,你需要针对自己的任务对模型进行微调。
✨ 主要特性
- 多语言支持:支持英语、西班牙语、法语和意大利语,适用于不同语言背景的医疗文本处理。
- 开源模型:开放源代码和模型,方便研究人员和开发者进行二次开发和应用。
📦 安装指南
文档未提及具体安装步骤,可参考transformers
库的安装方式,使用pip install transformers
进行安装。
📚 详细文档
模型描述
- 开发者:Iker García - Ferrero、Rodrigo Agerri、Aitziber Atutxa Salazar、Elena Cabrio、Iker de la Iglesia、Alberto Lavelli、Bernardo Magnini、Benjamin Molinet、Johana Ramirez - Romero、German Rigau、Jose Maria Villa - Gonzalez、Serena Villata和Andrea Zaninello
- 联系方式:[Iker García - Ferrero](https://ikergarcia1996.github.io/Iker - Garcia - Ferrero/) 和 Rodrigo Agerri
- 项目网站:[https://univ - cotedazur.eu/antidote](https://univ - cotedazur.eu/antidote)
- 资助来源:CHIST - ERA XAI 2019 call。Antidote (PCI2020 - 120717 - 2) 由MCIN/AEI /10.13039/501100011033和欧盟NextGenerationEU/PRTR资助
- 模型类型:文本到文本生成
- 支持语言:英语、西班牙语、法语、意大利语
- 许可证:apache - 2.0
- 微调基础模型:mT5
预训练设置
属性 |
详情 |
模型类型 |
文本到文本生成 |
支持语言 |
英语、西班牙语、法语、意大利语 |
许可证 |
apache - 2.0 |
微调基础模型 |
mT5 |
MedMT5预训练设置
|
Medical mT5 - Large (HiTZ/Medical-mT5-large) |
Medical mT5 - XL (HiTZ/Medical-mT5-xl) |
参数数量 |
7.38亿 |
30亿 |
序列长度 |
1024 |
480 |
每步令牌数 |
65536 |
30720 |
训练轮数 |
1 |
1 |
总令牌数 |
45亿 |
45亿 |
优化器 |
Adafactor |
Adafactor |
学习率 |
0.001 |
0.001 |
调度器 |
常数 |
常数 |
硬件 |
4xA100 |
4xA100 |
训练时间(小时) |
10.5 |
20.5 |
CO₂等效排放量(千克) |
2.9 |
5.6 |
训练数据
按语言划分的数据来源和单词计数
语言 |
数据来源 |
单词数 |
英语 |
ClinicalTrials |
12740万 |
英语 |
EMEA |
1200万 |
英语 |
PubMed |
9.684亿 |
西班牙语 |
EMEA |
1360万 |
西班牙语 |
PubMed |
840万 |
西班牙语 |
Medical Crawler |
9.18亿 |
西班牙语 |
SPACC |
35万 |
西班牙语 |
UFAL |
1050万 |
西班牙语 |
WikiMed |
520万 |
法语 |
PubMed |
140万 |
法语 |
Science Direct |
1520万 |
法语 |
Wikipedia - Médecine |
500万 |
法语 |
EDP |
4.8万 |
法语 |
Google Patents |
6.54亿 |
意大利语 |
Medical Commoncrawl - IT |
6700万 |
意大利语 |
Drug instructions |
3050万 |
意大利语 |
Wikipedia - Medicina |
1330万 |
意大利语 |
E3C Corpus - IT |
1160万 |
意大利语 |
Medicine descriptions |
630万 |
意大利语 |
Medical theses |
580万 |
意大利语 |
Medical websites |
400万 |
意大利语 |
PubMed |
230万 |
意大利语 |
Supplement description |
130万 |
意大利语 |
Medical notes |
97.5万 |
意大利语 |
Pathologies |
15.7万 |
意大利语 |
Medical test simulations |
2.6万 |
意大利语 |
Clinical cases |
2万 |
评估
用于序列标注的Medical mT5
已发布两个针对多语言序列标注进行微调的Medical mT5模型:
序列标注的单任务监督F1分数
序列标注的多任务监督F1分数
论点挖掘的零样本F1分数(模型在英语上训练,在西班牙语、法语和意大利语上评估)
伦理声明
在开发医疗领域的多语言文本到文本模型Medical mT5的研究中,我们认识到其存在伦理影响。一方面,这项工作的广泛影响在于它有潜力改善跨语言的医疗沟通和理解,从而提高不同语言社区的医疗服务可及性和质量。另一方面,它也引发了与隐私和数据安全相关的伦理考量。
为创建多语言语料库,我们采取了措施对敏感患者信息进行匿名化和保护,遵守每种语言管辖区域的数据保护法规,或从明确按照隐私和安全法规及指南处理此问题的来源获取数据。此外,我们致力于在模型的开发和评估过程中保持透明度和公平性。我们努力确保基准测试具有代表性且无偏差,并将在未来继续监测和解决任何潜在的偏差。最后,我们强调对开源的承诺,将数据、代码和模型公开提供,以促进研究社区的合作。
引用
@misc{garcíaferrero2024medical,
title={Medical mT5: An Open-Source Multilingual Text-to-Text LLM for The Medical Domain},
author={Iker García-Ferrero and Rodrigo Agerri and Aitziber Atutxa Salazar and Elena Cabrio and Iker de la Iglesia and Alberto Lavelli and Bernardo Magnini and Benjamin Molinet and Johana Ramirez-Romero and German Rigau and Jose Maria Villa-Gonzalez and Serena Villata and Andrea Zaninello},
year={2024},
eprint={2404.07613},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
相关链接