Experiments with user adapted ASR, focusing on on-device use cases.
On-device ASR models have become great but there is still WER gap specially if considering non-English languages. Since many mobile-on-device use cases are for use by just one person, we could bring the WER of such languages to an acceptable range by doing some tuning on that person’s voice. This repository explores such personalizations using Moonshine models.
- There is a data generation interface in
./data/generation/that allows you to record audios in Indian English, Hindi, Tamil, and Hinglish (hi-en). The Hinglish track exists because real usage code-switches, and a plain per-locale corpus (e.g. MASSIVE) can’t reflect that. It’s the one language with a train/eval split baked into the prompt bank itself ("split": "train"/"eval"per prompt) — train is assistant-command style, eval is conversational/news/question/ instruction style with deliberately different vocabulary, so that a WER gain from fine-tuning can’t just be the model having memorized train phrasing. Recordings for a split-tagged language land in separate<lang>/train/and<lang>/eval/folders from the start (seedata/generation/README.md). - After data generation, you can run the
evaluate_asr.pyscript on the dataset (the jsonl file) to get a report of baseline moonshine model performance. - The
moonshine-voice[lora]extra is installed for personalization: it trains a decoder-only LoRA adapter on a Moonshine Streaming checkpoint directly from ametadata.jsonlmanifest (same{audio, text}format we already use), auto-mixing in a general-domain replay corpus to avoid forgetting.torchis pinned to acu126build (seepyproject.toml) since the default PyPI wheel targets CUDA 13 and this machine’s GPU (GTX 1060, Pascal/sm_61) is otherwise dropped from PyTorch’s newer prebuilt wheels;cu126still carries forward-compatible PTX for it. Once there’s enough personalization audio recorded (plan: record a new 1h manifest, keep theen-inset above untouched as a held-out--eval-manifestfor a clean before/after WER comparison), train with e.g.:uv run python -m moonshine_voice.lora \ --train-manifest path/to/new_manifest.jsonl \ --eval-manifest "data/generation/recordings/Abhinav Tushar/en-in/mixed/metadata.jsonl" \ --model moonshine-ai/moonshine-streaming-medium \ --output-dir lora_runs/lepisma-en-in \ --evalThen
--exportthe result to.ortgraphs soevaluate_asr.pycan score it like any other moonshine model. - The shipped LoRA recipe only adapts decoder self-attention — encoder
self-attention (the part that actually processes raw audio/accent) and
cross-attention both stay frozen, so it can reshape the decoder’s
language-model prior but can’t correct genuine acoustic mishearing.
train_lora_encoder.py(repo root) wraps the same recipe with a--variantflag selecting which self-attention sites get LoRA-adapted:decoder(default): the shipped recipe, decoder only.decoder_encoder: decoder (all layers) + encoder (all layers).encoder_bottom(--encoder-bottom-n, default 2): only the bottom N encoder layers, decoder untouched — the Euphonia-style arm (Google’s on-device disordered-speech personalization found fine-tuning just the bottom 2 of 8 encoder layers recovers ~91% of the gain from fine-tuning the whole encoder, with less overfitting risk on a small personal dataset).
All three are comparable on the same data — this is the acoustic-vs-non-acoustic question from the intro, made concrete. It reuses the packaged data loading / replay-mixing / eval / save logic unchanged (see
lora_encoder_adapter.pyfor the extended adapter functions and why that’s safe to splice in); only the LoRA-site selection differs. Same flags asmoonshine-voice lora, e.g.:uv run train_lora_encoder.py \ --train-manifest path/to/new_manifest.jsonl \ --eval-manifest "data/generation/recordings/Abhinav Tushar/en-in/mixed/metadata.jsonl" \ --model moonshine-ai/moonshine-streaming-medium \ --variant decoder_encoder \ --output-dir lora_runs/lepisma-en-in-encoder \ --eval--exportis not handled by this wrapper — runmoonshine-voice lora --export --model lora_runs/.../adapted --output-dir ...directly, it needs no changes to pick up encoder weights.Memory: touching the encoder means backprop runs through the whole network, which used to OOM a 6 GiB GTX 1060 at the default batch-size 8 (see the
batch-size 2workarounds in the results below).train_lora_encoder.pynow enables gradient checkpointing by default (no-op during--eval’sgenerate()). Pass--no-gradient-checkpointingto turn it off on a bigger GPU. Seeexperiments/README.mdfor details. android/has a minimal Android demo app (“Adapt”) that runs a fine-tuned model live on-device: tap to record, see partial transcripts as you speak, and keep the audio + transcript of each session for playback. Models are user-managed rather than baked into the APK — add several named exports from a picked folder oradb push, switch between them from a dropdown, and on a past recording re-run its saved audio through a different model in the same streaming fashion a live session uses, to compare fine-tunes against a fixed recording. Seeandroid/README.mdfor the file layout andandroid/scripts/push_model.sh.- Recording is the real bottleneck for personalization data, so
data/synthetic/clones the recorded voice (Chatterbox TTS) and synthesizes new text in a news/internet register — deliberately different from the real recordings’ conversational register, so the real recordings can stay reserved as held-out eval instead of being split into train/eval. Its own isolateduvproject (Chatterbox pins an oldertorchthan this repo’s LoRA training needs); seedata/synthetic/README.mdfor the method, the Chatterbox-vs-XTTS-v2 pick, and how to reuse it for a different voice/language/domain. experiments/run_sweep.pyruns the data-scaling x LoRA-variant sweep (tiny/medium x decoder/decoder_encoder/encoder_bottom x 5-60 minutes of synthetic training data, eval’d against the real held-out en-in recordings) as a resumable batch of subprocesses, logging status/results toexperiments/sweep_log.jsonland redrawingexperiments/plot.pngafter every run so progress is visible without waiting for the whole sweep. Seeexperiments/README.mdfor how to read it mid-run and the findings once it’s done.
Here is the current performance of moonshine (all sizes, model language en)
on voice data of @lepisma for around 5 mins of Indian English. Size is
on-disk weight size (quantized), not parameter count. Params is the count of
elements across all weight tensors in the exported ONNX graph (summed from the
deployed .ort files, de-duplicated across the encoder/decoder’s
with-past/without-past branches) — it can run a bit above the parameter count
of the original training-time model since ONNX export can materialize tied
weights (e.g. an untied LM head) as separate tensors. WER/MER/WIL below are
computed with OpenAI’s Whisper-paper EnglishTextNormalizer (lowercases,
strips punctuation, expands contractions/titles, standardizes number
formatting) before scoring, the same normalizer moonshine_voice.lora’s
corpus_wer() uses for its --eval WER during fine-tuning, so these numbers
are directly comparable to LoRA training/eval output:
| Model | Size | Params | WER | MER | WIL | Sub | Del | Ins | Hits |
|---|---|---|---|---|---|---|---|---|---|
| medium-streaming | 291 MiB | 266.4M | 0.1964 | 0.1907 | 0.3119 | 155 | 21 | 32 | 883 |
| small-streaming | 158 MiB | 140.4M | 0.3097 | 0.2905 | 0.4477 | 226 | 32 | 70 | 801 |
| base | 135 MiB | 75.2M | 0.3333 | 0.3203 | 0.4955 | 258 | 52 | 43 | 749 |
| tiny-streaming | 50 MiB | 44.2M | 0.5373 | 0.4974 | 0.7123 | 425 | 59 | 85 | 575 |
| tiny | 42 MiB | 36.5M | 0.5562 | 0.5069 | 0.7156 | 414 | 72 | 103 | 573 |
Moonshine has no locale-specific Indian-English model; en above is its
general English model. The same dataset run through Whisper (all sizes, via
faster-whisper, GPU, int8, transcription language forced to en —
.en-suffixed models are Whisper’s English-only checkpoints, the rest are the
multilingual checkpoints run against English; no locale-specific Indian-English
variant exists here either), scored with the same Whisper normalizer as above.
Params here is OpenAI’s officially published parameter count per size
(.en and multilingual checkpoints of the same size have the same count):
| Model | Size | Params | WER | MER | WIL | Sub | Del | Ins | Hits |
|---|---|---|---|---|---|---|---|---|---|
| large-v3 | 2.9 GiB | 1550M | 0.0463 | 0.0461 | 0.0815 | 39 | 7 | 3 | 1013 |
| medium | 1.5 GiB | 769M | 0.0670 | 0.0667 | 0.1158 | 55 | 11 | 5 | 993 |
| turbo | 1.6 GiB | 809M | 0.0878 | 0.0869 | 0.1448 | 66 | 16 | 11 | 977 |
| medium.en | 1.5 GiB | 769M | 0.0925 | 0.0914 | 0.1573 | 76 | 9 | 13 | 974 |
| small | 464 MiB | 244M | 0.1133 | 0.1117 | 0.1838 | 84 | 21 | 15 | 954 |
| small.en | 464 MiB | 244M | 0.1199 | 0.1186 | 0.2054 | 103 | 12 | 12 | 944 |
| base | 142 MiB | 74M | 0.2219 | 0.2148 | 0.3494 | 177 | 23 | 35 | 859 |
| base.en | 141 MiB | 74M | 0.2436 | 0.2367 | 0.3839 | 198 | 29 | 31 | 832 |
| tiny.en | 75 MiB | 39M | 0.3324 | 0.3132 | 0.4865 | 259 | 28 | 65 | 772 |
| tiny | 75 MiB | 39M | 0.3938 | 0.3671 | 0.5570 | 306 | 34 | 77 | 719 |
Whisper large-v3 beats the best Moonshine model (medium-streaming) by a wide margin on this dataset, but at a much larger model size and without Moonshine’s on-device/streaming design goals.
Cactus Compute’s Whistle (released 2026-10-02) is a 16.9 MB (55M params,
mostly 2-bit) CPU-only ASR model. It ran zero-shot on all five en-in sets
through its own C runtime (cactus-needle 3.2.7, language forced to en),
next to the ONNX-runtime Moonshine and faster-whisper (CPU int8) models. All
use the same Whisper normalizer as above. agent5min is the fixed 100-clip
held-out split of custom_agent_instructions that the fine-tuning
experiments score on. Reproduce with experiments/eval_whistle.py; results
are in experiments/results/eval_whistle.json. WER %:
| Model | Size | mixed | news | question | instruction | agent(338) | agent5min | all |
|---|---|---|---|---|---|---|---|---|
| whisper-small | 464 MiB | 11.52 | 8.46 | 0.71 | 0.80 | 7.83 | 8.64 | 8.37 |
| moonshine-medium-streaming | 291 MiB | 19.64 | 10.30 | 4.26 | 0.80 | 11.03 | 10.63 | 11.61 |
| whisper-base | 142 MiB | 22.38 | 14.74 | 3.55 | 2.40 | 11.57 | 11.57 | 14.16 |
| moonshine-small-streaming | 158 MiB | 30.97 | 12.42 | 8.51 | 2.40 | 12.62 | 13.20 | 14.83 |
| whisper-tiny | 75 MiB | 35.41 | 20.01 | 12.06 | 9.60 | 15.28 | 17.29 | 19.99 |
| whistle | 17 MiB | 39.57 | 23.97 | 16.31 | 20.80 | 19.80 | 19.63 | 24.32 |
| moonshine-tiny-streaming | 50 MiB | 53.82 | 24.27 | 11.35 | 18.40 | 21.19 | 21.50 | 26.83 |
- Whistle beats moonshine-tiny-streaming, the Android app’s default, overall
(24.3% vs. 26.8%) and by 14pp on conversational
mixed, at about a third of its size. It loses to it on the small question/instruction sets. - It loses to whisper-tiny on every set, by 4–11pp, at about a quarter of whisper-tiny’s size.
- It’s the fastest per clip here. CPU real-time factor was about 0.06–0.2 on this 8-core machine (measured with the other baselines running alongside, so treat it as rough).
whisper-tinyreads 35.41% onmixedhere vs. 39.38% in the table above. That one ran on GPU, this one on CPU int8: same model, different numerics.
whistle/ (its own uv project, JAX; see whistle/README.md) tests whether
fine-tuning adapts to the voice rather than the vocabulary: train on one
register, score on others with no shared vocabulary.
- Train on: ~17 min of real
newsrecordings. - Score on:
mixedandagent5min, registers with no vocabulary overlap with training. - Runs: 23 on a rented RTX 3090, about $1.10.
WER % through Whistle’s own runtime, vs. a same-pipeline base (mean ± sd over 3 seeds):
| Recipe | mixed | Δ | agent5min | Δ |
|---|---|---|---|---|
| base (no training) | 38.34 | — | 19.86 | — |
| needle’s own fine-tuner, as shipped | 46.40 ±0.05 | +8.06 | 21.46 ±0.70 | +1.60 |
| LoRA, all 15 sites (W2) | 35.38 ±1.11 | −2.96 | 20.05 ±0.70 | +0.19 |
| LoRA, decoder only | 38.15 ±1.06 | −0.19 | 20.64 ±0.34 | +0.78 |
| LoRA, encoder only | 36.73 ±1.34 | −1.61 | 18.65 ±0.95 | −1.21 |
| full-rank, whole encoder (n=8) | 36.51 ±0.14 | −1.83 | 19.70 ±0.18 | −0.16 |
| full-rank, bottom 3 encoder layers | 37.02 ±1.88 | −1.32 | 17.06 ±0.51 | −2.80 |
- cactus-needle’s fine-tuner changes the deployed model. It trains and
exports everything at 4 bits, but the published model is mostly 2-bit.
Its output is about 8pp worse on
mixedbefore training matters.whistle/deploy_quant.pytrains and exports in the published scheme, and reproduces the published archive. - Decoder-only training transfers nothing; encoder-side training does.
Tuning the bottom 3 of 8 encoder layers full-rank is the best recipe on
the unrelated register (−14% relative on
agent5min). - Learning rate, replay and whole-model training don’t help: lr 1e-5 /
5e-5, replay 0.5 and
fullare all within noise of the whole-encoder row. - Full results, plus what the recipe is probably still missing (checkpoint
selection on a news-only dev set, 30–60 epochs with no augmentation, and
depth). Raw numbers are in
experiments/results/eval_whistle_finetune.json.
The question: if the model only ever hears one speaker, can whole encoder layers be dropped and then recovered by fine-tuning on that speaker, to get a smaller and faster Whistle at the same WER on their voice?
- Setup: same data and evals as the fine-tuning section above.
- Recipe: prune the encoder to k of 8 layers (
whistle/prune.py), then train every kept layer on the ~17 min ofnews. - Losses compared:
- plain CE
- CE + token-level distillation from the unpruned model
- those plus encoder-output distillation (match the full encoder on every 80 ms frame)
- Runs: 22 on a rented RTX 3090, about $0.90.
Only depth can be cut without changing the Cactus runtime. Width, heads and conv size are shared with the decoder or hard-coded. Kept layers per depth were chosen by greedy backward elimination on teacher-forced loss.
WER % through Whistle’s runtime, best recipe per depth (encoder-output distillation), single seed:
| Encoder layers | MB | mixed | agent5min | encoder RTF | e2e RTF |
|---|---|---|---|---|---|
| 8 (base) | 16.92 | 38.34 | 19.86 | 0.0225 | 0.0570 |
| 7 (drop 6) | 16.39 | 48.06 | 30.14 | 0.0209 | 0.0564 |
| 6 (0,1,2,3,4,7) | 15.86 | 52.31 | 42.76 | 0.0192 | 0.0561 |
| 5 (0–4) | 15.32 | 78.09 | 69.98 | 0.0175 | 0.0560 |
| 4 (0,1,2,4) | 14.79 | 89.99 | 94.04 | 0.0158 | 0.0656 |
| 2 (0,7) | 13.73 | 142.3 | 148.71 | 0.0139 | — |
- Dropping even one layer costs ~10pp after recovery. Every depth below 8 is far worse on your own voice, at every loss. 17 minutes of one speaker isn’t enough to relearn what a layer did.
- Encoder-output distillation is the only loss that keeps improving
(best step 1500–3000 vs. 200–400 for CE / token-KD, which overfit).
- At 6 layers it cuts mixed from 60.5 to 52.3.
- At 4 layers with a 4× frame weight, it hit the 3000-step cap still improving.
- Replay and training the decoder too don’t help.
- Size and speed gains are small.
- Each encoder layer is only ~0.53 MB (the encoder is 22% of the archive; the engram tables and embedding are 45%).
- The encoder is ~40% of CPU time, so 6 layers should save ~6% end to end. Measured is ≤2%, probably because the worse hypotheses decode more tokens. TTFT drops 58 → 52 ms at 6 layers. The 4-layer model is slower overall because its garbled output decodes longer.
- Raw numbers:
experiments/results/eval_whistle_prune.json,whistle_prune_log.jsonl,whistle_prune_speed.json(CPU, 8 cores, median of 3 rounds) andlora_runs/whistle_prune_probe/(no-training probes).
Same isolation test as round 1: train on ~29 min of news only, score on
mixed / agent_eval5min (no shared vocabulary), so gains there are
voice, not domain. New: token KD from the published model (--kd-weight 0.5),
waveform augmentation (--augment: speed 0.9/1.0/1.1, ±6 dB, noise at
15-35 dB SNR), whisper-small pseudo-labels, and two-stage voice-then-shrink
training (--save-float, then --checkpoint). run_sweep.py --sweep voice2.
40 runs on two rented RTX 3090s plus 20 .cact splices, ~$1.95.
WER %, mean ± sd over seeds (n):
| Model | MB | n | mixed | agent5min |
|---|---|---|---|---|
| base | 16.92 | 1 | 38.34 | 19.86 |
| round 1: bottom 3 encoder layers, CE | 16.92 | 3 | 37.02 ±1.88 | 17.06 ±0.51 |
| bottom 3 + KD | 16.92 | 3 | 35.44 ±0.48 | 17.41 ±0.20 |
| bottom 3 + KD + augmentation | 16.92 | 5 | 34.03 ±0.66 | 16.99 ±0.13 |
| whole model + KD + augmentation | 16.92 | 2 | 33.90 | 19.69 |
| bottom 3 + KD, whisper-small labels | 16.92 | 1 | 35.41 | 17.64 |
| 11.19 MB shrink recovery alone (news + agent) | 11.19 | 3 | 38.46 ±0.38 | 18.77 ±0.70 |
| 11.19 MB, shrink + voice jointly, news only | 11.19 | 2 | 42.68 | 19.57 |
| 11.19 MB, splice voice layers in | 11.19 | 9 | 37.36 ±0.93 | 18.48 ±0.51 |
| 11.19 MB, two stages: voice, then recovery | 11.19 | 2 | 36.78 ±0.73 | 17.29 ±0.50 |
| 16.92 MB, whole + KD (news + agent) + splice | 16.92 | 9 | 32.43 ±1.09 | 16.94 ±0.53 |
| 9.99 MB, two stages | 9.99 | 1 | 41.45 | 20.33 |
- Voice transfers once KD and augmentation are combined. The bottom 3 encoder layers, trained on news alone: -4.3pp mixed, -2.9pp agent5min, with the smallest seed spread of any recipe. Augmentation without KD doesn’t help (37.6).
- Pseudo-labels work. whisper-small’s transcripts (8.5% WER) matched the real ones, so the voice step can run on untranscribed device audio.
- Small + voice: voice first, then shrink. The shrink needs audio in your text domain to recover, and the voice layers need your voice. Two stages give 36.8 / 17.3 at 11.19 MB, beating the 16.92 MB base on both. Doing both at once on news fails. 9.99 MB doesn’t keep the voice gain.
- The voice layers are portable. Writing the 3 trained encoder layers’
records into another fine-tuned
.cact(no training) gives the best Whistle numbers so far: 32.4 / 16.9 at full size. - Raw:
experiments/results/whistle_voice2_log.jsonl,eval_whistle_voice2.json,eval_whistle_splice.json.
Ported the Whistle round-2 recipe to Moonshine voice training
(train_lora_encoder.py --kd-weight 0.5 --augment, teacher = frozen base
model). Same news-only isolation, same encoder_bottom_full setup as the
round-1 Moonshine voice runs (tiny ebn6, medium ebn5, lr 2e-5, batch 32).
run_sweep.py --experiment voice2, 14 runs + 11 fixed-step checks on one
RTX 3090, ~$0.55.
WER %, eval_voice_vs_domain.py, mean ± sd over seeds (n):
| Model | n | mixed | agent5min |
|---|---|---|---|
| tiny base | 1 | 41.74 | 21.26 |
| tiny round 1, CE | 3 | 35.22 ±0.16 | 17.48 ±0.41 |
| tiny KD | 3 | 40.89 ±0.25 | 19.12 ±0.13 |
| tiny augmentation | 3 | 40.23 ±1.06 | 21.14 ±0.62 |
| tiny KD + augmentation | 3 | 42.34 ±1.69 | 17.60 ±0.41 |
| medium base | 1 | 17.00 | 10.05 |
| medium round 1, CE | 3 | 13.50 ±0.00 | 8.61 ±0.24 |
| medium KD | 1 | 15.39 | 9.58 |
| medium augmentation | 1 | 15.20 | 7.59 |
| medium KD + augmentation | 3 | 17.60 ±0.39 | 9.58 ±0.00 |
- It doesn’t port. Every arm is worse than plain CE on mixed, for both models. Medium augmentation’s 7.59 on agent5min is the one cell that wins (n=1).
- Not just checkpoint choice. The round-1 runs all early-stopped at
step 100. The new arms picked later steps (200-1300) because augmentation
fits news dev better, and that hurts transfer. But a fixed 100-step rerun
(trainer’s mixed WER,
results/moonshine_voice2_s100.txt) still shows no gain: tiny CE 37.08 ±0.20, aug 37.33 ±1.59, KD + aug 37.83 ±0.70; medium CE 13.50, aug 15.86, KD + aug 15.30. - Likely why (untested): Whistle’s round-1 voice training overfit, so KD and augmentation helped as regularisers. Moonshine’s round 1 already stops after 100 steps. KD pulls toward a teacher that doesn’t know the voice, and speed perturbation distorts the speaker cues being learned.
- Moonshine voice training stays at round 1 (plain CE, early stop).
- Raw:
results/moonshine_voice2_log.jsonl,eval_voice_vs_domain.json(-kd0.5/-augrun ids).
The encoder can’t be cut (above), but 45% of the archive is the vocabulary side: two engram n-gram memories (4.7 MB, hashed 2/3-gram tables feeding decoder layers 3 and 7) and the token embedding (2.1 MB). One user needs only part of that vocabulary. The question: shrink it, then fine-tune back to the base model’s WER on your voice.
- Shrink levers (=whistle/shrink.py=, no training):
- fold each engram table from 18432 to N slots (slot % N), merging rows by usage, with counts from your domain text plus general English text
- lower bit widths (engram tables 1-bit, embedding 2-bit)
- drop decoder layers (ranked by teacher-forced CE; 2 and 4 hurt least)
- Training: ~29 min of
news+custom_agent_instructions/trainaudio. Token distillation from the published model (KD 0.5, or 1.0 = no CE), optional general-English replay 0.5, QAT at the shrunk widths. - Runs: 27 CPU probes and 15 training runs on a rented RTX A5000 (~$1.60 including two failed hosts).
WER %, single seed (instruction/question are only 12/16 clips):
| Model / training | MB | mixed | agent5min | instr | quest |
|---|---|---|---|---|---|
| base (no training) | 16.92 | 38.3 | 19.9 | 20.8 | 17.0 |
| full size, whole model + KD | 16.92 | 34.5 | 20.1 | 14.4 | 12.8 |
| full size, decoder + KD | 16.92 | 39.9 | 20.4 | 24.8 | 14.2 |
| 11.19 MB untrained | 11.19 | 44.2 | 23.1 | 24.0 | 17.0 |
| LoRA everywhere + engram/emb, KD | 11.19 | 38.1 | 18.7 | 27.2 | 16.3 |
| decoder, pure KD + replay | 11.19 | 40.3 | 20.6 | 20.8 | 16.3 |
| whole model + KD | 11.19 | 41.6 | 20.1 | 23.2 | 18.4 |
| whole model + KD + replay | 11.19 | 40.1 | 20.3 | 25.6 | 17.7 |
| engram/emb only, pure KD + replay | 11.19 | 41.8 | 20.9 | 20.8 | 16.3 |
| decoder + KD | 11.19 | 44.4 | 21.1 | 22.4 | 19.2 |
| 9.99 MB untrained (also drop dec 2, 4) | 9.99 | 45.9 | 24.8 | 24.0 | 19.9 |
| whole model + KD | 9.99 | 39.1 | 21.3 | 26.4 | 16.3 |
| whole model + KD + replay | 9.99 | 43.1 | 20.6 | 25.6 | 16.3 |
| decoder + KD (± replay, pure KD) | 9.99 | 44–46 | 22–23 | 26–30 | 17–20 |
- 11.19 MB (−34%) holds base WER on your voice with LoRA on every site plus trainable engram/embedding: 38.1 mixed, 18.7 agent5min. Instruction is worse (27.2), but that’s 12 clips.
- Train the whole model, not just the decoder. Decoder-only CE on 29 min overfits (dev loss falls, mixed WER rises). Pure KD + replay was the only decoder-only recipe that got close (40.3).
- The full-size whole-model run is the best Whistle result so far (34.5 mixed vs. round 1’s 35.4). This one isn’t a clean voice-only result: training included agent-instruction audio (disjoint from agent5min, but same register), though agent5min didn’t move.
- Usage-weighted folding beats a plain mean, and folding with the eval text itself (an oracle) is better still. Your own text is a real lever for this.
- Smaller isn’t faster, except for decoder depth. CPU end-to-end RTF: 11.19 MB runs the same as the unshrunk fine-tune (0.055). The 9.99 MB model, two decoder layers fewer, decodes 21% faster (0.049, 1.12×).
- Raw numbers:
experiments/results/eval_whistle_shrink.json,eval_whistle_shrink_probe.json,whistle_shrink_log.jsonl,whistle_shrink_speed.json.
5 min en-in recording, 75/25 stratified split: 81 train / 28 eval clips (69 of the 81 actually drove gradient updates after the dev/replay carve-out). Single run, single seed — directional, not conclusive.
| Model | WER on the 28-clip eval split | vs. baseline | Fine-tune time |
|---|---|---|---|
| Baseline (medium-streaming, no fine-tune) | 21.46% | — | — |
| Decoder-only LoRA (shipped recipe) | 18.35% | −3.1pp (≈14% rel) | not recorded |
Decoder+encoder LoRA (train_lora_encoder.py) | 12.36% | −9.1pp (≈42% rel) | not recorded |
- Decoder+encoder OOM’d at
batch-size 8on the 6 GiB GTX 1060 (encoder backprop needs much more activation memory); dropped tobatch-size 2. - Both runs showed mild forgetting on the replay dev set (general-domain loss rose 0.1996→0.2159 decoder-only, 0.2073→0.2278 decoder+encoder).
tiny-streaming is the app’s default/stock download, so it’s the model
worth personalizing on-device first. Same en-in recordings, a fresh
75/25 stratified split (109 clips, seed 42; 69 train / 12 dev / 28 eval).
| Model | WER on the 28-clip eval split | vs. baseline | Fine-tune time |
|---|---|---|---|
| Baseline (tiny-streaming) | 38.83% | — | — |
| Decoder-only LoRA | 31.87% | −6.96pp (≈18% rel) | ~2 min |
Decoder+encoder LoRA (train_lora_encoder.py) | 34.43% | −4.40pp (≈11% rel) | ~2 min |
Times are wall-clock for training+eval on a GTX 1060 (6 GiB), with the
domain/replay audio caches already built (adds a few minutes on a cold
cache). Both commands need --dev-hours 0.0107 (the packaged default of
0.25h exceeds this manifest’s total 0.07h and silently carves the entire
train pool into dev, hanging the run with zero training batches); the
decoder+encoder run additionally needs --batch-size 2 (default batch-size
8 OOMs on encoder backprop, same as the medium run above).
Unlike medium, decoder-only beat decoder+encoder here — tiny’s small capacity likely leaves less room for the encoder-side adapter to help without needing more data/steps than this 69-clip set gives it.
Exported+quantized models (android/README.md file layout) land in
lora_runs/lepisma-en-in-tiny-{decoder,encoder}/exported/.