Pretrained Models
GLiFormer v1 provides two DeBERTa-based checkpoints with the same five task heads. Use the GLiFormer framework to load them and supply labels or extraction schemas at inference time.
| Model | Parameters | Encoder layers | Embedding dimension | Configured max_len |
|---|---|---|---|---|
| GLiFormer Base v1 | 264.2M | 12 | 768 | 16,384 |
| GLiFormer Large v1 | 575.6M | 24 | 1024 | 8,192 |
Both checkpoints use the gliformer-layout model type and include NER, classification, joint relations, multilevel structuring, and embedding heads. Both configure a maximum span width of 12 words and 100 structuring record anchors.
Text and schema prompts share the encoder budget. max_len is a configuration setting, not a measured guarantee of quality for inputs of that length. The reported evaluations cover English text.
Backbone Details
| Checkpoint | Backbone | Total parameters |
|---|---|---|
| Base v1 | knowledgator/DeBERTa-base-10000-joint-uniform-merge | 264,196,614 |
| Large v1 | knowledgator/DeBERTa-large-joint-3000 | 575,637,510 |
Base v1 has fewer parameters and smaller embedding vectors. Large v1 has a deeper encoder. Compare task quality and resource use on your workload when choosing between them.
Loading a Checkpoint
import torch
from gliformer import GLiFormer
model = GLiFormer.from_pretrained(
"knowledgator/gliformer-base-v1",
load_tokenizer=True,
)
model = model.to("cuda" if torch.cuda.is_available() else "cpu").eval()
Use knowledgator/gliformer-large-v1 for Large v1. For a local copy, replace the model ID with the checkpoint directory.
Reported Evaluation Results
The following percentages are reported in the model cards, using the project's existing evaluation notes and manuscript. These evaluations were not rerun for the documentation. Historical reports do not record checkpoint hashes, so they cannot establish an exact binary match to the v1 releases.
| Task | Metric | Base v1 | Large v1 |
|---|---|---|---|
| NER: 26 datasets, 131,156 examples | Mean dataset strict entity F1 | 50.45 | 50.91 |
| CrossNER: 5 domains, 2,505 examples | Mean domain strict entity F1 | 65.10 | 64.35 |
| Classification: 13 datasets, 79,828 examples | Mean dataset macro-F1 | 72.36 | 75.03 |
| Multilevel structuring: 500 examples | Order-free, boundary-tolerant JSON F1 | 87.20 | 91.10 |
Dataset means weight datasets equally. Strict entity F1 requires both the span and entity type to match. Classification macro-F1 averages class F1 scores within each dataset. Structuring scores compare flattened JSON value paths after record alignment and limited boundary repairs; they are not exact JSON match scores.
The model cards also report joint relation extraction on DocRED, CrossRE, FewRel, and CoNLL04. Base and Large used different-sized relation subsets, so those scores are not a controlled comparison on identical examples. See the Base v1 model card and Large v1 model card for per-dataset results and reproduction details.
Capabilities and Limits
- Both models support labels and schemas supplied at inference time, including nested Pydantic schemas for structuring.
- Use
joint_relationsthroughinferencefor relation extraction. These checkpoints have no open relation head forpredict_relations. - There are no dedicated vision or audio heads in these checkpoints.
- Document-layout, multilingual, and embedding benchmark quality are not established by the reported text evaluations.
- Labels, domain, thresholds, span width, and record anchor capacity affect extraction results.
Continue with Usage for examples of every supported text task.