🚀 BioM-Transformers: BERT、ALBERT、ELECTRAを用いた大規模生物医学言語モデルの構築
本プロジェクトでは、異なる設計選択肢を用いた大規模トランスフォーマーモデルによる生物医学分野の適応を研究し、既存の生物医学言語モデルと比較して優れた性能を達成します。
🚀 クイックスタート
本プロジェクトでは、異なる設計選択肢を用いた大規模トランスフォーマーモデルによる生物医学分野の適応を経験的に研究しています。既存の生物医学言語モデルと比較して、同程度またはそれ以下の計算コストで、いくつかの生物医学分野のタスクで最先端の結果を達成しています。
✨ 主な機能
- 異なる設計選択肢を用いた大規模トランスフォーマーモデルによる生物医学分野の適応研究。
- 既存の生物医学言語モデルと比較して、同程度またはそれ以下の計算コストで、いくつかの生物医学分野のタスクで最先端の結果を達成。
- TensorFlowとGluonNLPのチェックポイントを提供。
- テキスト分類や質問応答タスクでの言語モデルの微調整の例を提供。
📚 ドキュメント
モデルの説明
このモデルは、BioM - ALBERT - xxlargeの重みを初期値として、PMCの全文記事でさらに64kステップ、バッチサイズ8192で事前学習されています。したがって、このモデルの総学習ステップ数は264k + 64k = 328kステップです。隠れ層のサイズが大きい(4096)ため、モデルは非常に大きくなっています。
リソースが限られた研究者がより大きなモデルを微調整できるように、PyTorch XLAを使用した例を作成しました。PyTorch XLA(https://github.com/pytorch/xla)は、TPUユニットでPyTorchを使用できるライブラリで、Google ColabとKaggleによって無料で提供されています。この例に従って、PyTorch/XLAを使用してください リンク。この例では、BioM - ALBERTxxlargeを使用してChemProtタスクで80.74のマイクロF1スコアを達成しています。5エポックの微調整には43分かかります。
TensorFlowとGluonNLPのチェックポイントについては、GitHubリポジトリhttps://github.com/salrowili/BioM-Transformersを確認してください。また、このリポジトリには、ChemProt、SQuAD、BioASQなどのテキスト分類と質問応答タスクで言語モデルを微調整する方法の例もいくつか追加しました。
Colabノートブックの例
- BioM - ELECTRA - LARGEを用いたNERとChemProtタスク

- BioM - ELECTRA - Largeを用いたSQuAD2.0とBioASQ7B Factoidタスク

- BioM - ALBERT - xxlargeを用いたSQuAD2.0とBioASQ7B Factoidタスク

- HuggingFace TransformersとPyTorchXLAを用いた無料TPUでのテキスト分類タスク

- JAXを用いたBLURB結果の再現

- Jax/Flaxを用いたBioM - Transformersの無料KaggleリソースでのTPUv3 - 8での微調整

📄 ライセンス
引用
@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ユニットへのアクセスを許可してくれたことに感謝します。