Repository navigation
Expose Qwen3-ASR performance controls and cuda_perf preset - #1156
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expose independent Qwen3-ASR decoder performance controls and an opt-in
cuda_perfpreset. Explicit session options override the preset, includingfalse, F32 KV, alignment 1 and batch size 1.qwen3_asr.prefix)offcuda_perfattentionmixedflashpacked_projectionsfalsetruekv_cache_typef32f16kv_cache_alignment1256offline_batch_size12attentionalso acceptsautoandeager.Performance
Main
8da1c395versus the combined controls and memory fix. RTX 5090, Debug/CUDA 12.9, eight CPU threads, native Q8 packages. All measurements ran sequentially with automatic language detection, default 30-second chunking and unchanged generation limits. RTF uses total CLI request wall time divided by source-audio duration; warmup is excluded. Peak VRAM includes loading and warmup, sampled every 20 ms.The long-form session is one short warmup, one 178-second English request, then a different 180-second Danish request. Neither measured input is repeated. The FLEURS session is one short warmup followed by 500 distinct recordings in fixed order; 483 clips are at most 30 seconds and 17 require chunking.
cuda_perfRTFThe two distinct long requests take 12.2% / 19.0% less generation time, with 186 / 176 MiB less peak VRAM for 0.6B / 1.7B. The mostly short FLEURS workload instead has 24.6% / 17.6% higher RTF, despite lower peak VRAM. This trade-off is why the preset remains opt-in.
Separately, interleaved comparisons against the same combined settings before scratch reuse reduced peak VRAM by 218 / 222 MiB; average RTF changes were within ±0.3% and inside the observed run variation. All transcripts matched the pre-allocation-change version.
Accuracy
All 500 held-out FLEURS recordings were evaluated for each model and configuration: 100 each for Mandarin, English, German, Spanish and French. Human reference transcripts, identical files/order and normalization on both sides. These files were used for evaluation, not implementation iteration.
Corpus WER/CER sums edit counts before dividing by reference units. Normalization uses Unicode NFKC/casefold, retains accents, removes punctuation apart from internal apostrophes, and unifies typographic apostrophes. Mandarin uses character error rate with whitespace/punctuation removed. No spoken-number normalization.
Changes are small and mixed, not strict numerical/output parity. Some edit-count changes reflect formatting, such as digits versus written time expressions. The long-form recordings do not have verified reference transcripts, so no long-form WER is claimed.
Validation
Vulkan
PR default versus PR
cuda_perfon an RTX 5090, using the same Debug binary, Q8 packages, eight CPU threads and the long-form session described above: one short warmup, then distinct 178-second English and 180-second Danish requests. Default chunking and generation limits. RTF excludes warmup; peak VRAM covers the whole session with 20 ms sampling. Measurements ran sequentially.cuda_perfRTFcuda_perfpeak VRAMOne session per model/mode; the small 0.6B timing difference may be run variation. All requests completed, with all five preset controls active on Vulkan. In a separate 28-second, two-chunk reference test, both models had 0/82 word errors. No long-form WER or bitwise cross-backend parity is claimed.
AMD HIP
AMD Radeon 8060S (gfx1151), ROCm 7.2.1, native Q8 packages, eight CPU threads, one Debug/C++17 binary. Sequential A–B–C–C–B–A comparison: PR default,
cuda_perf, andcuda_perfwith--backend-impl gfx1151_v1. Each session uses a short warmup followed by two different repository recordings (327.6 s and 167.3 s). RTF excludes warmup and averages two sessions per configuration. These recordings differ from the CUDA/Vulkan English/Danish pair above.cuda_perfRTFcuda_perf+gfx1151_v1RTFAll 12 sessions (36 requests) completed. Preset and preset-plus-kernel transcripts matched exactly. The preset substantially reduces generation time; selecting
gfx1151_v1adds no speedup in this workload. This comparison does not establish WER equivalence against PR default.Metal
About 20% lower RTF