Instructions to use nicolasembleton/gliner2.5-multi-v1-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER2
How to use nicolasembleton/gliner2.5-multi-v1-onnx with GLiNER2:
from gliner2 import GLiNER2 model = GLiNER2.from_pretrained("nicolasembleton/gliner2.5-multi-v1-onnx") # Extract entities text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday." result = extractor.extract_entities(text, ["company", "person", "product", "location"]) print(result) - Notebooks
- Google Colab
- Kaggle
gliner2.5-multi-v1-onnx
ONNX export of fastino/gliner2.5-multi-v1 (GLiNER 2.5
BoundaryExtractor) for onnxruntime-web / WebGPU. Revision 4: same fused
encoder as revision 3, plus [R] role-state gather and a separate relation
scorer graph.
One encoder pass. JointIE beam search stays in JavaScript.
Host packing and decode: Pastel-Org/gliner2.5-onnx-webgpu (live: gliner25-onnx-webgpu.pages.dev).
Files
| File | Role |
|---|---|
onnx/model.onnx |
Encoder + entity pair path + classifier + cached states |
onnx/heads.onnx |
SparseRelationScorer only (no encoder). Directional 2H + biaffine. |
model.onnx inputs
| Name | Shape | Dtype |
|---|---|---|
| input_ids | [B, T] | int64 |
| attention_mask | [B, T] | int64 |
| text_word_indices | [B, L] | int64 |
| text_word_mask | [B, L] | float32 |
| query_marker_indices | [B, Q] | int64 |
| query_marker_mask | [B, Q] | float32 |
| cls_marker_indices | [B, K] | int64 |
| cls_marker_mask | [B, K] | float32 |
| rel_marker_indices | [B, R] | int64 |
| rel_marker_mask | [B, R] | float32 |
Unused heads: pass length-1 indices with mask 0.
model.onnx outputs
| Name | Shape |
|---|---|
| start_logits / end_logits | [B, Q, L+1] |
| pair_indices / pair_logits / pair_valid | C=192 |
| cls_logits | [B, K] |
| text_states | [B, L, H] |
| query_states | [B, Q, H] |
| rel_role_states | [B, R, H] |
Host concatenates each [R] head + [R] tail pair into a 2H relation state.
heads.onnx
Inputs: text_states, rel_states [B, Rel, 2H], head_start/end, tail_start/end,
rel_index, pair_mask (all pair tensors [B, P]). Output: rel_logits [B, P].
sigmoid(rel_logits) then JS beam (width 16). Schema constraints stay on the host.
Still not in ONNX
Neural RecordHead instance formation. Repeated JSON objects on the demo are
host assignment (i-th mention of each field). Constrained implies/excludes
for classification is JS when used.
Credits
- Base checkpoints: Fastino, Apache-2.0.
- ONNX export + JS host: Pastel-Cloud OÜ.
Model tree for nicolasembleton/gliner2.5-multi-v1-onnx
Base model
fastino/gliner2.5-multi-v1