Downloads · 30 days
18
43% of all-time downloads
blinkwrite-ai/gliner-small-pii-onnx-int8
gliner-small-pii-onnx-int8 is a token classification model from blinkwrite-ai. Use it when you need labels on individual words, such as names. It is set up for gliner. The card lists the license as apache-2.0.
GLiNER PII detection, exported to ONNX and quantized to INT8 so it runs on-device with ONNX Runtime — no Python, no GPU, no network. 188 MiB of weights, CPU inference.
Downloads · 30 days
18
43% of all-time downloads
All-time downloads
42
Public
Repo size
340 MB
Likes
0
Public
Click a slice to open those files.
.onnx197 MB · 56%
From the Hugging Face model README
GLiNER PII detection, exported to ONNX and quantized to INT8 so it runs on-device with ONNX Runtime — no Python, no GPU, no network. 188 MiB of weights, CPU inference.
This is a conversion of vicgalle/gliner-small-pii.
The weights are not retrained; only the format changed.
GLiNER.export_to_onnx(quantize=False).span_mask graph input from BOOL to INT64, inserting a Cast node back to
BOOL. Several ONNX Runtime language bindings — including the Objective-C/Swift one — cannot
feed a boolean tensor, so the input is named span_mask_int64 in this build.onnxruntime.quantization.quantize_dynamic
(weight_type=QInt8).The export script ships with the consuming library, so the conversion recipe is public.
| File | SHA-256 | Bytes |
|---|---|---|
model.onnx | 2ac41b218b8a87aaf06222fe6431e04b7b2cccb1acc41d1009696ce455014ef7 | 196,778,982 |
tokenizer.json | 07d65756a669ff551b99568f8cf6e34a2937462816a15dd77d1c43ee78d2372c | 8,649,387 |
tokenizer_config.json | a3c213a21a411d13a28b10f037219d95ba24ab8ebf2469ec647edabb3bf75097 | 1,663 |
gliner_config.json | feecef75681f3f5e3fe779b402a0b90ea2bf7063cdfeb937d460273ce9465c6b | 3,313 |
gliner-pii-2026.08.1.tar.gz | 6dab57bc8f550b4e18b16b2b6d5a5de60712c5b5d34686f43873617e270b0a26 | 143,492,231 |
The tarball holds the same four files, flat, gzip with no timestamp. It exists for clients that fetch one archive and verify one hash; the loose files are equivalent.
Pin a commit SHA in download URLs, not main:
https://huggingface.co/blinkwrite-ai/gliner-small-pii-onnx-int8/resolve/<commit-sha>/model.onnx
| Input | Type | Shape |
|---|---|---|
input_ids | int64 | [batch, seq] |
attention_mask | int64 | [batch, seq] |
words_mask | int64 | [batch, seq] |
text_lengths | int64 | [batch, 1] |
span_idx | int64 | [batch, num_spans, 2] |
span_mask_int64 | int64 | [batch, num_spans] |
Output: logits, [batch, words, max_width, num_labels]. Apply a sigmoid and keep spans above
your threshold.
max_width: 12 — spans are enumerated up to 12 words. This is a property of the file, not
a tuning knob: change it and span_idx stops lining up with what the model was trained on.span_mode: markerV0, max_len: 768, encoder microsoft/deberta-v3-small.Labels and the score threshold are not fixed by the weights. GLiNER takes its label set at inference time, so any labels work. One caveat: the model returns an index into the array you passed in, so the array used for inference must be the one used to read the result back.
A 17-label set tuned for chat and email prose, at threshold 0.2:
phone number, email address, credit card number, address, social security number, date of birth, bank account number, password, pin code, ip address, dollar amount, passport number, driver license number, tax id, api key, access token, secret key
Best-effort NER, not a guarantee. Recall is not 100%, and a PII detector that misses one span has leaked it. Treat the output as a filter, not a compliance control.
person
label, but name detection in short informal text is the weakest case.Apache-2.0, inherited from the base model.
vicgalle/gliner-small-pii — the base
model, Apache-2.0.gliner-community/gliner_small-v2.5
— which that model fine-tunes, Apache-2.0.microsoft/deberta-v3-small.Modification stated per Apache-2.0 §4(b): ONNX export, span_mask dtype patch, and INT8
dynamic quantization. No retraining.