SAVRN
Search Contact SAVRN

Open-weight model · Token classification

gliner_small-v2.5-onnx

by Yevhenii GG-QandV/gliner_small-v2.5-onnx

ONNX conversion of gliner-community/glinersmall-v2.5, dynamically quantised to INT8, packaged as a self-contained bundle for offline NER. This is a re-serialisation, not a fine-tune: the weights are the upstream ones.

Parameters
Context
Weights196.8 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads

Model Card

By Yevhenii, published under apache-2.0, revision 3edc77eb34bc.

ONNX conversion of gliner-community/glinersmall-v2.5, dynamically quantised to INT8, packaged as a self-contained bundle for offline NER. This is a re-serialisation, not a fine-tune: the weights are the upstream ones. Only the format (PyTorch → ONNX) and the precision (fp32 → INT8) are ours. The fp32 reference graph (model.onnx, sha256 5245733ccb2b75072cce0b4bbb14424988f92f9daf775d97bdf0de74be28df63) is not shipped — it is only needed to reproduce the INT8 graph. Its hash is recorded in NOTICE. The graph has six inputs, fed per span-encoded prompt: spanmask is bool (not int64) — the graph declares tensor(bool). The prompt follows the GLiNER label format, using the model's own special tokens…

Read Yevhenii's full model card

gliner_small-v2.5 — ONNX / INT8

ONNX conversion of gliner-community/gliner_small-v2.5, dynamically quantised to INT8, packaged as a self-contained bundle for offline NER.

This is a re-serialisation, not a fine-tune: the weights are the upstream ones. Only the format (PyTorch → ONNX) and the precision (fp32 → INT8) are ours.


Model summary

Base model gliner-community/gliner_small-v2.5
Encoder microsoft/deberta-v3-small (GLiNER uni-encoder span model)
Span mode markerV0, has_rnn: true
Hidden size 768
Vocabulary 128 003
max_width 12 (words per span)
max_len 768
Entity types open vocabulary — supplied in the prompt, not baked into the weights
Language multilingual
Upstream revision f227d3cd637bd4e6757ae143935316d062393341
License Apache-2.0 (see LICENSE)

Files

File Size (bytes) sha256
model_quantized.onnx 196 786 385 60f2f4da1ccad2230626ecc00cbbb18474b5415d3a9fddfca8078f52c2ab2930
tokenizer.json 8 332 739 08bb5853718f4a829fa9ce773d7984f7f3f6a7073fdc82a07a382675c5061ba6
tokenizer_config.json 531 54121ac6feec6b4d5bf85245a54c3c5b1ff05ef2318cf83e45340849b8981566
gliner_config.json 2 274 b327b6b5fe3cbefc4583e8cc50ecce3442f5c42855d0f5362dd51d8fa620d84f
LICENSE 11 358 Canonical Apache-2.0 text
NOTICE 1 110 Provenance record

The fp32 reference graph (model.onnx, sha256 5245733ccb2b75072cce0b4bbb14424988f92f9daf775d97bdf0de74be28df63) is not shipped — it is only needed to reproduce the INT8 graph. Its hash is recorded in NOTICE.


Quick start

from huggingface_hub import hf_hub_download

REPO = "GG-QandV/gliner_small-v2.5-onnx"
for f in ("model_quantized.onnx", "tokenizer.json", "tokenizer_config.json", "gliner_config.json"):
    hf_hub_download(REPO, filename=f, local_dir="models/gliner_small-v2.5-onnx")

The graph has six inputs, fed per span-encoded prompt:

input_ids, attention_mask, words_mask, text_lengths, span_idx, span_mask

span_mask is bool (not int64) — the graph declares tensor(bool). The prompt follows the GLiNER label format, using the model's own special tokens from gliner_config.json: <<ENT>> <type> … <<SEP>> <text words>. Word splitting is whitespace-based (words_splitter_type: whitespace), subtoken_pooling: first. Inference in ONNX Runtime on CPU; result is a logits tensor of shape (batch, words, max_width, num_types); entities are sigmoid(logits) ≥ threshold (the reference runtime uses ner_score_threshold = 0.5).


Export & quantisation

# dev-only, requires torch; the ONNX bundle is what ships, torch is never a runtime dependency
python scripts/export_gliner_onnx.py \
    --src      gliner_small_v25_hf \
    --out      gliner_small_v25_bundle \
    --revision f227d3cd637bd4e6757ae143935316d062393341
Exporter gliner 0.2.28 (export_to_onnx, opset 19)
Quantisation onnxruntime.quantization.quantize_dynamic, QuantType.QUInt8
Environment onnxruntime 1.25.0 · torch 2.13.0 · python 3.12.3
Determinism re-running reproduces both sha256 above

Evaluation

Measured on the source bundle during acceptance (ONNX Runtime CPU, 12 vCPU).

Parity with upstream

20 texts (10 ru + 10 uk), 6 entity types, identical session options on both paths, same model_quantized.onnx:

Path max |Δscore| Set differences
Upstream GLiNER vs this graph 1.192e-07 0 / 20

The port is numerically exact against the upstream implementation, at both ORT_ENABLE_ALL and ORT_DISABLE_ALL.

INT8 vs fp32 reference

32 texts, organisation/person/location/date/technology/product, threshold 0.5:

Configuration Found Matched fp32 Missing vs fp32 Extra vs fp32
INT8 ORT_ENABLE_ALL 74 68 7 6
INT8 ORT_DISABLE_ALL 74 68 7 6

The two optimisation levels produce identical entity sets (0 differences). All 7 vs-fp32 "misses" resolve to type reassignment (ORG → LOC, technology → product), span splits (Наталія Бондаренко → two tokens; 15 марта 2027 → date + year) or dropped low-score noise — no entity is genuinely lost. Large score deltas (up to 0.40) occur only on sub-threshold noise spans.

Latency & memory (INT8, 6 types, p50, 12 vCPU)

ORT level ~30 tok ~128 tok ~512 tok RSS (footprint)
ORT_DISABLE_ALL 107 ms 281 ms 1169 ms 240.8 MB
ORT_ENABLE_ALL 59 ms 134 ms 845 ms 419.8 MB

Both levels are numerically equivalent; the choice is purely memory vs speed.

Languages

10 PER/ORG/LOC sentences per language, threshold 0.5:

Language Found FP Language Found FP
fr 30/30 0 el 27/30 3
de 30/30 0 fi 26/30 0
es 28/30 2 tr 26/30 6
nl 28/30 2 it 25/30 2
pl 28/30 2 lt 25/30 0
ro 27/30 2 lv 25/30 0
sv 27/30 2 et 24/30 0
cs 27/30 2 pt 23/30 3
bg 27/30 2
sr 27/30 2
hu 27/30 1

All 19 languages score ≥ 0.77. Degradation tracks sub-token fragmentation (up to 2.9 sub-tokens per word in Turkish) rather than language distance.

Entity types (measured, not asserted)

Of the eleven candidate types tested, six were kept for production: person, organization, location, date, technology, product.

Type Behaviour
person, location reliable on the evaluated languages
technology, product, date reliable on domain text
organization low recall; organisation names frequently surface as location
decision, prohibition never fired on explicit decision/prohibition sentences — not offered as model types
artifact, concept, question removed — fired only on noise at low scores

Changing the type list changes the input prompt and therefore shifts scores; a type set must be validated as a whole.


Intended use & limitations

  • Intended: offline, open-vocabulary NER on European languages inside a local runtime.
  • Not intended: as a legal, medical or safety-critical extractor; as a source of ground truth.
  • Organisation recall is weak and organization counters should not be treated as authoritative.
  • This is an INT8 graph: expect small, threshold-adjacent differences from the fp32 reference.
  • Dates may be split into components; downstream code should normalise before storing them.

Licensing

Weights: Apache-2.0, inherited from gliner-community/gliner_small-v2.5 (the upstream model card declares Apache-2.0; the GLiNER project itself is Apache-2.0). The full license text is in LICENSE; provenance and all hashes are in NOTICE. No modification of the model itself was made — only ONNX serialisation and INT8 quantisation.

Citation

@inproceedings{zaratiana-etal-2024-gliner,
  title     = {{GLiNER}: Generalist Model for Named Entity Recognition using Bidirectional Transformer},
  author    = {Zaratiana, Urchade and Tomeh, Nadi and Holat, Pierre and Charnois, Thierry},
  booktitle = {Proceedings of NAACL 2024},
  year      = {2024}
}

Identity and Version

Repository
GG-QandV/gliner_small-v2.5-onnx
Publisher
Yevhenii
Task
Token classification
Modality
Text
Library
onnx
Parameters
Not stated by the source
Languages
ner
Revision
3edc77eb34bc7931bb1ecdd0c7bf227fcde7b373
First published
2026-09-18
Last updated
2026-09-18

Files and Weights

8 files, 205.1 MB in total. The weights are 1 file totalling 196.8 MB in onnx.

Weights1 file · 196.8 MB
Configuration1 file · 2.3 KB
Tokenizer2 files · 8.3 MB
Documentation3 files · 20.2 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model_quantized.onnxWeights196.8 MB 60f2f4da1cca
gliner_config.jsonConfiguration2.3 KB
LICENSEDocumentation11.4 KB
NOTICEDocumentation1.1 KB
README.mdDocumentation7.8 KB
.gitattributesRepository1.5 KB
tokenizer.jsonTokenizer8.3 MB
tokenizer_config.jsonTokenizer531 B

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
196.8 MB
Download from Yevhenii

Released by Yevhenii through its official repository on Hugging Face. Read the license.

Built From

  • Derived from gliner-community/gliner_small-v2.5
  • Quantized from gliner-community/gliner_small-v2.5
  • Trained on (disclosed) urchade/pile-mistral-v0.1

Memory Requirements

PrecisionWeights in memory
As published196.8 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About gliner_small-v2.5-onnx

Can I use gliner_small-v2.5-onnx commercially?

Yes. gliner_small-v2.5-onnx is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Token classification

stanford-deidentifier-base

Stanford AIMI

Stanford de-identifier was trained on a variety of radiology and biomedical documents with the goal of automatising the de-identification process while reaching satisfactory accuracy for use in production. Manuscript in-proceedings. These model weights are the recommended ones among all available deidentifier weights. This work was supported in part by the Medical Imaging and Data Resource Center (MIDRC), which is funded by the National Institute of Biomedical Imaging and Bioengineering (NIBIB) of the National Institutes of Health under contract 75N92020D00021 and through The Advanced Research Projects Agency for Health (ARPA-H)

Open weights mit 512 tokens transformers

Model · Token classification

bert-portuguese-ner

Luís Filipe Cunha

This model is a fine-tuned version of neuralmind/bert-base-portuguese-cased It achieves the following results on the evaluation set: This model was fine-tunned on token classification task (NER) on Portuguese archival documents. The annotated labels are: Date, Profession, Person, Place, Organization All the training and evaluation data is available at: http://ner.epl.di.uminho.pt/ The following hyperparameters were used during training: - learningrate: 2e-05 - trainbatchsize: 16 - evalbatchsize: 16 - lrschedulertype: linear - numepochs: 4 - Transformers 4.10.0.dev0 - Pytorch 1.9.0+cu111 - Datasets 1.10.2 - Tokenizers 0.10.3

Open weights mit 512 tokens transformers

Model · Token classification

privacy-filter-nemotron-GGUF

LocalAI-io

GGUF conversion of OpenMed/privacy-filter-nemotron, a fine-grained PII token-classification model — a fine-tune of openai/privacy-filter on the nvidia/Nemotron-PII dataset. It labels every token with a BIOES tag over 55 PII categories (221 classes) in a single forward pass, then decodes coherent spans with a constrained Viterbi procedure — so it can be served locally with no Python as the encoder/NER tier of a PII redactor. Where the base openai/privacy-filter covers 8 coarse categories, this fine-tune trades multilingual breadth for category depth: 55 fine-grained English categories (first/last name, government IDs, financial, healthcare, vehicle, digital, …). For the full model…

Open weights apache-2.0 gguf

Model · Token classification

punctuate-all

KREDOR

This is based on Oliver Guhr's work. The difference is that it is a finetuned xlm-roberta-base instead of an xlm-roberta-large and on twelve languages instead of four. The languages are: English, German, French, Spanish, Bulgarian, Italian, Polish, Dutch, Czech, Portugese, Slovak, Slovenian. precision recall f1-score support accuracy 0.98 84425503 macro avg 0.83 0.74 0.77 84425503 weighted avg 0.98 0.98 0.98 84425503

Open weights mit 514 tokens transformers

Model · Token classification

privacy-filter-multilingual-GGUF

LocalAI-io

GGUF conversion of OpenMed/privacy-filter-multilingual, a multilingual PII token-classification model (a fine-tune of openai/privacy-filter). It labels every token with a BIOES tag over 54 PII categories (217 classes) across 16 languages, so it can be served locally with no Python as the encoder/NER tier of a PII redactor. For the full model description, label space, evaluation, limitations, and citations, see the source model card — this card only covers the GGUF packaging and how to run it. This GGUF uses a custom architecture, openai-privacy-filter, that is not (yet) part of 1. privacy-filter.cpp (recommended) — a small standalone GGML engine for exactly this model family, on stock…

Open weights apache-2.0 gguf

Model · Token classification

unbiased-toxic-roberta-onnx

Protect AI

This model is a conversion of unitary/unbiased-toxic-roberta to ONNX format using the Optimum library. Trained models & code to predict toxic comments on 3 Jigsaw challenges: Toxic comment classification, Unintended Bias in Toxic comments, Multilingual toxic comment classification. Built by Laura Hanu at Unitary. The huggingface models currently give different results to the detoxify library (see issue here). All challenges have a toxicity label. The toxicity labels represent the aggregate ratings of up to 10 annotators according the following schema: - Very Toxic (a very hateful, aggressive, or disrespectful comment that is very likely to make you leave a discussion or give up on sharing…

Open weights apache-2.0 514 tokens transformers