Instructions to use mircq/GLINER-INT8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER
How to use mircq/GLINER-INT8 with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("mircq/GLINER-INT8") text = "Cristiano Ronaldo dos Santos Aveiro was born on 5 February 1985 in Funchal, Madeira, Portugal." labels = ["person", "date", "location"] entities = model.predict_entities(text, labels) for entity in entities: print(entity["text"], "=>", entity["label"]) - GLiNER2
How to use mircq/GLINER-INT8 with GLiNER2:
from gliner2 import AutoExtractor extractor = AutoExtractor.from_pretrained("mircq/GLINER-INT8") # 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 USAGE.md from mircq/GLINER-INT8: direct link, hf CLI and curl.
- Browser
- Download file 941 Bytes
-
https://huggingface.co/mircq/GLINER-INT8/resolve/main/USAGE.md
- Command line
-
hf download hf://mircq/GLINER-INT8/USAGE.md
-
curl -L -o USAGE.md https://huggingface.co/mircq/GLINER-INT8/resolve/main/USAGE.md
941 Bytes
| # gliner2-multi-v1 — INT8 ONNX (CPU) | |
| Dynamically-quantized INT8 ONNX export of `fastino/gliner2-multi-v1`. | |
| This bundle contains **only** the INT8 graphs — load it with `precision="int8"`. | |
| ```python | |
| from gliner2_onnx import GLiNER2ONNXRuntime | |
| rt = GLiNER2ONNXRuntime( | |
| "gliner2-multi-v1-int8", # this folder | |
| precision="int8", # required: no fp32 graphs are included | |
| providers=["CPUExecutionProvider"], | |
| ) | |
| rt.extract_entities("pagamento polizza tfr A4983AS", ["amount", "reference_number"]) | |
| rt.classify("acquisto gasolio automezzi", ["carburanti", "polizze"], multi_label=True) | |
| ``` | |
| For best CPU throughput set intra-op threads to your physical core count via ORT | |
| `SessionOptions`. | |
| ## Contents | |
| - `gliner2_config.json` — model config, references the INT8 graphs only | |
| - `config.json`, `tokenizer.json`, `tokenizer_config.json` | |
| - `onnx/*_int8.onnx` — encoder / classifier / span_rep / count_embed | |