← Back to models

GLiNER2.5

recognizerLabelsZero-shotRelationsClassificationJSON Extraction

Extract entities, relations, and structured records from text using a schema you define. The GLiNER2.5 Base checkpoint also supports classification and span attributes, so one model can turn documents into fields and graph edges.

antfly inference pull fastino/gliner2.5-base-v1:safetensors@54785d51df8d86a0d8f2eb212fec15871aad2c4d
By fastinoLicense: apache-2.0Hugging Face source

Technical Specs

Architecture
GLiNER2.5 / DeBERTa-v3-base
Parameters
194M
Max Tokens
4,096
English

About#

GLiNER2.5 is Antfly's recommended extraction model. You name the entity types, relation types, and record fields in the request schema, and it finds them in text without fine-tuning. One 194M-parameter checkpoint covers entities, relations, structured records, classification, and span attributes.

Choose it over GLiNER2 for longer passages: it encodes up to 4096 tokens per input, against 512 for GLiNER2. It is English only; GLiNER2.5 Multilingual is the multilingual counterpart. When the job is only to pick labels, GLiNER2.5-Decide is the dedicated classifier.

Capabilities#

  • Named entities with labels you choose per request
  • Typed relations between extracted entities
  • Structured records with named fields
  • Classification and span attributes
  • Up to 4096 tokens per input

Where it fits in Antfly#

GLiNER2.5 is the extractor for a graph index. Set it as the extractor that produces a graph index's artifact, and Antfly extracts entities and relations as documents are written, merges mentions of the same name into one entity, and stores the relations as edges you can traverse at query time.

See Build a Knowledge Graph from Your Docs for the full table setup.

Usage#

Pull and start Antfly#

antfly inference pull fastino/gliner2.5-base-v1:safetensors@54785d51df8d86a0d8f2eb212fec15871aad2c4d --tasks extract

antfly standalone

Extract entities with your own labels#

Supply the entity labels you want to extract in a version 2 schema. The same checkpoint supports relations, classifications, and structured extraction.

curl http://localhost:8080/ai/v1/extract \
-H 'Content-Type: application/json' \
-d '{
"model": "fastino/gliner2.5-base-v1",
"schema_version": 2,
"inputs": [
  {
    "content": "Maya Chen works at Antfly in San Francisco."
  }
],
"schema": {
  "entities": [
    "person",
    "organization",
    "location"
  ]
}
}'