Skip to main content

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.

ModelParametersEncoder layersEmbedding dimensionConfigured max_len
GLiFormer Base v1264.2M1276816,384
GLiFormer Large v1575.6M2410248,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

CheckpointBackboneTotal parameters
Base v1knowledgator/DeBERTa-base-10000-joint-uniform-merge264,196,614
Large v1knowledgator/DeBERTa-large-joint-3000575,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.

TaskMetricBase v1Large v1
NER: 26 datasets, 131,156 examplesMean dataset strict entity F150.4550.91
CrossNER: 5 domains, 2,505 examplesMean domain strict entity F165.1064.35
Classification: 13 datasets, 79,828 examplesMean dataset macro-F172.3675.03
Multilevel structuring: 500 examplesOrder-free, boundary-tolerant JSON F187.2091.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_relations through inference for relation extraction. These checkpoints have no open relation head for predict_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.