pypi / gliner
gliner
What changed in gliner 0.2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.
3 breaking16 new APIs and options2 performance13 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initgliner 0.234 changes
Breaking changes 3
Install the separate
onnxpackage when exporting to ONNX.Fails fast when class_token_index and vocab_size are inconsistent.
Loads from_pretrained at the target dtype.
New APIs and options 16
Install this extra for GPU ONNX Runtime.
Install this extra for CPU ONNX Runtime.
Install this extra for OpenVINO.
Select OpenVINO or ONNX Runtime when loading a model while retaining the familiar prediction API.
Pass label-to-description dictionaries to inference or serving; descriptions become prompts while predictions retain label names, and inputs can have separate dictionaries.
Export supported PyTorch models directly to OpenVINO IR for deployment.
Optionally weight positive spans by their width during training.
Request matched-label representations for downstream processing; vector outputs require native PyTorch inference.
Request entity and relation representations for downstream processing; vector outputs require native PyTorch inference.
Add span-level Dice loss as an additional training objective.
Added PolyLoRA support.
Added support for streaming inference.
Adds prompt compression.
Adds quantization support and restricts quantize= to int8.
Adds serving support.
Adds variant= to from_pretrained for selective half-precision downloads.
Performance 2
Adds compile support for an approximately 1.9x GPU speedup.
Adds low_cpu_mem_usage=True to from_pretrained for approximately 2x faster cold starts.
Fixes and other changes 13
Fix crashes and incorrect label assignments when batching texts with different label sets.
Propagate
local_files_onlythrough model initialization and save or load auxiliary tokenizers locally for improved offline loading.Fix best-checkpoint restoration and resuming training from native GLiNER checkpoints.
Fix training on negative examples that have no annotated entities.
Forward relation types and handle entity representations correctly during evaluation.
Preserve
warmup_ratiocompatibility with newer Transformers versions.Preserves CLS/SEP tokens for compatible tokenizers on Transformers v5.
Fixed issues related to Docker serving.
Fixed handling of the local_files_only flag.
Fixed model training and saving.
Fixed inference for multi-task models.
Fixed token_lengths leaking into the labels encoder.
Adds a proper GLiNER client and fixes bugs.