GLiNER: small bidirectional model that outperforms ChatGPT on zero-shot open-type NER

November 14, 20237 min

Overview

Decision SnapshotReady For Pilot

GLiNER replaces generation with parallel span matching, reducing compute and latency while keeping or improving zero-shot accuracy versus large LLMs on evaluated benchmarks.

Citations6

Evidence Strength0.80

Confidence0.85

Risk Signals9

Trust Signals

Findings with numeric evidence: 5/5

Findings with evidence refs: 5/5

Results with explicit delta: 6/6

Reproducibility

Status: Code + data available

Open source: Partial

At A Glance

Cost impact: 80%

Production readiness: 70%

Novelty: 60%

Authors

Urchade Zaratiana, Nadi Tomeh, Pierre Holat, Thierry Charnois

Links

Abstract / PDF / Code / Data

Why It Matters For Business

GLiNER gives production-ready open-type NER with 50M–300M models that beat ChatGPT zero-shot, cutting cost and latency while keeping competitive accuracy.

Who Should Care

Summary TLDR

GLiNER is a compact NER system that treats open-type NER as matching entity-type prompts to span embeddings inside a bidirectional transformer. Trained on Pile-NER (≈45k texts, 240k spans, 13k types), GLiNER runs in parallel (not autoregressive), is cheap (50M–300M params), and achieves strong zero-shot F1s: GLiNER-L (0.3B) Avg F1 60.9 vs ChatGPT 47.5 on OOD benchmarks. It generalizes reasonably to many languages but struggles on noisy social media and some non-Latin languages (e.g., Bengali F1 0.89). Code and dataset pointers provided.

Problem Statement

Open-type NER (identify any entity type from text) is usually done with large autoregressive LLMs that are costly, slow (token-by-token), and hard to deploy. The paper asks: can a compact bidirectional model match or beat those LLMs in zero-shot open NER while being faster and cheaper?

Main Contribution

A new architecture (GLiNER) that encodes entity-type prompts and text together and matches entity embeddings to span embeddings in latent space.

Demonstration that compact BiLMs (50M–300M params) can outperform ChatGPT and some fine-tuned LLMs on zero-shot open NER benchmarks.

Key Findings

GLiNER-L (300M) achieves average F1 60.9 on the OOD NER benchmark, outperforming ChatGPT.

NumbersAvg F1 60.9 vs ChatGPT 47.5 (+13.4) — Table 1

Practical UseYou can replace costly LLM API calls with a 0.3B model and get materially better zero-shot NER on out-of-domain English text.

Evidence RefTable 1 (OOD NER Benchmark)

A very small variant (GLiNER-S, 50M) still beats ChatGPT on the same benchmark.

NumbersGLiNER-S avg F1 52.7 vs ChatGPT 47.5 (+5.2) — Table 1

Practical UseIf compute or latency are constrained, a 50M model can give better zero-shot NER than ChatGPT at much lower cost.

Evidence RefTable 1

Results

MetricValueBaselineDeltaSplit / DatasetEvidenceEvidence Ref
OOD NER average F160.9ChatGPT avg F1 47.5+13.4OOD NER Benchmark (Table 1)GLiNER-L avg F1 60.9 vs ChatGPT 47.5 (Table 1)Table 1
OOD NER average F1 (small)52.7ChatGPT avg F1 47.5+5.2OOD NER Benchmark (Table 1)GLiNER-S (50M) avg F1 52.7 (Table 1)Table 1

What To Try In 7 Days

Run GLiNER-S (50M) on a representative NER task to measure cost/latency vs your current LLM API.

Fine-tune GLiNER on a small in-domain sample and compare zero-shot vs few-shot gains.

Adopt 50% negative entity sampling and random entity dropping during finetuning to balance precision and recall.

Agent Features

Frameworks
Span representation + entity embedding matching
Architectures
Bidirectional transformer encoder (deBERTa / BiLM)

Optimization Features

Token Efficiency
Predicts spans in parallel so no token-by-token generation
Model Optimization
Use deBERTa-v3 backbone for best results
Training Optimization
Pretrain on Pile-NER for transferNegative entity sampling (≈50%)Random entity dropping (prompt drop) as regularization
Inference Optimization
Parallel span scoring (no autoregressive decoding)Greedy priority-queue decoding with O(n log n)

Reproducibility

Code AvailableYes
Data AvailableYes
Open Source StatusPartial
LicenseUnknown

Risks & Boundaries

Limitations

Weaker performance on noisy social media (tweet datasets) compared to some baselines.

Poor results on some non-Latin languages (e.g., Bengali F1 0.89) when only English fine-tuned.

When Not To Use

When you require best-in-class per-language supervised performance (use per-language finetuned models).

For highly noisy or colloquial text (tweets) without domain-specific finetuning.

Failure Modes

High false positives if trained without negative entity sampling (low precision).

High false negatives if negative sampling is too aggressive (high recall loss).

Core Entities

Models

GLiNER-S (50M)GLiNER-M (90M)GLiNER-L (0.3B)deBERTa-v3mdeBERTa-v3BERTRoBERTaALBERTELECTRAUniNERInstructUIEGoLLIEUSMChatGPTVicuna-7BVicuna-13B

Metrics

F1-score (exact span match)

Datasets

Pile-NER (Pile-derived; ~44.9k passages, 240k spans, 13k types)OOD NER Benchmark (CrossNER + MIT)20 NER datasets (diverse domains)Multiconer (Multilingual Complex NER)

Benchmarks

OOD NER Benchmark20 NER datasetsMulticoner (multilingual)

Context Entities

Models

LLM prompting baselines (ChatGPT, Vicuna)Large instruct tuned models (InstructUIE, GoLLIE)UniNER (LLaMa finetuned)

Datasets

Pile (source of Pile-NER)CrossNER, MIT datasets (components of OOD benchmark)