Text Classification
Transformers.js
ONNX
GLiNER2
English
deberta-v2
feature-extraction
webgpu
typed-decisions
open-jev
system-one
Instructions to use onnx-community/GLiNER2.5-Decide-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use onnx-community/GLiNER2.5-Decide-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'onnx-community/GLiNER2.5-Decide-ONNX'); - GLiNER2
How to use onnx-community/GLiNER2.5-Decide-ONNX with GLiNER2:
from gliner2 import GLiNER2 model = GLiNER2.from_pretrained("onnx-community/GLiNER2.5-Decide-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
Download config.json from onnx-community/GLiNER2.5-Decide-ONNX: direct link, hf CLI and curl.
- Browser
- Download file 1.69 kB
-
https://huggingface.co/onnx-community/GLiNER2.5-Decide-ONNX/resolve/main/config.json
- Command line
-
hf download hf://onnx-community/GLiNER2.5-Decide-ONNX/config.json
-
curl -L -o config.json https://huggingface.co/onnx-community/GLiNER2.5-Decide-ONNX/resolve/main/config.json
1.69 kB
| { | |
| "_attn_implementation_autoset": true, | |
| "attention_probs_dropout_prob": 0.1, | |
| "dtype": "float32", | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 1024, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 4096, | |
| "layer_norm_eps": 1e-07, | |
| "legacy": true, | |
| "max_position_embeddings": 512, | |
| "max_relative_positions": -1, | |
| "model_type": "deberta-v2", | |
| "norm_rel_ebd": "layer_norm", | |
| "num_attention_heads": 16, | |
| "num_hidden_layers": 24, | |
| "pad_token_id": 0, | |
| "pooler_dropout": 0, | |
| "pooler_hidden_act": "gelu", | |
| "pooler_hidden_size": 1024, | |
| "pos_att_type": [ | |
| "p2c", | |
| "c2p" | |
| ], | |
| "position_biased_input": false, | |
| "position_buckets": 256, | |
| "relative_attention": true, | |
| "share_att_key": true, | |
| "transformers_version": "4.57.6", | |
| "type_vocab_size": 0, | |
| "vocab_size": 128011, | |
| "architectures": [ | |
| "DebertaV2Model" | |
| ], | |
| "gliner2": { | |
| "description": "GLiNER2.5-Decide classification path: schema-conditioned DeBERTa-v3-large, one logit per [L] label marker from a 1024-2048-1 MLP head.", | |
| "special_tokens": [ | |
| "[SEP_STRUCT]", | |
| "[SEP_TEXT]", | |
| "[P]", | |
| "[C]", | |
| "[E]", | |
| "[R]", | |
| "[L]", | |
| "[EXAMPLE]", | |
| "[OUTPUT]", | |
| "[DESCRIPTION]" | |
| ], | |
| "max_len": 512, | |
| "temperature": 1.0, | |
| "inputs": "input_ids, attention_mask, marker_positions (index of each [L] token)", | |
| "output": "logits (batch, markers); softmax within each question's markers", | |
| "source": "fastino/GLiNER2.5-Decide" | |
| }, | |
| "transformers.js_config": { | |
| "use_external_data_format": { | |
| "model.onnx": 1, | |
| "model_fp16.onnx": 1, | |
| "model_q4.onnx": 1, | |
| "model_q4f16.onnx": 1 | |
| }, | |
| "dtype": "fp16" | |
| } | |
| } |