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 tokenizer_config.json from onnx-community/GLiNER2.5-Decide-ONNX: direct link, hf CLI and curl.
- Browser
- Download file 3.36 kB
-
https://huggingface.co/onnx-community/GLiNER2.5-Decide-ONNX/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://onnx-community/GLiNER2.5-Decide-ONNX/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/onnx-community/GLiNER2.5-Decide-ONNX/resolve/main/tokenizer_config.json
3.36 kB
| { | |
| "add_prefix_space": true, | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "[PAD]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "[CLS]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "[SEP]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "3": { | |
| "content": "[UNK]", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "128000": { | |
| "content": "[MASK]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "128001": { | |
| "content": "[SEP_STRUCT]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "128002": { | |
| "content": "[SEP_TEXT]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "128003": { | |
| "content": "[P]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "128004": { | |
| "content": "[C]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "128005": { | |
| "content": "[E]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "128006": { | |
| "content": "[R]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "128007": { | |
| "content": "[L]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "128008": { | |
| "content": "[EXAMPLE]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "128009": { | |
| "content": "[OUTPUT]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "128010": { | |
| "content": "[DESCRIPTION]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| } | |
| }, | |
| "additional_special_tokens": [ | |
| "[SEP_STRUCT]", | |
| "[SEP_TEXT]", | |
| "[P]", | |
| "[C]", | |
| "[E]", | |
| "[R]", | |
| "[L]", | |
| "[EXAMPLE]", | |
| "[OUTPUT]", | |
| "[DESCRIPTION]" | |
| ], | |
| "backend": "tokenizers", | |
| "bos_token": "[CLS]", | |
| "clean_up_tokenization_spaces": false, | |
| "cls_token": "[CLS]", | |
| "do_lower_case": false, | |
| "eos_token": "[SEP]", | |
| "extra_special_tokens": {}, | |
| "is_local": false, | |
| "local_files_only": false, | |
| "mask_token": "[MASK]", | |
| "model_max_length": 1000000000000000019884624838656, | |
| "pad_token": "[PAD]", | |
| "sep_token": "[SEP]", | |
| "sp_model_kwargs": {}, | |
| "split_by_punct": false, | |
| "tokenizer_class": "DebertaV2TokenizerFast", | |
| "unk_id": 3, | |
| "unk_token": "[UNK]", | |
| "vocab_type": "spm" | |
| } | |