🚀 GLiNER-BioMed
GLiNER-BioMedは、双方向トランスフォーマーエンコーダ(BERTライク)を使用して任意のエンティティタイプを識別できる固有表現認識(NER)モデルです。このモデルは、事前定義されたエンティティに限定される従来のNERモデルや、柔軟性はあるもののリソース制約のあるシナリオではコストが高く大規模な大規模言語モデル(LLM)に代わる実用的な選択肢を提供します。
🚀 クイックスタート
このモデルは論文GLiNER-biomed: A Suite of Efficient Models for Open Biomedical Named Entity Recognitionで発表されました。コードはhttps://github.com/ds4dh/GLiNER-biomedで入手できます。
✨ 主な機能
- GLiNER:双方向トランスフォーマーエンコーダを使用して任意のエンティティタイプを識別できるNERモデル。
- GLiNER-biomed:ジュネーブ大学のDS4DHと共同開発された、GLiNERフレームワークに基づく効率的なオープンな生物医学NERモデルのセット。大規模な生成型生物医学言語モデルから抽出された合成アノテーションを利用して、生物医学エンティティ認識タスクにおいて最先端のゼロショットおよびフューショット性能を達成します。
📦 インストール
公式のGLiNERライブラリをpipでインストールします:
pip install gliner -U
💻 使用例
基本的な使用法
GLiNERライブラリをインストールした後、GLiNER-biomedモデルを簡単にロードして固有表現認識を実行できます:
from gliner import GLiNER
model = GLiNER.from_pretrained("Ihor/gliner-biomed-large-v1.0")
text = """
The patient, a 45-year-old male, was diagnosed with type 2 diabetes mellitus and hypertension.
He was prescribed Metformin 500mg twice daily and Lisinopril 10mg once daily.
A recent lab test showed elevated HbA1c levels at 8.2%.
"""
labels = ["Disease", "Drug", "Drug dosage", "Drug frequency", "Lab test", "Lab test value", "Demographic information"]
entities = model.predict_entities(text, labels, threshold=0.5)
for entity in entities:
print(entity["text"], "=>", entity["label"])
高度な使用法
予想される出力
45-year-old male => Demographic information
type 2 diabetes mellitus => Disease
hypertension => Disease
Metformin => Drug
500mg => Drug dosage
twice daily => Drug frequency
Lisinopril => Drug
10mg => Drug dosage
once daily => Drug frequency
HbA1c levels => Lab test
8.2% => Lab test value
📚 ドキュメント
ベンチマーク
私たちは、8つの複雑な実世界のデータセットでモデルを検証し、他のGLiNERモデルと比較しました。
Discordへの参加
モデルに関するニュース、サポート、ディスカッションのために、Discordで私たちのコミュニティに参加してください。Discordに参加しましょう。
📄 ライセンス
このプロジェクトはApache-2.0ライセンスの下でライセンスされています。
引用
この研究
もしあなたの研究でGLiNER-biomedモデルを使用した場合は、以下を引用してください:
@misc{yazdani2025glinerbiomedsuiteefficientmodels,
title={GLiNER-biomed: A Suite of Efficient Models for Open Biomedical Named Entity Recognition},
author={Anthony Yazdani and Ihor Stepanov and Douglas Teodoro},
year={2025},
eprint={2504.00676},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2504.00676},
}
過去の研究
@misc{zaratiana2023gliner,
title={GLiNER: Generalist Model for Named Entity Recognition using Bidirectional Transformer},
author={Urchade Zaratiana and Nadi Tomeh and Pierre Holat and Thierry Charnois},
year={2023},
eprint={2311.08526},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{stepanov2024gliner,
title={GLiNER multi-task: Generalist Lightweight Model for Various Information Extraction Tasks},
author={Ihor Stepanov and Mykhailo Shtopko},
year={2024},
eprint={2406.12925},
archivePrefix={arXiv},
primaryClass={id='cs.LG' full_name='Machine Learning' is_active=True alt_name=None in_archive='cs' is_general=False description='Papers on all aspects of machine learning research (supervised, unsupervised, reinforcement learning, bandit problems, and so on) including also robustness, explanation, fairness, and methodology. cs.LG is also an appropriate primary category for applications of machine learning methods.'}
}