Speed up CPU dictation and validate streaming across models #15
Loading…
Reference in a new issue
No description provided.
Delete branch "perf/streaming-model-coverage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
CPU dictation was spending time on a redundant warmup, and slow models could exhaust the short streaming backlog before producing output. Enable CPU Flash Attention, skip the CPU dummy decode, and allow the recorder's full 30-minute backlog within a hard 64 MiB audio budget.
Measured through the production Electron worker, three warmed trials per side:
Process RSS at trial completion fell 18.4–19.7%. In a separate three-pair fresh-process comparison with Flash Attention on both sides, removing CPU warmup reduced Tiny's time from script start to first transcript from 16,767 to 8,685 ms. Text and language matched. GPU behavior is unchanged.
All 13 selectable model/detector profiles were exercised with verified model weights and native CPU inference. Nine streamed successfully, including Small with sustained input and all five Parakeet detector selections. Four Whisper models (Medium, Large v2, Large v3, full-precision Turbo) hit Electron's native aligned-allocation limit on Linux CPU. Those exact combinations now refuse safely, retain model files and selections, and leave startup recoverable. Ordinary Node loads the same Large v3 weights; bundling a separate inference runtime is deliberately outside this change. GPU and other OS compatibility were not runtime-tested.
See PERFORMANCE.md for methodology, input hashes, full coverage, limitations, and repeatable benchmark/native IPC commands.
Evidence: validation-evidence.tar.gz
Recovery from the refused Medium selection to Tiny:
Proven with 144 passing tests (895 assertions), typecheck, oxlint, ESLint, format check, Knip, production build, the complete native catalog sweep, cancellation/reload/integrity checks, and a final independent Tiny/Parakeet native preload/IPC smoke.
kReview review
Verdict: no findings
No verified defects were found in the reviewed changes.
kReview checked only the PR diff, metadata, and supplied repository context at
2da1e6438a. It reports only issues supported by this material.Estimated cost: ~$0.07 (198.0k in / 684 out / gpt-6.1-terra).
Run time: 0:26 total; this run 0:26.