Underdog Bark 3.0, ONNX
Underdog Bark 3.0 by Conway Research, an English speech recognition model
fine-tuned from NVIDIA's parakeet-tdt-0.6b-v3, exported to
ONNX for slicc-ortllama and plain onnxruntime. It was converted from
model.bark at revision 85db2ad. That file is unpacked exactly with the source repo's own
bark_loader.py, then exported with torch.onnx.export.
Files
| Variant | Encoder | decoder_joint | Size |
|---|---|---|---|
| fp32 | onnx/encoder_model.onnx |
onnx/decoder_joint_model.onnx |
2,509 MB |
| fp16 | onnx/encoder_model_fp16.onnx |
onnx/decoder_joint_model_fp16.onnx |
1,291 MB |
| q8 | onnx/encoder_model_quantized.onnx |
onnx/decoder_joint_model_quantized.onnx |
911 MB |
| q4f16 | onnx/encoder_model_q4f16.onnx |
onnx/decoder_joint_model_q4f16.onnx |
524 MB |
A variant is the encoder and decoder_joint graphs that share a suffix. The decoder_joint graph (prediction network and joint, ~70 MB) is fp32 in every variant.
Graphs
encoder_model*.onnx:
- Inputs:
input_featuresf32[B, T, 128]andattention_maski64[B, T]. - Outputs:
encoder_outputsf32[B, T', 640], the FastConformer output afterencoder_projector, 8x subsampled;encoder_lengthsi64[B].
decoder_joint_model*.onnx computes one greedy TDT step:
- Inputs:
encoder_outputsf32[B, 1, 640], one encoder frame;input_idsi64[B, 1], the last non-blank token (blank8192before the first);state_handstate_cf32[2, B, 640].
- Outputs:
token_logitsf32[B, 8193];duration_logitsf32[B, 5], overdurations[0, 1, 2, 3, 4];state_h_outandstate_c_out.
Greedy decoding, the way transformers' ParakeetForTDT.generate() does it:
- Start at
t = 0withlast = 8192and zero states. - At frame
t, taketok = argmax(token_logits)anddur = durations[argmax(duration_logits)]. - If
tokis blank, advance bymax(dur, 1)and leave the state as it is. - Otherwise, emit
tok, setlast = tok, takestate_*_out, and advance bydur(0 stays on the frame). - Stop when
t >= encoder_lengths.
Text is the emitted SentencePiece pieces joined, with ▁ turned into a space. Consecutive repeats are not merged.
Features
The log-mel features are computed outside the graphs. preprocessor_config.json lists every parameter of
transformers' ParakeetFeatureExtractor:
- 0.25 s of leading silence;
- pre-emphasis 0.97;
- centred STFT, n_fft 512, hop 160, symmetric Hann(400);
- power spectrum into 128 Slaney mel filters;
log(x + 2^-24);- per-feature mean and unbiased std over the valid frames,
floor(samples / 160), with1e-5added to the std; - padded frames set to 0.
export/tdt.py is a NumPy reference client. fixture/ holds one clip, its features from
transformers, the mel filters, the encoder output, and the expected tokens, durations and text for every parity
clip and variant.
Parity
The reference is transformers' feature extractor plus generate() on the unpacked fp32 weights. It was run on 20
English clips made with macOS say. The export was run on the same features, decoded greedily by tdt.py, with word
error rate as slicc-ortllama computes it (case and punctuation folded). fp32 on tdt.py's own NumPy features also
matches token for token. fp16 emits the same tokens as PyTorch on every clip, but on some x86 hosts a blank step or
a duration can move by one frame.
| Exact tokens and durations | Same emitted tokens | WER vs PyTorch | WER vs script | |
|---|---|---|---|---|
| PyTorch fp32 | 20/20 | 20/20 | 0 | 5.72% |
| fp32 | 20/20 | 20/20 | 0.00% | 5.72% |
| fp16 | 19/20 | 20/20 | 0.00% | 5.72% |
| q8 | 4/20 | 18/20 | 1.37% | 5.05% |
| q4f16 | 0/20 | 13/20 | 2.05% | 5.72% |
License
CC-BY-4.0, the same as the source; see NOTICE. The model derives from:
- Underdog Bark 3.0 by Conway Research;
- nvidia/parakeet-tdt-0.6b-v3 by NVIDIA;
- moondream/parakeet-ultra by Moondream.
The conversion recipe is in export/, from ai-ecoverse/models.
- Downloads last month
- 22
Model tree for ai-ecoverse/Underdog-Bark-3.0-ONNX
Base model
nvidia/parakeet-tdt-0.6b-v3