GLiFormer 0.4B v1.5 - the most versatile system one model
[Image blocked: The model supports many different tasks]
What is GLiFormer
GLiFormer is a family of encoder models for information
extraction and decision tasks. One shared encoder reads the text together with what to look for, and lightweight task heads
produce the outputs: named entities, classes, relations, structured records (including categorical, number and
date fields, nested records, and fields calculated from numbers in the text), text edits, and text embeddings.
Entity types, class labels, relation types and record schemas are given at inference time, so no retraining is
needed for new labels or schemas, and several tasks can run in one pass.
knowledgator/gliformer-0.4b-v1.5 uses the DeBERTa encoder (knowledgator/DeBERTa-large-joint-3000). It is a text-only checkpoint (no layout, vision, or audio heads).
Size: 0.4B refers to the backbone (434M parameters); with the task heads the checkpoint
has 794M parameters in total.
Usage
Or install the GLiFormer framework in a Python 3.10+ environment from the source:
The following examples reuse model:
For a local copy, replace the model ID with the checkpoint directory.
Named entity recognition
Each entity includes text, label, start, end, and score.
Offsets are character positions with an exclusive end.
Pass a list of texts and batch_size=8 for batched extraction.
Text classification
Named groups are also supported, for example
{"sentiment": ["positive", "negative"], "topic": ["product", "support"]}.
Joint relation extraction
Structured extraction
Fields can be typed. A categorical field ("$type": "class") picks from the given $options instead of
copying text from the input ("$multi": False keeps a single label); date and number fields return
parsed values:
Without "$multi": False, a categorical field returns every option that applies, as a list.
Nested Pydantic schemas support multilevel records:
Calculated fields
A field marked "$calculate": true is computed by a small program over numbers read from the text
(copy, add, subtract, multiply, divide, ...). The optional prompt states the question:
Text editing
Multiple tasks in one call
Text embeddings
Evaluation results
Dataset means weight datasets equally. NER requires both the entity span and type to match; NER and
relation extraction use a 0.5 threshold. Classification macro-F1 averages class F1 scores within each dataset.
Structuring compares flattened JSON value paths; "order-free, boundary-tolerant" aligns records without
requiring their original order and allows the evaluator's limited boundary repairs; it is not exact JSON match.
Most evaluated datasets contributed 30-200 training-split examples (never test examples) to the final
fine-tuning data; β marks datasets with none, whose scores are zero-shot.
Comparison with other models
All three GLiFormer v1.5 checkpoints are listed, with this model in bold. GLiNER, NLI,
LLM and GLiFormer v1 numbers are published results from the
GLiFormer paper (Tables 3-5); Params are total parameters,
NR means not reported. Rows are sorted by average.
CrossNER, strict entity F1. The Perplexity Decider models were run through the OpenRouter Extractions
API on the same test examples as the GLiFormer v1.5 rows (CrossNER politics and science: the same 500-example
samples), with one list field per entity type and overlapping spans resolved by confidence. Paper baselines
use the full test sets. CrossNER literature and music are zero-shot for GLiFormer v1.5 (see β ).
Text classification, mean macro-F1 over the same 13 datasets.
Relation extraction, micro-F1. Averages cover only the three datasets evaluated here (the paper also
reports CoNLL04). Baseline sample sizes and protocols follow their sources and may differ from the 500-document
runs below, so treat this table as indicative. β uses gold entities.
Named entity recognition
Text classification
Micro-F1 equals accuracy in these single-label runs. cap_sotu has no test split; its train split is scored.
Joint relation extraction
Runs use predicted entities, 500 documents per dataset (DocRED dev, CrossRE test, FewRel validation).
Gold counts are relation instances, not documents.
Structured extraction
Multilevel set by gold JSON depth:
Calculation
Financial question answering over tables and text: a 595-question sample of the FinQA, ConvFinQA and TAT-QA
test splits. "Exact" requires the computed value to match the gold answer; "program exact" requires the
predicted operation sequence to match.
Citation
If you use this model, please cite the GLiFormer paper
(knowledgator.com/research/gliformer):