Instructions to use hivetrace/gliner-guard-uniencoder-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER
How to use hivetrace/gliner-guard-uniencoder-onnx with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("hivetrace/gliner-guard-uniencoder-onnx") - GLiNER2
How to use hivetrace/gliner-guard-uniencoder-onnx with GLiNER2:
from gliner2 import GLiNER2 model = GLiNER2.from_pretrained("hivetrace/gliner-guard-uniencoder-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
| { | |
| "max_width": 12, | |
| "special_tokens": { | |
| "[SEP_STRUCT]": 256000, | |
| "[SEP_TEXT]": 256001, | |
| "[P]": 256002, | |
| "[C]": 256003, | |
| "[E]": 256004, | |
| "[R]": 256005, | |
| "[L]": 256006, | |
| "[EXAMPLE]": 256007, | |
| "[OUTPUT]": 256008, | |
| "[DESCRIPTION]": 256009 | |
| }, | |
| "onnx_files": { | |
| "fp32": { | |
| "encoder": "onnx/encoder.onnx", | |
| "classifier": "onnx/classifier.onnx", | |
| "span_rep": "onnx/span_rep.onnx", | |
| "count_embed": "onnx/count_embed.onnx" | |
| }, | |
| "fp16": { | |
| "encoder": "onnx/encoder_fp16.onnx", | |
| "classifier": "onnx/classifier_fp16.onnx", | |
| "span_rep": "onnx/span_rep_fp16.onnx", | |
| "count_embed": "onnx/count_embed_fp16.onnx" | |
| }, | |
| "int8": { | |
| "encoder": "onnx/encoder_int8.onnx", | |
| "classifier": "onnx/classifier_int8.onnx", | |
| "span_rep": "onnx/span_rep_int8.onnx", | |
| "count_embed": "onnx/count_embed_int8.onnx" | |
| } | |
| } | |
| } |