🚀 BioM-Transformers:使用BERT、ALBERT和ELECTRA构建大型生物医学语言模型
BioM-Transformers项目聚焦于生物医学领域语言模型的构建,通过不同设计选择探索提升模型性能的方法。该项目使用大型Transformer模型进行生物医学领域适配,在多个生物医学任务中取得了先进成果,且计算成本相当或更低。
🚀 快速开始
本项目提供了丰富的资源和示例,帮助用户快速上手使用BioM-Transformers。你可以通过以下步骤开始:
- 查看模型描述,了解模型的预训练信息和使用资源。
- 参考Colab Notebook示例,进行模型的微调与应用。
✨ 主要特性
- 实证研究:通过实证研究不同设计选择对生物医学语言模型性能的影响。
- 先进成果:在多个生物医学领域任务中取得了先进的结果。
- 低计算成本:相比其他模型,使用了相似或更低的计算成本。
- 丰富示例:提供了多种任务的Colab Notebook示例,方便用户进行模型微调。
📚 详细文档
模型描述
本模型仅在PubMed摘要上进行预训练,使用生物医学领域词汇,在TPUv3 - 512单元上进行了264K步的训练,批次大小为8192。为了帮助资源有限的研究人员微调更大的模型,我们使用PyTorch XLA创建了一个示例。PyTorch XLA(https://github.com/pytorch/xla)是一个允许你在TPU单元上使用PyTorch的库,Google Colab和Kaggle免费提供TPU单元。你可以按照这个示例进行操作链接。
你可以在https://github.com/salrowili/BioM-Transformers 查看我们的GitHub仓库,获取TensorFlow和GluonNLP的检查点。我们还在这个仓库中更新了一些关于如何在文本分类和问答任务(如ChemProt、SQuAD和BioASQ)上微调语言模型的示例。
Colab Notebook示例
- BioM - ELECTRA - LARGE在命名实体识别(NER)和ChemProt任务上的示例:

- BioM - ELECTRA - Large在SQuAD2.0和BioASQ7B事实性任务上的示例:

- BioM - ALBERT - xxlarge在SQuAD2.0和BioASQ7B事实性任务上的示例:

- 使用HuggingFace Transformers和PyTorchXLA在免费TPU上进行文本分类任务的示例:

- 使用JAX重现BLURB结果的示例:

- 在TPUv3 - 8上使用免费Kaggle资源用Jax/Flax微调BioM - Transformers的示例:

📄 许可证
如果你在研究中使用了BioM-Transformers,请按照以下格式引用:
@inproceedings{alrowili-shanker-2021-biom,
title = "{B}io{M}-Transformers: Building Large Biomedical Language Models with {BERT}, {ALBERT} and {ELECTRA}",
author = "Alrowili, Sultan and
Shanker, Vijay",
booktitle = "Proceedings of the 20th Workshop on Biomedical Language Processing",
month = jun,
year = "2021",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://www.aclweb.org/anthology/2021.bionlp-1.24",
pages = "221--227",
abstract = "The impact of design choices on the performance of biomedical language models recently has been a subject for investigation. In this paper, we empirically study biomedical domain adaptation with large transformer models using different design choices. We evaluate the performance of our pretrained models against other existing biomedical language models in the literature. Our results show that we achieve state-of-the-art results on several biomedical domain tasks despite using similar or less computational cost compared to other models in the literature. Our findings highlight the significant effect of design choices on improving the performance of biomedical language models.",
}
致谢
我们感谢Tensorflow Research Cloud (TFRC)团队为我们提供TPUv3单元的访问权限。