Why did we open-source our inference engine? Read the post
← All Glossary Articles

GLiNER model guide: multi, medium, large, and the PII variant

GLiNER does named entity recognition for entity types you name at request time. No training, no fixed label set; pass “drug name” or “IBAN” or “aircraft model” as a string and it finds spans. Under the hood it is a bidirectional transformer that embeds your entity-type labels and candidate text spans into the same space and matches them (Zaratiana et al., arXiv 2311.08526, published at NAACL 2024; the paper’s zero-shot results beat ChatGPT on NER benchmarks). It has become the standard middle option between regex and an LLM for extraction, and it is an order of magnitude cheaper than the LLM.

The family has accumulated variants with different licenses and language coverage, and picking wrong costs you either compliance or quality. This page is the sorting guide.

The variants

ModelBackboneLanguagesLicenseServing cost
gliner_medium-v2.1DeBERTaEnglishApache 2.0$0.025 /1M tok
gliner_multi-v2.1mDeBERTa-v3-baseMultilingualApache 2.0see catalog
gliner_large-v2.1DeBERTaEnglishApache 2.0$0.037 /1M tok
gliner_multi_pii-v1fine-tuned from multi-v2.1en, fr, de, es, pt, itApache 2.0see catalog

The license point matters more than it looks: the v0 and v1 generations of GLiNER (gliner_base, gliner_multi, the small/medium/large v1 line) are CC-BY-NC-4.0, non-commercial. The v2.1 generation and the PII model are Apache 2.0. If a tutorial from 2024 pointed you at gliner_multi and you shipped it commercially, you have a license problem; move to gliner_multi-v2.1.

Bigger is not better here

The counterintuitive result from our benchmark suite (CoNLL-2003, zero-shot, F1):

ModelF1PrecisionRecall
gliner_medium-v2.10.6110.6010.622
gliner_multi-v2.10.6010.5740.630
gliner_large-v2.10.5480.4750.649

Medium beats large on zero-shot F1, and it is not a fluke of one metric; large trades a precision collapse (0.475) for a modest recall gain. For most extraction pipelines precision errors are the expensive ones, since false entities flow downstream and pollute whatever you feed them into. Our recommendation is blunt: start with medium for English, multi-v2.1 for anything else, and treat large as a recall-tuned specialist you adopt only after measuring on your own entity types.

Zero-shot scores in the 0.55 to 0.61 range deserve honest framing. A fine-tuned dedicated NER model beats GLiNER on a fixed label set it was trained for. GLiNER’s value is the labels nobody trained for; the moment your entity types are stable and high-volume enough to justify labeling data, fine-tuning wins on quality. Most extraction workloads never reach that moment.

The PII variant

gliner_multi_pii-v1 is multi-v2.1 fine-tuned on synthetic PII data to recognize 50-plus personal-data types: names, phone numbers, emails, credit cards, SSNs, passports, IBANs, CVVs, IP addresses, medical conditions, and the rest of the redaction checklist, across six languages (en, fr, de, es, pt, it).

It is the model behind redaction pipelines that cannot ship text to an external API, which is most redaction pipelines, since the text is by definition the sensitive part. Self-hosting is not a preference here; it is the requirement. Our MCP document tools use exactly this pattern (the redact_pii tool runs GLiNER locally through SIE’s /extract endpoint), described in the SIE MCP post.

One honest caveat: its CoNLL-2003 zero-shot score (0.536 F1) is below the general models, which is expected, since it is specialized away from general NER. Judge it on PII entity types, and run your own eval before trusting any redaction model with regulated data. F1 below 1.0 means leaks exist; decide your acceptable recall floor and measure against it.

Serving

All four variants run behind SIE’s /extract endpoint: text plus a list of entity-type strings in, typed spans out, batched across callers on shared GPU. gliner_medium-v2.1 posts 107 ms p50 latency and 8,900 tokens/sec throughput on an L4 at $0.025 per million tokens; at that price, extracting entities from a million short documents costs single-digit dollars. The extract docs cover setup, and each catalog page above carries the full benchmark tables.

For the comparison against spaCy pipelines and LLM extraction, including when each wins, see the entity extraction comparison (Tier 2 of this series).

Open source inference for agents

Open-source inference for the models behind your agents. Run it yourself, or let us run it for you.

Github 2.8K

Contact us

Tell us about your use case and we'll get back to you shortly.

Apply for an inference grant

Free capacity on our hosted cluster for selected projects. Tell us what you run and we reply by email.