Skip to content

new asr model: parakeet_tdt: add Underdog Bark 3.0 Pro English ASR - #1130

Merged
0xShug0 merged 3 commits into
0xShug0:mainfrom
mirek190:agent/underdog-bark3-pro-20261029
Oct 29, 2026
Merged

0xShug0 merged 3 commits into
0xShug0:mainfrom
mirek190:agent/underdog-bark3-pro-20261029

Conversation

@mirek190

@mirek190 mirek190 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds Underdog Bark 3.0 Pro as an experimental English ASR variant of the existing parakeet_tdt community family. The pinned converter applies the input-projection/BatchNorm compatibility transforms and produces self-contained F32, BF16 and protected mixed Q8_0 GGUFs. The model-local adapter preserves the publisher's 250 ms prefix and returns timestamps on the original recording timeline, including independent VAD speech spans.

The packages embed tokenizer/configs, model spec v1, source/conversion provenance, NOTICE and the full CC-BY-4.0 license. CLI, legacy HTTP and buffered streaming reuse the existing Parakeet runtime. Full context is the default, matching the publisher. No shared framework, graph-optimizer implementation, backend/kernel or parallel-slot changes are included; stock Parakeet and Phonon paths are preserved. Downloads remain manual conversion, without advertising unpublished model-manager packages.

Follow-up fixes now included

  • CPU allocation: preserve Bark CPU graph view nodes through allocation so ggml can reuse large backing buffers between layers. Release the one-shot position-projection producer after copying its outputs. This enables the full five-minute recording without chunking or transcript changes.
  • Q8 fidelity: retain decoder.*, encoder_projector.* and joint.head.* at their exact source BF16 values. The converter verifies that this storage is lossless for those tensors. The full test recording now matches the F32 reference exactly on CPU/CUDA/Vulkan. Q8 is still approximate for the quantized encoder.
  • Offline VAD: opt-in Silero speech-span processing; each independent span gets the required prefix and corrected absolute timestamps. Silence and token budgets are handled. VAD remains an offline operation.
  • Native hotwords: opt-in vocabulary bias, word/spoken variants and HTTP/streaming prompts reuse the existing native policy. Empty/zero-score controls retain unbiased output. Invalid options return HTTP 400 and a following valid request succeeds. This is a native extension, not a feature of the publisher's runner.

Five-minute CPU full-context memory

Measurement Before After
CPU graph buffer 37,815,713,312 bytes (35.2 GiB) 2,812,205,088 bytes (2.62 GiB)
Graph-buffer reduction 92.56%
Total peak process RAM, F32 Could not complete safely 5.17 GiB
Total peak process RAM, protected Q8 Not measured 4.45 GiB
Full original F32-reference transcript Unavailable Exact match, no chunking

The graph buffer and total process RAM are separate measurements. CPU single-request processing was 48.986 s F32 and 62.621 s protected Q8, including full-graph creation after a short warmup. CPU timing varied; this is a CPU memory/quality fix, not a CPU speedup claim.

Complete five-minute recording versus original PyTorch on RTX 3090

Same 299.99375 s mono 16 kHz input and eight host threads. GPU times exclude model loading/file I/O, include preprocessing/generation/text decoding, and are the median of the last two of three full runs after a short warmup. The original checkpoint runs in Transformers 5.19.0 / PyTorch 2.8.0; the publisher's unmodified CUDA/BF16 runner was also executed and matched the original-reference harness. Native figures below are from the follow-up build.

Implementation Backend Storage / execution dtype Warm time Extra peak VRAM, including model Transcript vs original F32
Original PyTorch CUDA F32 2.436 s 5.39 GiB Reference
Original PyTorch CUDA BF16 2.049 s 2.85 GiB One punctuation/case change
audio.cpp CUDA F32 GGUF 0.859 s 5.19 GiB Exact match
audio.cpp CUDA BF16 GGUF 0.820 s 5.03 GiB Exact match
audio.cpp CUDA Protected mixed Q8_0 GGUF 0.801 s 4.51 GiB Exact match
audio.cpp VULKAN F32 GGUF 0.899 s 5.33 GiB Exact match
audio.cpp VULKAN BF16 GGUF 0.908 s 5.04 GiB Exact match
audio.cpp VULKAN Protected mixed Q8_0 GGUF 0.892 s 4.61 GiB Exact match

All six native GPU results now match the original F32 transcript exactly, including punctuation and case. The native CPU F32 and protected-Q8 whole-recording runs do too. Native CUDA F32 takes about 64.7% less processing time (2.84x throughput) than the original F32 baseline on this input.

VRAM is sampled device-total usage minus each pre-process baseline, including model/workspace/backend caches. Native BF16/Q8 labels describe storage, not the same activation arithmetic as PyTorch BF16. Native BF16 uses more VRAM than original PyTorch BF16. These are measurements on one recording/machine, not corpus-level accuracy or performance guarantees.

The new Q8 file is 908,687,328 bytes, down from 915,914,384 bytes (7,227,056 bytes smaller), because some LSTM tensors previously remained F32 in the generic conversion. Reconvert existing GGUFs for the updated embedded feature metadata and protected Q8 profile.

Validation performed

  • Windows Release CPU-only and combined CUDA/Vulkan builds: MSVC 14.43, CUDA 12.4, Vulkan SDK 1.4.350.0.
  • 81/81 exact-transcript and bounded-timestamp checks: six unique original-PyTorch fixtures plus short/long/short repeats across F32/BF16/Q8 and CPU/CUDA/Vulkan, with one reused session and the full-context default.
  • Eight native full-recording configurations match the original F32 transcript exactly: CPU F32/Q8, CUDA F32/BF16/Q8 and Vulkan F32/BF16/Q8.
  • 66 server checks, 22 per backend: mixed-length/silence requests; hotword enabled, zero, empty and pronunciation controls; VAD speech/silence, timestamps and token budgets; five malformed-option cases return 400 with recovery; repeated raw-PCM HTTP/SSE requests with and without prompts.
  • Default-path Silero CLI transcription; bounded high-strength hotword positive control proves token selection is active (not a recommended quality setting).
  • A weight-free allocation regression measures 32 dependent views without allocating the old large layout, then executes the corrected graph and verifies exact values.
  • Relevant lifecycle/prefix/timestamp/resampling, variant, hotword, GGUF-resource and model-spec CTests pass in CPU/GPU builds; five Bark conversion checks and all 13 existing Phonon conversion checks pass.
  • Stock Parakeet golden offline/long-form/stereo/fixed-window/streaming-reset regressions, Phonon Q8 transcript, loader/catalog sync and diff checks pass.
  • Initial F32 CPU intermediate encoder parity: maximum absolute error 1.684e-6 over 96 valid LibriSpeech frames.

Reproduce (GPU build; initialize your compiler and CUDA/Vulkan SDK environment first):

cmake -S . -B build/bark3 -G Ninja -DCMAKE_BUILD_TYPE=Release \
  -DAUDIOCPP_MODEL_SET=custom -DAUDIOCPP_MODELS=parakeet_tdt \
  -DENGINE_ENABLE_CUDA=ON -DENGINE_ENABLE_VULKAN=ON \
  -DENGINE_BUILD_TESTS=ON -DENGINE_BUILD_MODEL_TESTS=ON \
  -DENGINE_BUILD_WARMBENCH=ON
cmake --build build/bark3 --target audiocpp_cli audiocpp_server audiocpp_gguf \
  parakeet_warm_bench parakeet_bark3_session_test parakeet_variant_config_test
ctest --test-dir build/bark3 \
  -R 'parakeet_bark3_session_test|parakeet_variant_config_test' --output-on-failure
python -m unittest discover -s tests/parakeet_tdt -p test_bark3_conversion.py

The model guide contains pinned download/conversion commands, standalone model paths and CLI/server examples. The validation record and original-runner comparison contain exact run commands, fixture details, artifact paths, package hashes and timing/memory methodology. The original reference/timing helper and native parity harness are included under tests/parakeet_tdt/.

Remaining limits

  • English only is the checkpoint's declared scope. Changing a runtime flag does not provide validated multilingual support.
  • Streaming is buffered, not native cache-aware. Whole-utterance normalization and bidirectional attention change earlier activations when future audio arrives; exact standard KV reuse needs a different trained attention/context contract.
  • Full-context attention still grows with duration and retains the existing encoder frame limit. Opt-in VAD/windowing or vocabulary bias can change output relative to the unbiased whole-recording reference.
  • Quantized encoder weights can differ on other recordings despite exact matches here. Metal/HIP and large-corpus WER remain untested. GitHub CI is separate from the local model runtime validation.

@mirek190 mirek190 changed the title parakeet_tdt: add Underdog Bark 3.0 Pro English ASR new asr model: parakeet_tdt: add Underdog Bark 3.0 Pro English ASR Oct 29, 2026
@mirek190
mirek190 marked this pull request as draft October 29, 2026 14:54
@mirek190

Copy link
Copy Markdown
Contributor Author

Pushed the validated follow-up in 889e3161. The first post and validation documentation now contain the updated results.

The CPU graph was retaining large temporary backing buffers after view nodes were pruned before allocation. The Bark-only CPU policy now preserves those lifetime boundaries and releases the one-shot position-projection producer after copying its outputs. No shared optimizer implementation or backend/kernel behavior was changed.

Measurement Before After
Five-minute full-context CPU graph buffer 35.2 GiB 2.62 GiB (-92.56%)
Total peak CPU process RAM, F32 Could not complete safely 5.17 GiB, including model
Total peak CPU process RAM, Q8 Not measured 4.45 GiB, including model
Q8 GGUF size 915,914,384 bytes 908,687,328 bytes
Q8 full-recording transcript Small punctuation/case differences Exact original F32-reference match on tested backends

Q8 now retains the decoder, encoder-to-joint projection and output head at their exact source BF16 values. Conversion verifies those protected values are losslessly representable. This also makes the package 7,227,056 bytes smaller, since some LSTM tensors previously remained F32. Encoder quantization remains approximate; the exact matches here are validation results, not a universal accuracy guarantee.

New opt-in native controls: offline Silero VAD with a prefix per independent speech span and corrected absolute timestamps; hotword lists, pronunciation variants and HTTP/streaming prompts. Silence, token budgets and disabled-bias controls are covered. Malformed options return HTTP 400 and subsequent valid requests succeed. These are native extensions rather than features of the publisher's original runner.

Validation: 81/81 original-reference transcript/timestamp checks; 66 server checks across CPU/CUDA/Vulkan; exact complete five-minute transcripts for CPU F32/Q8 and CUDA/Vulkan F32/BF16/Q8. Focused CTests, five Bark converter checks, existing Parakeet regressions, Phonon checks and catalog sync pass. The allocation regression measures the old layout without allocating it, then executes the corrected layout and checks exact values.

English-only support and buffered rather than native cache-aware streaming remain checkpoint limitations. Full-context memory still grows with recording length. Fresh GitHub CI is running; the results above are the completed local runtime checks.

@mirek190

mirek190 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Implemented safe reuse of streaming audio preprocessing.

Five-minute recording, Q8, median of five runs with matching thread settings:

Backend Before After Time saved
CUDA 3.154 s 2.735 s 13.3%
Vulkan 4.451 s 3.911 s 12.1%

Quality: 81/81 streaming comparisons retained identical text and word timestamps across CPU/CUDA/Vulkan and F32/BF16/Q8. All 66 server checks and 10 focused CTests passed.

@mirek190
mirek190 marked this pull request as ready for review October 29, 2026 16:44
@0xShug0
0xShug0 merged commit 1f5dc02 into 0xShug0:main Oct 29, 2026
7 checks passed
@0xShug0

0xShug0 commented Oct 29, 2026

Copy link
Copy Markdown
Owner

@mirek190 Thanks! PR merged.

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.

2 participants