gliner_medium-v2.5-onnx

ONNX export of gliner-community/gliner_medium-v2.5.

The weights are upstream's and unmodified โ€” only the conversion to ONNX is ours. Upstream publishes no ONNX build for this checkpoint, which is the entire reason this repo exists.

Exported with the gliner package's own export_to_onnx rather than a hand-rolled torch.onnx.export, so the graph signature is the one the library itself produces.

Files

tokenizer.json
onnx/model_fp16.onnx   419 MB  <- recommended
onnx/model.onnx        836 MB  float32

Both are opset 14 with dynamic batch and sequence axes, and both take int64 inputs and emit float32 logits โ€” the fp16 build casts its outputs back at the graph boundary, so it is a drop-in replacement for the f32 one.

The fp16 build is exported in half precision from PyTorch rather than converted after the fact. Post-hoc conversion with onnxconverter-common does not work on this graph: it produces a Cast with a stale declared output type, a Mul handed one f16 and one f32 operand, and finally a failure inside an If subgraph it does not recurse into. This export contains control flow, so that last one is structural.

Measured equivalent to the f32 build on a 15-entity fixture: same spans, same labels, scores agreeing to ~1e-4.

Graph signature

inputs : input_ids, attention_mask, words_mask, text_lengths,
         span_idx, span_mask
outputs: logits

Using it from Kaman

KAMAN_GLINER_REPO=Yoctottainc/gliner_medium-v2.5-onnx
KAMAN_GLINER_ONNX_FILE=model_fp16.onnx

No code change: kaman-ner-runtime-ort resolves the repo at load time and caches under ~/.cache/kaman/models/<repo>/.

Licence

Apache-2.0, inherited from the base model. See gliner-community/gliner_medium-v2.5 for the model card, training data and intended use.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Yoctottainc/gliner_medium-v2.5-onnx

Quantized
(1)
this model