GLiNER2.5 multi-Decide (ONNX)
ONNX export of fastino/GLiNER2.5-multi-Decide
β Fastino's multilingual decision model: fastino/gliner2.5-multi-v1
fine-tuned for classification (intent, routing, sentiment, document type, priority). The
architecture, mDeBERTa-v3-base backbone (287M parameters), prompt and special tokens are those of
the base checkpoint, which is exported at
DanKau/g2.5-multi-v1-onnx.
Exported for SecuPi's unstructured AI service (SPAI), which runs it through ONNX Runtime from Java and serves it for classification only. Published so that service can fetch it without a PyTorch dependency; anyone else is welcome to use it under the same licence as the base model.
Files
| file | what it is |
|---|---|
onnx/encoder.onnx |
mDeBERTa-v3-base encoder over the schema prompt + text |
onnx/classifier.onnx |
classification head, Linear(768β1536) β ReLU β Linear(1536β1) |
onnx/boundary.onnx |
the boundary (entity) head, exported for completeness; SPAI does not use it for this checkpoint |
gliner2_config.json, config.json |
special-token ids (250102β250111) and ONNX file map |
tokenizer.json, tokenizer_config.json |
tokenizer |
How to run it
( [P] category ( [L] label β¦ ) ) [SEP_TEXT] <words, each lowercased>
- Split the text into words exactly as gliner2's
WhitespaceTokenSplitterdoes (gliner2 β₯ 2.1.0: Unicode word characters plus combining marks and ZWNJ/ZWJ) and lowercase each word; tokenize each word without special tokens. - Run
encoder.onnxover the prompt. - Run
classifier.onnxon the hidden states at the[L]positions β one call for the whole label set (hidden_state [n,768] -> logit [n,1]). Softmax over the logits for a single-label task, sigmoid for multi-label.
Fastino's examples name the task (intent, document_type, β¦); the word after [P] is part of the
prompt. SPAI uses category, and its fixtures are generated the same way.
Verified against native PyTorch
The boundary head, as for the base export: identical candidate sets (0 missing, 0 extra), traced on 63 words Γ 6 labels and checked at 9Γ3, 26Γ4 and 13Γ2.
| check | max|diff| |
|---|---|
| sort/eye patch vs unpatched PyTorch | 1.91e-06 |
| ONNX vs PyTorch, traced sample | 9.54e-06 |
| ONNX vs PyTorch, other shapes | β€ 7.63e-06 |
The classification head is replayed from Java against native-PyTorch fixtures on ten languages
(English, Spanish, German, Russian, Hebrew, French, Arabic, Hindi, Greek, Turkish) by SPAI's
MultilingualFixtureTest: same label and probability within 0.05 on every case.
Provenance
Exported from fastino/GLiNER2.5-multi-Decide at revision
e173bca1f0c4217d7a55b3b0c705d5ece8a0218d, with gliner2==2.1.0, transformers==5.19.0,
torch==2.14.1, opset 18.
Licence
Apache 2.0, inherited from the base model. This repository redistributes the same weights in a different serialisation; all credit for the model belongs to Fastino.
- Downloads last month
- 231
Model tree for DanKau/gliner2.5-multi-decide-onnx
Base model
fastino/gliner2.5-multi-v1