Skip to content

v0.2.29

Latest

Choose a tag to compare

@Ingvarstep Ingvarstep released this 08 Sep 12:40
· 3 commits to main since this release

GLiNER v0.2.29 — OpenVINO, label descriptions, and contextual embeddings

This release expands deployment options, adds richer inference outputs, and fixes issues across batching, fine-tuning, evaluation, and offline model loading.

New capabilities

  • OpenVINO support: Export supported PyTorch models directly to OpenVINO IR and select OpenVINO or ONNX Runtime through GLiNER.from_pretrained, while retaining GLiNER’s familiar prediction API. [#385](#385)
  • Label descriptions: Pass a {label: description} dictionary to inference or serving. Descriptions become model prompts, while predictions retain your label names. Separate label dictionaries per input text are also supported. [#386](#386)
  • Contextual embeddings: Request entity, relation, and matched-label representations using return_vectors=True and return_label_vectors=True for downstream processing. [#386](https://github.com/urchade/GLiNER/pull/386/files)
  • Additional training objectives: Add span-level Dice loss and optional weighting of positive spans by their width. [#361](#361)

Fixes and improvements

  • Fix crashes and incorrect label assignments when batching texts with different label sets. [#384](#384)
  • Fix training on negative examples with no annotated entities. [#387](#387)
  • Fix best-checkpoint restoration and resuming training from native GLiNER checkpoints. [#389](#389)
  • Fix relation-extraction evaluation by forwarding relation types and handling entity representations correctly. [#380](#380)
  • Improve offline loading by propagating local_files_only through model initialization and saving/loading auxiliary tokenizers locally. [#391](#391)
  • Separate optional runtime dependencies and preserve warmup_ratio compatibility with newer Transformers versions. [#388](#388)
  • Refresh fine-tuning and ONNX conversion notebooks. [#390](#390)

Upgrade notes

  • Install gliner[onnx] for CPU ONNX Runtime, gliner[gpu] for GPU ONNX Runtime, or gliner[openvino] for OpenVINO. Install the separate onnx package when exporting to ONNX.
  • Vector outputs require native PyTorch inference; ONNX, OpenVINO, and stateful streaming sessions do not currently return them.
  • OpenVINO and ONNX export support span/token uni-encoders, bi-encoders, and relation-extraction models. Generative-decoder and streaming-span architectures require PyTorch.
  • Descriptive prompts are intended for models trained to use descriptive labels.