Views
No views yet
pip install gliner -U1from gliner import GLiNER
2
3model = GLiNER.from_pretrained("Ihor/gliner-biomed-small-v1.0")
4
5text = """
6The patient, a 45-year-old male, was diagnosed with type 2 diabetes mellitus and hypertension.
7He was prescribed Metformin 500mg twice daily and Lisinopril 10mg once daily.
8A recent lab test showed elevated HbA1c levels at 8.2%.
9"""
10
11labels = ["Disease", "Drug", "Drug dosage", "Drug frequency", "Lab test", "Lab test value", "Demographic information"]
12
13entities = model.predict_entities(text, labels, threshold=0.5)
14
15for entity in entities:
16 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| 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 |
1@misc{yazdani2025glinerbiomedsuiteefficientmodels,
2 title={GLiNER-BioMed: A Suite of Efficient Models for Open Biomedical Named Entity Recognition},
3 author={Anthony Yazdani and Ihor Stepanov and Douglas Teodoro},
4 year={2025},
5 eprint={2504.00676},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2504.00676},
9}1@misc{zaratiana2023gliner,
2 title={GLiNER: Generalist Model for Named Entity Recognition using Bidirectional Transformer},
3 author={Urchade Zaratiana and Nadi Tomeh and Pierre Holat and Thierry Charnois},
4 year={2023},
5 eprint={2311.08526},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL}
8}1@misc{stepanov2024gliner,
2 title={GLiNER multi-task: Generalist Lightweight Model for Various Information Extraction Tasks},
3 author={Ihor Stepanov and Mykhailo Shtopko},
4 year={2024},
5 eprint={2406.12925},
6 archivePrefix={arXiv},
7 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.'}
8}Ihor/gliner-biomed-small-v1.0. See the upstream repository for the original safetensors weights, training data, and the full upstream model card.model.onnx.POST /v1/models/download?name=small-biomedPUT /v1/models?name=small-biomed| File | Size | SHA-256 |
|---|---|---|
model.onnx | 611.3 MB | 3802e22c6358e1c9… |