YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

distilbert-NER, int8 β€” Tirona's optional name model

These are the artefacts the Android app downloads for Better name detection. They are not published yet; until they are, the app falls back to HeuristicNameRecogniser and nothing is broken.

What to publish

Upload these two files so they are reachable at the URLs below, then delete nothing here β€” quantise.py is how they were produced and is the only record of it.

File Size SHA-256
model.int8.onnx 65,609,669 0b0a5658d5e8205a5da372b7cff40b31b6fc3871e1475bdd3b8dd5f7a79781ff
vocab.txt 213,450 eeaa9875b23b04b4c54ef759d03db9d1ba1554838f8fb26c5d96fa551df93d02

Expected URLs, from NerModelDownloader.BASE_URL:

https://tirona.app/models/distilbert-ner-int8/model.int8.onnx
https://tirona.app/models/distilbert-ner-int8/vocab.txt

Hosting them somewhere else (a HuggingFace repo, say) is fine β€” change BASE_URL in NerModelDownloader.kt to match. The size and hash are pinned in that file and verified on download, so a mismatch fails loudly instead of installing a model that quietly produces different names.

Do not re-quantise and re-upload without updating those pins. The check exists because a swapped model changes transcripts rather than crashing.

Provenance

  • Source: dslim/distilbert-NER, onnx/model.onnx and onnx/vocab.txt.
  • Licence: Apache-2.0. Base model distilbert-base-cased, fine-tuned on CoNLL-2003 (Reuters newswire).
  • Labels: O, B/I-PER, B/I-ORG, B/I-LOC, B/I-MISC. Tirona uses PER, ORG and LOC β€” the three schemes macOS asks NLTagger for β€” and drops MISC.
  • Quantisation: ONNX Runtime quantize_dynamic, QuantType.QInt8, MatMulConstBOnly. 249 MB float32 β†’ 63 MB int8.

Why we host it rather than pointing at HuggingFace

Upstream publishes only the 249 MB float export, which is not a reasonable thing to ask for on top of the 630 MB speech model. The one ready-made int8 export found (Xenova/bert-base-NER, 104 MB) declares no licence on its repo, and "the base model is MIT so it's probably fine" is not a licence position worth shipping on.

Verifying the quantisation

quantise.py re-runs it and checks the int8 model against the float one on note-like text:

python -m venv venv && ./venv/bin/pip install onnx onnxruntime numpy
curl -L -o model.onnx https://huggingface.co/dslim/distilbert-NER/resolve/main/onnx/model.onnx
./venv/bin/python quantise.py

Result on 2026-08-24: 10/11 samples identical, and the one difference was int8 being better β€” it dropped a spurious PER: "-" that float32 emitted on a bullet list.

The script's WordPiece is deliberately hand-written rather than using transformers, because WordPiece.kt has to do exactly the same thing and WordPieceTest pins the Kotlin against these reference values.

What the model does not fix

It is not strictly better than the capitalisation heuristic. On the same fixtures it tags RFC and API as ORG and Ship (in a bullet list) as PER. OnnxNameRecogniser.isPlausibleName keeps the heuristic's rules β€” no acronyms, no digits, minimum length β€” on top of the model's output for exactly that reason.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support