Skip to content

docs: measure what int8 costs; drop the platform ONNX Runtime dropped - #6

Merged
meocong merged 1 commit into
masterfrom
measure/quantisation-and-intel-mac
Aug 13, 2026
Merged

docs: measure what int8 costs; drop the platform ONNX Runtime dropped#6
meocong merged 1 commit into
masterfrom
measure/quantisation-and-intel-mac

Conversation

@meocong

@meocong meocong commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

int8 does not make this faster, and for Vietnamese it costs 13.7 WER points

100 FLEURS clips (21.3 min), whisper-tiny's own two builds, same runtime:

WER RTF @4t RTF @8t Size
fp32 67.6 % 0.137 0.116 146 MB
int8 81.3 % 0.138 0.120 99 MB

Not the chip's fault. Encoder alone, pinned to four cores, 15 runs:

Runtime fp32 int8
ONNX Runtime 1.28 155 ms 126 ms int8 1.24× faster
OpenVINO 2026.3 115 ms 182 ms int8 1.59× slower

int8 wins on the encoder — one pass, large matrices — and hands it back in the autoregressive
decoder. OpenVINO is there to settle "maybe this Xeon is bad at int8": it has AVX-512 VNNI, and
Intel's own runtime agrees about the graph while disagreeing about everything else.

Confirms the rule already in variant::rank: prefer fp32, fall back to int8 only when memory
forces it.
New bench/encoder_precision.py so the decomposition can be re-run.

MKL / oneDNN / OpenVINO as an EP: the ONNX Runtime in our release exports one provider —
nm -D libonnxruntime.so | grep AppendExecutionProvider returns ..._CPU and nothing else — so the
kernels are MLAS, which already has AVX-512/VNNI paths. Anything else means building ONNX Runtime
ourselves for five platforms forever, for the 155 → 115 ms in the table. Graph optimisation is
already maximal: Level3 in our sessions, ORT_ENABLE_ALL (ORT's default) in sherpa-onnx.

Vietnamese WER: 2.4 % → 8.5 %

The old figure came from 15 clips / 146 s. About three of the added points are FLEURS writing
numbers as digits while models spell them out (5.3 % on the 84 clips with no digits). Registry PR:
Techainer/summo-registry#2.

Intel macOS is dropped, and not by us

error: ort-sys@2.0.0-rc.13: no prebuilt binaries available for target x86_64-apple-darwin

Microsoft ships onnxruntime-osx-arm64 only in 1.28 and 1.29; ort-sys rc.13 lists nine prebuilt
targets, none Intel macOS. Pinning back to rc.10 (which had them) fails on a missing tls-rustls
feature that summo-vad uses. Removed from both workflows with the evidence in a comment; both
READMEs now name the four builds a release carries and why the fifth is absent.

Along the way: macos-13 no longer exists as a runner label, and a job asking for one does not fail
— it queues forever with an empty runner name.

🤖 Generated with Claude Code

…ime dropped

Three things, all from running the thing rather than reasoning about it.

**Quantisation.** int8 is supposed to be the fast build, so the app's rule — prefer fp32, fall back
to int8 only when memory forces it — deserved a check. On 100 FLEURS clips whisper-tiny int8 is
exactly as fast as fp32 (RTF 0.138 vs 0.137 at four threads) and 13.7 WER points worse. The reason
is not the chip: on the encoder alone int8 *is* 1.24× faster in ONNX Runtime, and the win is handed
straight back by the autoregressive decoder, whose matrices are small enough that the
quantise/dequantise around each one costs more than the cheaper multiply saves. `bench/encoder_
precision.py` is added so that decomposition can be re-run rather than believed.

OpenVINO is in that script for the suspicion it settles: that this Xeon is bad at int8. It has
AVX-512 VNNI, and a runtime tuned by Intel for Intel reaches the same conclusion by a different
route — fastest of all on fp32, slowest of all on this int8 graph. The limit is the model's shape.

Also written down, because it keeps being asked: the ONNX Runtime we ship exports one execution
provider, `CPU`, so its kernels are MLAS, which already has AVX-512 and VNNI paths. oneDNN, MKL and
OpenVINO would each mean building ONNX Runtime ourselves for every platform and carrying that build
forever. Graph optimisation is already maximal — `Level3` in our own sessions, and sherpa-onnx
leaves ORT's default, which is `ORT_ENABLE_ALL`.

**Accuracy.** The published 2.4 % Vietnamese WER came from 15 clips and 146 seconds. On 100 clips it
is 8.5 %, of which about three points are FLEURS writing numbers as digits while every speech model
spells them out. Both READMEs and `docs/benchmarks.md` now carry the larger measurement and say what
is in it.

**Intel macOS.** `bundle (x86_64-apple-darwin)` fails with `no prebuilt binaries available`, and it
is not our packaging: Microsoft's ONNX Runtime 1.28 and 1.29 ship `osx-arm64` only, and `ort-sys`
2.0.0-rc.13 lists nine prebuilt targets without Intel macOS among them. Pinning back to rc.10, which
had them, breaks on a feature `summo-vad` needs. The target is removed from both workflows with the
evidence in a comment, and both READMEs now say which four builds a release carries and why the
fifth is absent — better than a download page with a gap in it that nobody explains.
@meocong
meocong merged commit 902430c into master Aug 13, 2026
10 checks passed
@meocong
meocong deleted the measure/quantisation-and-intel-mac branch August 13, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant