# What changed in gliner

> 34 changes in gliner 0.2 from its official release notes, upgrade guides and advisories: 3 breaking, 16 new APIs and options. Each one cited. Sources checked 2026-10-24. HTML: https://unstale.sh/pypi/gliner/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## gliner 0.2

### Breaking changes

- Install the separate `onnx` package when exporting to ONNX. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Fails fast when class_token_index and vocab_size are inconsistent. (0.2.28) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.28)
- Loads from_pretrained at the target dtype. (0.2.27) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.27)

### New APIs and options

- Install this extra for GPU ONNX Runtime. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Install this extra for CPU ONNX Runtime. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Install this extra for OpenVINO. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Select OpenVINO or ONNX Runtime when loading a model while retaining the familiar prediction API. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- 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.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Export supported PyTorch models directly to OpenVINO IR for deployment. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Optionally weight positive spans by their width during training. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Request matched-label representations for downstream processing; vector outputs require native PyTorch inference. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Request entity and relation representations for downstream processing; vector outputs require native PyTorch inference. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Add span-level Dice loss as an additional training objective. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Added PolyLoRA support. (0.2.28) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.28)
- Added support for streaming inference. (0.2.28) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.28)
- Adds prompt compression. (0.2.27) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.27)
- Adds quantization support and restricts quantize= to int8. (0.2.27) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.27)
- Adds serving support. (0.2.27) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.27)
- Adds variant= to from_pretrained for selective half-precision downloads. (0.2.27) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.27)

### Performance

- Adds compile support for an approximately 1.9x GPU speedup. (0.2.27) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.27)
- Adds low_cpu_mem_usage=True to from_pretrained for approximately 2x faster cold starts. (0.2.27) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.27)

### Fixes and other changes

- Fix crashes and incorrect label assignments when batching texts with different label sets. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Propagate `local_files_only` through model initialization and save or load auxiliary tokenizers locally for improved offline loading. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Fix best-checkpoint restoration and resuming training from native GLiNER checkpoints. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Fix training on negative examples that have no annotated entities. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Forward relation types and handle entity representations correctly during evaluation. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Preserve `warmup_ratio` compatibility with newer Transformers versions. (0.2.29) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.29)
- Preserves CLS/SEP tokens for compatible tokenizers on Transformers v5. (0.2.28) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.28)
- Fixed issues related to Docker serving. (0.2.28) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.28)
- Fixed handling of the local_files_only flag. (0.2.28) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.28)
- Fixed model training and saving. (0.2.28) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.28)
- Fixed inference for multi-task models. (0.2.28) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.28)
- Fixed token_lengths leaking into the labels encoder. (0.2.28) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.28)
- Adds a proper GLiNER client and fixes bugs. (0.2.27) — [release notes](https://github.com/urchade/GLiNER/releases/tag/v0.2.27)
