Knowledgator Engineering has released GLiFormer, a 575.6M-parameter encoder capable of extracting nested JSON structures without generating output tokens. The framework handles named-entity recognition, text classification, relation extraction, and embeddings in a single pass. Users pass extraction schemas at inference time, and two checkpoints are available on Hugging Face. GLiFormer Base v1 contains 264.2M parameters, while the Large v1 version holds 575.6M.
In this article
Both models are Apache 2.0 licensed. Installation requires running pip install gliformer, and the software executes on CPU or GPU hardware.
The Problem It Targets
Current extraction pipelines often chain separate models together. One system tags entities, another classifies documents, and a third rebuilds records. The research team argues these tasks share one core operation: encode the source, represent the requested concepts, then score their compatibility.
Large language models can emit nested JSON, but they generate field names, punctuation, and values token by token. GLiFormer removes output generation from that path.
How GLiFormer Works
The system builds on GLiNER and generalises its label matching through an ‘anchor.’ An anchor is the object each runtime label gets scored against. It can be a group vector for classification, an entity pair for relations, or a record slot.
The source text is encoded once. Multiple schemas for the same document then run as task-local groups over that shared encoding. Compute usage still grows with the number of groups, labels, and anchors.
For named-entity recognition, the head scores start, end, and inside evidence for every token and label pair. Independent sigmoid outputs allow nested mentions and shared boundaries to coexist.
Structuring runs in four stages:
- Ground field values as spans taken directly from the source text.
- Assign spans to unordered record slots, trained with Hungarian matching.
- Predict directed parent-child links, restricted to paths the schema allows.
- Assemble nested JSON with a deterministic decoder.
Values are source spans, so the model cannot invent text missing from the input. Span selection, record assignment, and hierarchy can still be wrong.
Checkpoints and Training
Both v1 checkpoints use the gliformer-layout model type with five heads: NER, classification, joint relations, multilevel structuring, and embeddings. Each configures a 12-word maximum span width and 100 record anchors. Full specs sit in the pretrained models docs.
| Spec | Base v1 | Large v1 |
|---|---|---|
| Parameters | 264.2M | 575.6M |
| Encoder layers | 12 | 24 |
| Embedding dimension | 768 | 1024 |
| Configured max_len | 16,384 | 8,192 |
GLiFormer-base starts from a DeBERTa backbone further pretrained on 100 billion tokens. The paper documents 1,357,671 examples for broad multitask training and 372,090 for task-focused post-training.
Benchmarks
All scores below are reported by Knowledgator.
- Nested JSON (500 examples): Large scores 91.10 F1 and Base 87.20. GPT-5.6-luna scores 91.96 and GPT-5-mini 82.56. The metric is order-free and boundary-tolerant, not exact JSON match.
- Classification (13 datasets): Large reaches 75.03 mean macro-F1 and Base 72.36. GLiNER2.5 scores 64.89, while GPT-5-mini leads at 79.79.
- CrossNER (5 domains): Base averages 65.10 F1 and Large 64.35. Gemma-4-31B-IT reaches 70.74.
- Relations (4 benchmarks): Large averages 21.33 micro-F1 and Base 18.94. GLiNER-Relex reaches 25.6 and Gemma-4-31B-IT 25.08.
On combined NER and classification aggregates, the paper reports Large beats Gemma-4-E4B with about 14 times fewer parameters.
Speed Without Token Generation
Knowledgator timed GLiFormer-base on 40 structuring documents at batch size one. Median latency was 69 ms on an NVIDIA RTX PRO 6000 Blackwell GPU in FP16. On an 8-thread AMD EPYC 9B45 CPU in FP32, it was 547 ms.
The key claim ‘up to 95.8 times faster’ figure is an analytical estimate, not a measured LLM run. It assumes prefill at 2,000 input tokens per second and generation at 60 output tokens per second. It excludes queueing, network delay, and hidden reasoning, and assumes nothing about accuracy parity.
Using It
The GitHub repo and model card show a short structuring call:
records = model.structure(
"Alice works at Acme.",
{"employee": ["name", "company"]},
)
print(records)
# {'employee': [{'name': 'Alice', 'company': 'Acme'}]}Nested Pydantic schemas work for multilevel records. One inference call can also run entities, classes, and structures together. Use joint_relations for relations, since the v1 checkpoints lack an open relation head.
What it means
Developers can now extract structured data without paying the latency cost of generating tokens. The model is faster on GPU, but CPU performance remains high for simple tasks. Accuracy on relation extraction still lags behind larger models and specialised tools.




