The open hub for GLiNER models, datasets, and resources on Hugging Face
Generalist and Lightweight Named Entity Recognition โ extract any entity type from text
GLiNER Community is the official Hugging Face organization for sharing and collaborating on GLiNER models. GLiNER is a Named Entity Recognition (NER) framework capable of identifying any entity type using a bidirectional transformer encoder (BERT-like). It provides a practical, efficient alternative to both traditional NER systems (limited to predefined entities) and Large Language Models (flexible but costly).
GLiNER was published at NAACL 2024 and has since grown into a thriving ecosystem of models, tools, and integrations.
Models hosted under this organization include the latest GLiNER releases:
| Model | Size | Description |
|---|---|---|
gliner-community/gliner_small-v2.5 |
Small | Lightweight model for resource-constrained environments |
gliner-community/gliner_medium-v2.5 |
Medium | Balanced performance and efficiency |
gliner-community/gliner_large-v2.5 |
Large | High-accuracy model for demanding tasks |
gliner-community/gliner_xxl-v2.5 |
XXL | Maximum performance for production workloads |
Browse all GLiNER-compatible models on the Hub: Models with GLiNER library tag
pip install gliner -U
from gliner import GLiNER
# Load a model
model = GLiNER.from_pretrained("gliner-community/gliner_medium-v2.5", load_tokenizer=True)
# Define your text and entity labels โ any labels you want!
text = """
Apple Inc. announced today that CEO Tim Cook will present the company's
new AI strategy at a press event in Cupertino on March 15, 2025.
"""
labels = ["person", "organization", "date", "location", "event"]
# Predict entities
entities = model.predict_entities(text, labels, threshold=0.5)
for entity in entities:
print(f"{entity['text']} => {entity['label']} (score: {entity['score']:.2f})")
Output:
Apple Inc. => organization (score: 0.98)
Tim Cook => person (score: 0.97)
Cupertino => location (score: 0.95)
March 15, 2025 => date (score: 0.96)
GLiNER powers a wide range of applications:
We'd love to have you! Connect with fellow GLiNER users and contributors:
Our Discord server is the best place to:
If you use GLiNER in your research, please cite the original paper:
@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{stepanov2024glinermultitaskgeneralistlightweight,
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={cs.LG},
url={https://arxiv.org/abs/2406.12925}
}
Models in this organization are released under the Apache 2.0 License unless otherwise noted on individual model cards.