GLiNER-BioMed
The model was presented in the paper GLiNER-biomed: A Suite of Efficient Models for Open Biomedical Named Entity Recognition.
The code is available at https://github.com/ds4dh/GLiNER-biomed.
GLiNER is a Named Entity Recognition (NER) model capable of identifying any entity type using a bidirectional transformer encoders (BERT-like). It provides a practical alternative to traditional NER models, which are limited to predefined entities, and Large Language Models (LLMs) that, despite their flexibility, are costly and large for resource-constrained scenarios.
GLiNER-biomed, developed in collaboration with DS4DH from the University of Geneva, introduces a specialized suite of efficient open biomedical NER models based on the GLiNER framework. GLiNER-biomed leverages synthetic annotations distilled from large generative biomedical language models to achieve state-of-the-art zero-shot and few-shot performance in biomedical entity recognition tasks.
How to Use
Install the official GLiNER library with pip:
pip install gliner -U
After installing the GLiNER library, you can easily load a GLiNER-biomed model and perform named entity recognition:
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"])
Expected output:
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
Benchmarking
We examined our models on 8 complex real-world datasets and compared them with other GLiNER models.
Model | F1-score | Macro mean F1 | Macro median F1 | Weighted F1 |
---|---|---|---|---|
Large models | ||||
NuNER Zero | 40.87 | 21.79 | 13.94 | 33.67 |
NuNER Zero span | 40.26 | 22.51 | 14.27 | 32.52 |
GLiNER bio v0.1 | 42.34 | 27.10 | 24.44 | 38.32 |
GLiNER bio v0.2 | 38.66 | 25.36 | 17.02 | 32.42 |
GLiNER v1.0 | 47.77 | 29.60 | 21.13 | 40.78 |
GLiNER v2.0 | 37.38 | 21.42 | 15.44 | 33.11 |
GLiNER v2.1 | 48.04 | 29.75 | 28.20 | 43.43 |
GLiNER news v2.1 | 48.99 | 31.79 | 33.77 | 45.13 |
GLiNER v2.5 | 53.81 | 35.22 | 35.65 | 51.57 |
GLiNER-biomed | 59.77 | 40.67 | 42.65 | 58.40 |
GLiNER-biomed-bi | 54.90 | 35.78 | 31.66 | 50.46 |
Base models | ||||
GLiNER v1.0 | 41.61 | 24.98 | 10.27 | 31.59 |
GLiNER v2.0 | 34.33 | 24.48 | 22.01 | 30.58 |
GLiNER v2.1 | 40.25 | 25.26 | 14.41 | 32.64 |
GLiNER news v2.1 | 41.59 | 27.16 | 17.74 | 34.44 |
GLiNER v2.5 | 46.49 | 30.93 | 25.26 | 44.68 |
GLiNER-biomed | 54.37 | 36.20 | 41.61 | 53.05 |
GLiNER-biomed-bi | 58.31 | 35.22 | 32.39 | 54.91 |
Small models | ||||
GLiNER v1.0 | 40.99 | 22.81 | 7.86 | 31.15 |
GLiNER v2.0 | 33.55 | 21.12 | 15.76 | 28.78 |
GLiNER v2.1 | 38.45 | 23.25 | 10.92 | 30.67 |
GLiNER news v2.1 | 39.15 | 24.96 | 14.48 | 33.10 |
GLiNER v2.5 | 38.21 | 28.53 | 18.01 | 36.88 |
GLiNER-biomed | 52.53 | 34.49 | 38.17 | 50.87 |
GLiNER-biomed-bi | 56.93 | 33.88 | 33.61 | 53.12 |
Join Our Discord
Connect with our community on Discord for news, support, and discussion about our models. Join Discord.
Citation
This work
If you use GLiNER-biomed models in your work, please cite:
@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},
}
Previous work
@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.'}
}
- Downloads last month
- 144
Model tree for Ihor/gliner-biomed-large-v1.0
Base model
microsoft/deberta-v3-large