Parakeet Ultra, ONNX export for Utter
ONNX graphs of moondream/parakeet-ultra, a post-trained version of nvidia/parakeet-tdt-0.6b-v3 (FastConformer encoder, TDT decoder, 0.6B parameters), exported for Utter, a local voice-dictation app. Utter runs them with onnxruntime from Rust.
Attribution and license
- Weights: Moondream, moondream/parakeet-ultra, CC-BY-4.0.
- Base model, tokenizer and audio front end: NVIDIA, nvidia/parakeet-tdt-0.6b-v3, CC-BY-4.0.
- This export: CC-BY-4.0. The changes are listed below.
What was changed
The weights are unchanged. The export, from Transformers' ParakeetForTDT, changes how
some operations are written, not what they compute:
- The encoder's pointwise (kernel 1) convolutions are matrix multiplies.
- Each depthwise convolution runs on an input zero-padded to a fixed 512 frames and sliced back. This is exact (the kernel reads at most 4 frames past the end, which are zeros either way) and lets cuDNN set the convolution up once instead of for every new input length. Limit: one pass takes at most 512 encoder frames, about 41 s of audio.
- The subsampling convolutions are written as strided slices and matrix multiplies.
- Eval-mode BatchNorm is folded into the depthwise convolutions.
Checked against Transformers on 70 clips from public test sets: identical tokens and text on all 70. English WER on 2,095 clips from the Open ASR Leaderboard's test sets: 7.3%, the same as the original weights in Transformers.
Variants
The repository root: encoder weights in float32 (2.4 GB).
fp16/: the same export with the encoder in half precision (1.2 GB), what Utter's Quality setting runs. Inputs and outputs stay float32 (cast inside the graph); the decoder and joint stay float32. English WER on the same 2,095 clips: the same as float32 (-0.02 points, within noise), and the encoder is a little faster on an RTX 3090 Ti.w8/: the half-precision export with the encoder's matrix-multiply weights in 8 bits (onnxruntime MatMulNBits, block 32, symmetric; 650 MB), for GPUs with little memory. On the same 2,095 clips its WER is the same as the original weights (+0.00 points, 95% interval -0.04 to +0.04), and on an RTX 3090 Ti the encoder takes about 5 ms more per clip. Utter's Light setting runs it in about 1.3 GB of GPU memory.i8/: for computers without a graphics card. The float32 export with the encoder's matrix multiplies in int8, activations quantized at run time (onnxruntime dynamic quantization: per-channel int8 weights, DynamicQuantizeLinear and MatMulInteger, which use AVX-512 VNNI or AVX-VNNI where the processor has them; 615 MB). On a Ryzen 9 9900X with 6 threads the encoder takes 17.7 ms per second of audio, against 28.0 ms for float32 and 114.6 ms forw8/(whose 8-bit weights and half-precision graph run dequantized on a processor). English WER on 500 clips of five public sets (AMI, Earnings-22, GigaSpeech, LibriSpeech other, VoxPopuli): 6.29%, against 6.11% for float32 and 6.09% forw8/. Rebuild it with Utter'sutter-speech quantize-cpu.
Files
| File | What |
|---|---|
encoder.onnx + encoder.onnx.data |
Mel features [1, T, 128] (the clip's valid frames, no mask) -> encoder frames projected for the joint [1, T', 640] |
decoder.onnx |
One prediction-network step: token [1, 1], h and c [2, 1, 640] -> output [1, 640], h', c' |
joint.onnx |
Encoder frames [N, 640] + decoder output [1, 640] -> logits [N, 8193 + 5] (tokens, then durations 0-4) |
step.onnx |
Decoder step and joint fused, with argmax: token, h, c, all encoder frames and a start frame -> token and duration index per frame from the start |
mel_filters.f32 |
Slaney mel filterbank [128, 257], little-endian float32 |
vocab.txt |
One SentencePiece piece per line, line number = id; β starts a word |
config.json |
Blank id, durations, front-end parameters |
Audio front end (as Transformers' ParakeetFeatureExtractor): 16 kHz mono; pre-emphasis 0.97;
centered STFT, n_fft 512, symmetric Hann window of 400 centered in 512, hop 160; power
spectrum; the mel filterbank; ln(x + 2^-24); per-mel normalization over the clip's frames
(unbiased standard deviation, epsilon 1e-5). Valid frames: samples // 160.
Decoding: greedy TDT. Start the decoder from the blank token; at each encoder frame take the argmax token and duration; emit and feed non-blank tokens; advance by the duration, by 1 on a blank with duration 0, or by 1 after 10 tokens on one frame.
- Downloads last month
- 11
Model tree for ductai199x/utter-parakeet-ultra-onnx
Base model
moondream/parakeet-ultra