Skip to content

parakeet: Fluid Speech Pro (pre-Conformer block) - #266

Draft
cjpais wants to merge 8 commits into
mainfrom
fluid-speech-pro
Draft

cjpais wants to merge 8 commits into
mainfrom
fluid-speech-pro

Conversation

@cjpais

@cjpais cjpais commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Draft. Prepared with AI assistance (Claude); the description below is an evidence list to be rewritten before review. Closes #263.

Adds FluidVoice's Fluid Speech Pro (FluidVoice-Labs/fluid-speech-pro@46027a3, CC-BY-4.0), a Parakeet TDT 0.6B v3 retrain with one residual block between the subsampler and Conformer layer 0 (x + up(gelu(mix(down(LayerNorm(x))))), mix = depthwise k=15 time conv).

The first commit is Dax Raad's from anomalyco/transcribe.cpp (hex/fluid-pre-block), cherry-picked with authorship. Follow-ups:

  • Block is offline-only: a pre_block KV with chunked attention is a load error; removed from the cache-aware streaming graph.
  • Variable-length batches zero padded frames before the depthwise conv (without it, 2.2e-2 max_abs at dec.enc_out on a 4-clip batch); conv uses the same direct depthwise op as the Conformer blocks, so jfk x4 is bit-exact.
  • Announcing the block without its tensors is a load error (parakeet_smoke fixture).
  • transcribe-quantize keeps enc.pre_block.{mix,norm} F32 (every quant failed to load before).
  • NeMo oracle/WER runner load the checkpoint through FluidVoice's fluid_speech.py; converter reads the .nemo, checks the fluid_speech config, skips clean_mode.* LoRA.
  • KV and tensor names match the existing TalkMate/fluid-speech-pro-gguf file, which loads unchanged.

Evidence

  • validate.py all --family parakeet --variant fluid-speech-pro: 19/19 within tolerance, exact jfk transcript. Preflight B 5/5.
  • Batch parity 2/4/8 + golden; mixed batch max diff 4.2e-7 (v3 baseline 6.3e-7). Serial ctest 90/90 (29 skipped); real smokes pass with fluid F32/Q8_0 and v3.
  • LibriSpeech test-clean, first 512 utts: NeMo 1.300, F32/F16/Q8_0 1.310, Q6_K 1.365, Q5_K_M 1.356, Q4_K_M 1.319; v3 Q8_0 1.549. FLEURS de first 128: NeMo 3.904, fluid Q8_0 3.983, v3 Q8_0 4.685.
  • TalkMate Q8_0: same 705 tensors/KVs; 692 encoder tensors byte-identical; predictor/joint differ because they converted the older upload 53f490b9, which our converter reproduces byte for byte.

Before merge

  • Upload quants to handy-computer/fluid-speech-pro-gguf, run the Modal publication + reference sweeps and the speed bench rigs, ingest into the catalog (check.py currently fails only on the missing accuracy/speed rows).
  • HF card cites local validation commit 30ee38a; update if rebased.

Clean mode: the GGUFs carry FluidVoice's clean-mode adapter (rank 32, alpha 64, 264 A/B pairs as enc.blocks.N..clean_mode.{a,b} in F16, pred.lstm.0.clean_mode.bias and joint.pred.clean_mode.bias in F32, KVs stt.parakeet.clean_mode.{rank,alpha,modules}). The loader validates it and ignores it; output stays verbatim and bit-identical (705 base tensors byte-identical, 37 dumped tensors + transcripts identical across 6 quants x CPU/Metal). Folding the stored adapter reproduces fluid_speech.load(clean_mode=True) exactly from F32 (max 8.9e-6 from the F16 factors). +55 MB per quantized file; +0.5-1.1 MB resident with mmap, +55 MB without mmap or on backends that copy weights. Runtime switch/API left for a follow-up.

Known limits: builds without this change load these GGUFs and silently run without the block.

Still to test

  • Publication sweep (Modal): LibriSpeech all six quants + FLEURS Q8_0 in 25 languages, and the full NeMo reference sweep. Locally only 512 LibriSpeech and 128 FLEURS-de utterances were run.
  • Long-form: clips > 20.48 s use the family's local attention window [256,256]; 8 of the 9 transcript diffs vs NeMo on the subset are such clips (7/9 match NeMo run with the same window). Worth a look in the sweep.
  • Backends: validated on M1 CPU; Metal only for smokes and rough timing. Vulkan and CUDA not exercised; the pre-block uses gelu_erf and the direct depthwise conv.
  • Speed bench on the three rigs (local timing was on a loaded machine).
  • Timestamps and language detection: capability flags left verified=false, as for orukeet.
  • Clean mode is carried but not applied; nothing to test until the runtime switch exists. Note NeMo clean mode also rewrites numbers ("ten years" -> "10 years"), so it overlaps ITN.

thdxr and others added 8 commits November 21, 2026 22:05
Fluid Speech Pro adds a residual block between the subsampler output
and Conformer layer 0 (FluidVoice's FrameCleaner:
x + up(gelu(mix(down(LayerNorm(x))))), with mix a depthwise Conv1d over
time). stt.parakeet.encoder.pre_block_kernel announces it and
pre_block_dim gives the projection width; the eight enc.pre_block.*
tensors are required when the KV is present, so a partial file is a
load error instead of silently running the plain v3 graph.

The block runs on the pre_encode output before xscaling, matching the
reference's encoder.pre_encode forward hook. Models without the KV
take the existing path unchanged. Also emit the KVs/tensors in
convert-parakeet.py and pin the depthwise mix kernel to the Conv bucket
in transcribe-quantize.
…able

Reject stt.parakeet.encoder.pre_block_kernel on the chunked (streaming)
attention styles at load and drop the block from the cache-aware
streaming graph, which no shipped checkpoint reaches with it.

In variable-length batches, zero each utterance's padded frames before
the block's depthwise time conv (k=15 otherwise mixes padding into the
last 7 real frames; 2.2e-2 max_abs at dec.enc_out on a 4-clip batch),
reusing the Conformer conv valid-frame mask. Run the conv through the
same direct depthwise op as the Conformer blocks so a batched utterance
uses one algorithm at every batch size (jfk x4 now bit-exact on CPU).

parakeet_smoke covers the KV checks and a fixture that announces the
block without its tensors failing to load.
The parakeet NeMo dumper loads FluidVoice checkpoints through the
publisher's fluid_speech.py fetched at the pinned revision (block
attached as a forward hook on encoder.pre_encode, clean mode off) and
dumps enc.pre_block.out; enc.pre_encode.out is captured with a
prepended hook so it stays the subsampler output.

The converter loads the .nemo directly, skips the clean_mode.* adapter,
requires fluid_speech.insert == 'pre' and a mix kernel matching
insert_dim/insert_kernel, and errors on encoder.fv_insert.* weights
without the config section.

Golden manifest pinned to FluidVoice-Labs/fluid-speech-pro@46027a3b;
enc.pre_block.out tolerance from the observed jfk drift.
The generic norm rules miss Fluid Speech Pro's pre-block LayerNorm scale,
so every quantized preset stored it as Q8_0/Q*_K and the loader (F32 only)
rejected the file. Mirror the norm and mix rules in reference_dtype_for.
parakeet_real_smoke accepts tdt-0.6b-fluid-speech-pro (v3 shape checks
plus pre-block KVs, tensor shapes and no streaming) and checks every
other variant carries no pre-block; decoder_smoke takes its jfk
transcript exactly. Batch golden on the orukeet clip list, frozen from
the F32 serial run. run_reference_parakeet_nemo.py loads FluidVoice
checkpoints through the publisher loader (--revision).
Accuracy and speed rows are pending the publication sweep and the rig benches.
The converter writes FluidVoice's clean-mode adapter instead of skipping
it: the rank-32 factors as enc.blocks.N.<module>.clean_mode.{a,b} for the
11 adapted modules, weight_ih_l0 @ decoder_input as
pred.lstm.0.clean_mode.bias, joint_hidden as joint.pred.clean_mode.bias,
and stt.parakeet.clean_mode.{rank,alpha,modules}.

The parakeet loader validates the adapter (all tensors present, shapes
and F32/F16 types match the KVs, no clean_mode tensors without the KVs)
and binds nothing, so output is unchanged. transcribe-quantize keeps the
factors at F16 in every preset (new Adapter bucket).
The GGUFs now carry the clean-mode adapter (F32 in the F32 file, F16 in
the others, about 55 MB); the runtime validates it but does not apply it
yet. Sizes and the validation pin follow the rebuilt files.

This branch has not been deployed

No deployments
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.

Support fluid-speech-pro

2 participants