CoolFace
Modelpublic

rpeel/glitext-small

sourceHugging Faceapache-2.0updated 3mo agoView on Hugging Face
0likes
Model Card

About

GLiNER is a Named Entity Recognition (NER) model capable of identifying any entity type using a bidirectional transformer encoder (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.

Links

  • Paper: https://arxiv.org/abs/2311.08526
  • Repository: https://github.com/urchade/GLiNER

Installation

To use this model, you must install the GLiNER Python library:

!pip install gliner -U

Usage

Once you've downloaded the GLiNER library, you can import the GLiNER class. You can then load this model using GLiNER.from_pretrained and predict entities with predict_entities.

python
from gliner import GLiNER

model = GLiNER.from_pretrained("gliner-community/gliner_small-v2.5", load_tokenizer=True)

text = """
Cristiano Ronaldo dos Santos Aveiro (Portuguese pronunciation: [kɾiʃˈtjɐnu ʁɔˈnaldu]; born 5 February 1985) is a Portuguese professional footballer who plays as a forward for and captains both Saudi Pro League club Al Nassr and the Portugal national team. Widely regarded as one of the greatest players of all time, Ronaldo has won five Ballon d'Or awards,[note 3] a record three UEFA Men's Player of the Year Awards, and four European Golden Shoes, the most by a European player. He has won 33 trophies in his career, including seven league titles, five UEFA Champions Leagues, the UEFA European Championship and the UEFA Nations League. Ronaldo holds the records for most appearances (183), goals (140) and assists (42) in the Champions League, goals in the European Championship (14), international goals (128) and international appearances (205). He is one of the few players to have made over 1,200 professional career appearances, the most by an outfield player, and has scored over 850 official senior career goals for club and country, making him the top goalscorer of all time.
"""

labels = ["person", "award", "date", "competitions", "teams"]

entities = model.predict_entities(text, labels)

for entity in entities:
    print(entity["text"], "=>", entity["label"])
Cristiano Ronaldo dos Santos Aveiro => person
5 February 1985 => date
Al Nassr => teams
Portugal national team => teams
Ballon d'Or => award
UEFA Men's Player of the Year Awards => award
European Golden Shoes => award
UEFA Champions Leagues => competitions
UEFA European Championship => competitions
UEFA Nations League => competitions
Champions League => competitions
European Championship => competitions

Named Entity Recognition benchmark result

Below is a comparison of results between previous versions of the model and the current one: [image]

Results on other datasets

ModelDatasetPrecisionRecallF1 Score
gliner-community/gliner_small-v2.5ACE 200435.18%22.81%27.67%
ACE 200535.89%22.39%27.58%
AnatEM49.12%31.31%38.24%
Broad Tweet Corpus59.51%77.85%67.46%
CoNLL 200363.16%70.43%66.60%
FabNER23.78%22.55%23.15%
FindVehicle37.46%40.06%38.72%
GENIA_NER45.90%54.11%49.67%
HarveyNER13.20%32.58%18.78%
MultiNERD45.87%87.01%60.07%
Ontonotes23.05%41.16%29.55%
PolyglotNER31.88%67.22%43.25%
TweetNER740.98%39.91%40.44%
WikiANN en55.35%60.06%57.61%
WikiNeural64.52%86.24%73.81%
bc2gm51.70%49.99%50.83%
bc4chemd30.78%57.56%40.11%
bc5cdr63.48%69.65%66.42%
ncbi63.36%66.67%64.97%
Average46.58%
--------------------------------------------------------------------------------------
urchade/gliner_small-v2.1ACE 200438.89%23.53%29.32%
ACE 200542.09%26.82%32.76%
AnatEM63.71%19.45%29.80%
Broad Tweet Corpus57.01%70.49%63.04%
CoNLL 200357.11%62.66%59.76%
FabNER32.41%12.33%17.87%
FindVehicle43.47%33.02%37.53%
GENIA_NER61.03%37.25%46.26%
HarveyNER23.12%15.16%18.32%
MultiNERD43.63%83.60%57.34%
Ontonotes23.25%35.41%28.07%
PolyglotNER29.47%64.41%40.44%
TweetNER744.78%30.83%36.52%
WikiANN en52.58%58.31%55.30%
WikiNeural53.38%82.19%64.72%
bc2gm66.64%30.56%41.90%
bc4chemd42.01%56.03%48.02%
bc5cdr72.03%58.58%64.61%
ncbi68.88%46.71%55.67%
Average43.54%
--------------------------------------------------------------------------------------
EmergentMethods/gliner_small-v2.1ACE 200439.92%17.50%24.34%
ACE 200538.53%16.58%23.18%
AnatEM55.95%25.69%35.22%
Broad Tweet Corpus66.63%72.00%69.21%
CoNLL 200362.89%58.96%60.86%
FabNER32.76%13.33%18.95%
FindVehicle42.93%43.20%43.06%
GENIA_NER51.28%43.75%47.22%
HarveyNER24.82%21.52%23.05%
MultiNERD59.27%80.69%68.34%
Ontonotes32.97%37.59%35.13%
PolyglotNER33.60%63.30%43.90%
TweetNER746.90%28.66%35.58%
WikiANN en51.91%55.43%53.61%
WikiNeural70.65%82.21%75.99%
bc2gm49.95%43.13%46.29%
bc4chemd35.88%71.64%47.81%
bc5cdr68.41%68.90%68.65%
ncbi55.31%59.87%57.50%
Average46.20%
-------------------------------------------------------------------------------------------
gliner-community/gliner_medium-v2.5ACE 200433.06%20.96%25.66%
ACE 200533.65%19.65%24.81%
AnatEM52.03%35.28%42.05%
Broad Tweet Corpus60.57%79.09%68.60%
CoNLL 200363.80%68.31%65.98%
FabNER26.20%22.26%24.07%
FindVehicle41.95%40.68%41.30%
GENIA_NER51.83%62.34%56.60%
HarveyNER14.04%32.17%19.55%
MultiNERD47.63%88.78%62.00%
Ontonotes21.68%38.41%27.71%
PolyglotNER32.73%68.27%44.24%
TweetNER740.39%37.64%38.97%
WikiANN en56.41%59.90%58.10%
WikiNeural65.61%86.28%74.54%
bc2gm55.20%56.71%55.95%
bc4chemd35.94%63.67%45.94%
bc5cdr63.50%70.09%66.63%
ncbi62.96%68.55%65.63%
Average47.81%
-------------------------------------------------------------------------------------------
urchade/gliner_medium-v2.1ACE 200436.33%22.74%27.97%
ACE 200540.49%25.46%31.27%
AnatEM59.75%16.87%26.31%
Broad Tweet Corpus60.89%67.25%63.91%
CoNLL 200360.62%62.39%61.50%
FabNER27.72%12.24%16.98%
FindVehicle41.55%31.31%35.71%
GENIA_NER60.86%43.93%51.03%
HarveyNER23.20%23.16%23.18%
MultiNERD41.25%83.74%55.27%
Ontonotes20.58%34.11%25.67%
PolyglotNER31.32%64.22%42.11%
TweetNER744.52%33.42%38.18%
WikiANN en54.57%56.47%55.51%
WikiNeural57.60%81.57%67.52%
bc2gm67.98%33.45%44.84%
bc4chemd45.66%52.00%48.62%
bc5cdr72.20%58.12%64.40%
ncbi73.12%49.74%59.20%
Average44.17%
-------------------------------------------------------------------------------------------
EmergentMethods/glinernewsmedium-v2.1ACE 200439.21%17.24%23.95%
ACE 200539.82%16.48%23.31%
AnatEM57.67%23.57%33.46%
Broad Tweet Corpus69.52%65.94%67.69%
CoNLL 200368.26%58.45%62.97%
FabNER30.74%15.51%20.62%
FindVehicle40.33%37.37%38.79%
GENIA_NER53.70%47.73%50.54%
HarveyNER26.29%27.05%26.67%
MultiNERD56.78%81.96%67.08%
Ontonotes30.90%35.86%33.19%
PolyglotNER35.98%60.96%45.25%
TweetNER752.37%30.50%38.55%
WikiANN en53.81%52.29%53.04%
WikiNeural76.84%78.92%77.86%
bc2gm62.97%44.24%51.96%
bc4chemd44.90%65.56%53.30%
bc5cdr73.93%67.03%70.31%
ncbi69.53%60.82%64.88%
Average47.55%
-------------------------------------------------------------------------------------------
gliner-community/gliner_large-v2.5ACE 200431.64%22.81%26.51%
ACE 200532.10%22.56%26.49%
AnatEM53.64%27.82%36.64%
Broad Tweet Corpus61.93%76.85%68.59%
CoNLL 200362.83%67.71%65.18%
FabNER24.54%27.03%25.73%
FindVehicle40.71%56.24%47.23%
GENIA_NER43.56%52.56%47.64%
HarveyNER14.85%27.05%19.17%
MultiNERD38.04%89.17%53.33%
Ontonotes17.28%40.16%24.16%
PolyglotNER32.88%63.31%43.28%
TweetNER738.03%41.43%39.66%
WikiANN en57.80%60.54%59.14%
WikiNeural67.72%83.94%74.96%
bc2gm54.74%48.54%51.45%
bc4chemd40.20%58.66%47.71%
bc5cdr66.27%71.95%69.00%
ncbi68.09%61.55%64.65%
Average46.87%
-------------------------------------------------------------------------------------------
urchade/gliner_large-v2.1ACE 200437.52%25.38%30.28%
ACE 200539.02%29.00%33.27%
AnatEM52.86%13.64%21.68%
Broad Tweet Corpus51.44%71.73%59.91%
CoNLL 200354.86%64.98%59.49%
FabNER23.98%16.00%19.19%
FindVehicle47.04%57.53%51.76%
GENIA_NER58.10%49.98%53.74%
HarveyNER16.29%21.93%18.69%
MultiNERD34.09%85.43%48.74%
Ontonotes14.02%32.01%19.50%
PolyglotNER28.53%64.92%39.64%
TweetNER738.00%34.34%36.08%
WikiANN en51.69%59.92%55.50%
WikiNeural50.94%82.08%62.87%
bc2gm64.48%32.47%43.19%
bc4chemd48.66%57.52%52.72%
bc5cdr72.19%64.27%68.00%
ncbi69.54%52.25%59.67%
Average43.89%
-------------------------------------------------------------------------------------------
EmergenMethods/flinernewslarge-v2.1ACE 200443.19%18.39%25.80%
ACE 200545.24%21.20%28.87%
AnatEM61.51%21.66%32.04%
Broad Tweet Corpus69.38%68.99%69.18%
CoNLL 200361.47%52.18%56.45%
FabNER27.42%19.11%22.52%
FindVehicle46.30%62.48%53.19%
GENIA_NER54.13%54.02%54.07%
HarveyNER15.91%15.78%15.84%
MultiNERD53.73%79.07%63.98%
Ontonotes26.78%39.77%32.01%
PolyglotNER34.28%55.87%42.49%
TweetNER748.06%28.18%35.53%
WikiANN en53.66%51.34%52.47%
WikiNeural69.81%70.75%70.28%
bc2gm59.83%37.62%46.20%
bc4chemd46.24%69.15%55.42%
bc5cdr71.94%70.37%71.15%
ncbi70.17%61.44%65.52%
Average47.00%
-------------------------------------------------------------------------------------------

Other available models

ReleaseModel Name# of ParametersLanguageLicense
v0urchade/gliner_base<br>urchade/gliner_multi209M<br>209MEnglish<br>Multilingualcc-by-nc-4.0
v1urchade/gliner_small-v1<br>urchade/gliner_medium-v1<br>urchade/gliner_large-v1166M<br>209M<br>459MEnglish <br> English <br> Englishcc-by-nc-4.0
v2urchade/gliner_small-v2<br>urchade/gliner_medium-v2<br>urchade/gliner_large-v2166M<br>209M<br>459MEnglish <br> English <br> Englishapache-2.0
v2.1urchade/gliner_small-v2.1<br>urchade/gliner_medium-v2.1<br>urchade/gliner_large-v2.1 <br>urchade/gliner_multi-v2.1166M<br>209M<br>459M<br>209MEnglish <br> English <br> English <br> Multilingualapache-2.0

Model Authors

The model authors are:

Citation

bibtex
@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}
}

Source Model Repo

This model is derived from `gliner-community/gliner_small-v2.5`. See the upstream repository for the original safetensors weights, training data, and the full upstream model card.

ONNX Weights

ONNX weights added by SAS — converted from the upstream safetensors checkpoint.

File in this repo: model.onnx.

Using this Model with the SAS GLiText API

This repo is consumed by the SAS GLiText product. To download it onto a SAS GLiText server:

POST /v1/models/download?name=small

To download and load into memory in one step:

PUT /v1/models?name=small

Security Scan

Scanned with modelaudit v0.2.40 on 2026-04-27. 46/46 checks passed. Full results.

FileSizeSHA-256
model.onnx664.8 MB9cc27f025c07c318…
model_fp16.onnx333.0 MB9e14220fb41ebe6c…
model_int8.onnx196.8 MB791f20d6f34d4a4d…