🚀 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單元的訪問權限。