unstale

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 init

@unstale/cli 0.2.5 on npm

gliner 0.234 changes

Breaking changes 3

  • Install the separate onnx package when exporting to ONNX.

    0.2.29release notes

  • Fails fast when class_token_index and vocab_size are inconsistent.

    0.2.28release notes

  • Loads from_pretrained at the target dtype.

    0.2.27release notes

New APIs and options 16

  • Install this extra for GPU ONNX Runtime.

    0.2.29release notes

  • Install this extra for CPU ONNX Runtime.

    0.2.29release notes

  • Install this extra for OpenVINO.

    0.2.29release notes

  • Select OpenVINO or ONNX Runtime when loading a model while retaining the familiar prediction API.

    0.2.29release notes

  • Pass label-to-description dictionaries to inference or serving; descriptions become prompts while predictions retain label names, and inputs can have separate dictionaries.

    0.2.29release notes

  • Export supported PyTorch models directly to OpenVINO IR for deployment.

    0.2.29release notes

  • Optionally weight positive spans by their width during training.

    0.2.29release notes

  • Request matched-label representations for downstream processing; vector outputs require native PyTorch inference.

    0.2.29release notes

  • Request entity and relation representations for downstream processing; vector outputs require native PyTorch inference.

    0.2.29release notes

  • Add span-level Dice loss as an additional training objective.

    0.2.29release notes

  • Added PolyLoRA support.

    0.2.28release notes

  • Added support for streaming inference.

    0.2.28release notes

  • Adds prompt compression.

    0.2.27release notes

  • Adds quantization support and restricts quantize= to int8.

    0.2.27release notes

  • Adds serving support.

    0.2.27release notes

  • Adds variant= to from_pretrained for selective half-precision downloads.

    0.2.27release notes

Performance 2

  • Adds compile support for an approximately 1.9x GPU speedup.

    0.2.27release notes

  • Adds low_cpu_mem_usage=True to from_pretrained for approximately 2x faster cold starts.

    0.2.27release notes

Fixes and other changes 13

  • Fix crashes and incorrect label assignments when batching texts with different label sets.

    0.2.29release notes

  • Propagate local_files_only through model initialization and save or load auxiliary tokenizers locally for improved offline loading.

    0.2.29release notes

  • Fix best-checkpoint restoration and resuming training from native GLiNER checkpoints.

    0.2.29release notes

  • Fix training on negative examples that have no annotated entities.

    0.2.29release notes

  • Forward relation types and handle entity representations correctly during evaluation.

    0.2.29release notes

  • Preserve warmup_ratio compatibility with newer Transformers versions.

    0.2.29release notes

  • Preserves CLS/SEP tokens for compatible tokenizers on Transformers v5.

    0.2.28release notes

  • Fixed issues related to Docker serving.

    0.2.28release notes

  • Fixed handling of the local_files_only flag.

    0.2.28release notes

  • Fixed model training and saving.

    0.2.28release notes

  • Fixed inference for multi-task models.

    0.2.28release notes

  • Fixed token_lengths leaking into the labels encoder.

    0.2.28release notes

  • Adds a proper GLiNER client and fixes bugs.

    0.2.27release notes