Stop Span Enumeration Delays: GLiNER2.5 Speeds Up Info Extraction

Information extraction teams constantly balance cost and capability. Small encoder models are cheap to run but they cannot handle long entities or complex schemas because they enumerate every possible span up to a fixed width. Large language models give flexibility but charging per document makes them expensive at scale. Fastino’s GLiNER2.5 removes the span enumeration step. Instead of scoring every start‑end pair against a width grid the model predicts start and end scores over token boundaries and inside scores over tokens. A sparse proposal stage picks promising boundaries pairs them without distance limits and a reranking head scores each candidate. This keeps computation linear in sequence length for a fixed schema eliminates the maximum entity width and allows a 4 096‑word context.

The practical consequences are immediate. Users get unlimited span length – a forty‑word indemnity clause costs the same to locate as a two‑word name. Joint entity and relation extraction is now possible declaring entity types typed relations and structural rules lets a beam search build a globally consistent graph with infeasible combinations ruled out by construction. Constrained classification across tasks stops contradictory labels from appearing and span attributes such as sentiment or dosage are decoded together with the entity in the same forward pass.

Deployment is straightforward. Three checkpoints 74 M 194 M and 287 M parameters are available on Hugging Face under Apache 2.0. With Python 3.10+ and the command pip install gliner2[local] the models run on CPU CUDA or Apple MPS so even a two‑person team can start extraction without a GPU budget. Larger organizations obtain a privately hosted fine‑tunable alternative to per‑token LLM extraction preserving data privacy while keeping inference cost linear.

The multilingual checkpoint scores 56.17 macro F1 on sixteen zero‑shot benchmarks a 24.75‑point gain on XNLI over its predecessor showing that the new approach does not sacrifice accuracy.

#AI #Product #NLP #MachineLearning #DataExtraction #LLM