Downloads · 30 days
0
jiangzhuo9357/fireredpunc-onnx
fireredpunc-onnx is a machine learning model from jiangzhuo9357. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Weight-only 8-bit ONNX export of FireRedPunc, FireRedTeam's Chinese/English punctuation restoration model, mirrored for use by Sokuji's local sentence-segmentation stage.
Downloads · 30 days
0
Access
Public
Updated Sep 18, 2026
Repo size
163 MB
Likes
0
Public
Click a slice to open those files.
.onnx163 MB · 100%
From the Hugging Face model README
Weight-only 8-bit ONNX export of FireRedPunc, FireRedTeam's Chinese/English punctuation restoration model, mirrored for use by Sokuji's local sentence-segmentation stage.
4e7d9aaf,
fireredasr2s/fireredpunc — Apache-2.0 (LICENSE in this repo is the verbatim upstream text).chinese-lert-base (BERT-base, 12 layers, vocab 21,128) with a token classifier
over out_dict = {<space>, ,, 。, ?, !}.| file | bytes | sha256 |
|---|---|---|
punc.q8w.onnx | 162,771,205 | 5b7cfdd8a8b7228c56b4d2123b4b09a4af34d70cd43f613d1fcccb35bd2ece8f |
tokenizer.json | 268,961 | 53ff61207898738bbdc000f38abebef01041c8d23b6270c11855fc692d0a3ad6 |
out_dict | 33 | 6f0f7e0004881d617bc6e1d7b5b39972da80dcb49576bca489b1603ee55e20bb |
tokenizer.json is byte-identical to upstream's chinese-lert-base/tokenizer.json; its vocab is
identical to the chinese-bert-wwm-ext_vocab.txt upstream uses for token ids. out_dict names
the five output classes in punc.q8w.onnx's label order.
Built with onnxruntime.quantization.matmul_nbits_quantizer.MatMulNBitsQuantizer from a fp32
ONNX export of the upstream PyTorch weights (fireredasr2s.punc.ModelIO), 8 bits, block size 32,
symmetric — the same recipe FireRedPunc's own weight-only build in this benchmark uses, and the
one weight-only 8-bit build that reproduced upstream's decisions exactly (see below). Every
activation (input_ids, attention_mask, logits) stays float32; only the MatMul weights are
quantized.
Exact command, run against Sokuji's punctuation benchmark harness
(benchmark/punctuation-restoration/):
python parity/fireredpunc-quant.py
This writes punc.{int8pc-nocls,q8w,q4w}.onnx into the working directory; punc.q8w.onnx here is
that script's q8w output, copied unmodified.
From docs/superpowers/notes/2026-09-14-asr-punctuation-benchmark.md (Sokuji repo, 2026-09-14):
parity/fireredpunc.py reference, parity/fireredpunc.mjs ported JS on
onnxruntime-web 1.26 WASM): 153/153 rows exact, 100% of token classes, all 353
sentence-final marks placed correctly. The published dynamic-int8 file
(42ailab) reaches only 43/153 rows and 96.8% of token classes against the same reference,
because dynamic per-tensor int8 turns roughly half of sentence-final marks into commas., to 。); streaming
breakpoints P/R 93.0 / 90.2, streaming sentence ends P/R 84.4 / 53.5 (8-character right-context
commit).RuleBaedTxtFix lowercases
everything and only re-capitalizes sentence starts and "I"); Sokuji restores casing from the
ASR input rather than trusting this model's output casing.Apache-2.0, carried over from FireRedTeam/FireRedPunc and FireRedTeam/FireRedASR2S. See
LICENSE in this repository (verbatim copy of the upstream FireRedASR2S LICENSE file).