Intro
GLiFormer is a framework for multitask information extraction, built on GLiNER. It combines a shared encoder with task-specific heads to turn text into entities, classes, relations, structured records, and embeddings. You provide labels and extraction schemas at inference time.
Supported Tasks

| Task | Input schema | Output |
|---|---|---|
| Named entity recognition | Entity types, such as person and organization | Labeled mentions with character offsets and confidence scores |
| Text classification | Candidate classes or named groups of classes | Class labels and confidence scores |
| Joint relation extraction | Entity types and relation types | Relations connecting extracted entities |
| Structured extraction | Field names or nested Pydantic models | Flat or nested records as dictionaries and lists |
| Text embeddings | Texts to encode | Vectors for similarity and retrieval |
The figure illustrates the framework's task families. For the v1 checkpoints, relation extraction requires both entity and relation labels. See Usage for the exact input and output formats.
Model Architecture
GLiFormer encodes text and task prompts through a shared backbone. Task heads use those representations to score spans, classes, relations, and record fields. The structuring decoder assembles extracted fields and parent–child relationships into nested records.

The Base v1 and Large v1 checkpoints use a layout-aware DeBERTa encoder and include all five text task heads above. They accept new labels and schemas without changing the model weights; prediction quality depends on the task, domain, and schema wording.
Framework Architecture

The public GLiFormer factory selects a model wrapper from the checkpoint configuration. Each task has a processor for preparing inputs, a neural head for predictions, and a decoder for producing usable outputs.
The framework includes Text, Layout, Vision, Audio, and Omni variants. Available tasks depend on the heads and modalities trained in a checkpoint. Base v1 and Large v1 have no dedicated vision, audio, or open relation head. Their reported evaluations cover English text; document-layout and embedding benchmark quality are not established by those results.
Next Steps
- Installation: set up the framework and optional dependencies.
- Quickstart: load a model and extract your first entities.
- Usage: run individual tasks, nested schemas, and multitask inference.
- Pretrained Models: compare Base v1 and Large v1.
- Training: fine-tune a checkpoint on annotated examples.
Source code: Knowledgator/GLiFormer.