Repository navigation
Reduce OmniVoice generation copies and add streaming timings - #1013
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
Remove redundant copies in OmniVoice generation and add streaming component timings.
FlashPreserveViewslowering for CUDA flash attention. Keep the current repeated K/V heads, F32 accumulation, masking, and scaling.session.wall_msthrough the existing framework profiler.These changes apply automatically; no new options are introduced. The existing
omnivoice.perf_modedefault remains unchanged. All changes are local to OmniVoice, with no framework or ggml edits.CUDA streaming performance
Baseline: main
0bf4d155, default model settings withomnivoice.perf_mode=flash_attention. Both sides use text chunks of 120 characters, the default 32 diffusion steps, and four threads. Hardware: RTX 5090, CUDA 12.9; Debug build with-O3 -g, CUDA graphs and OpenMP enabled. The existing build cache was reused.Five paired rounds per workload, alternating A/B order. Values below are median RTF; lower is better. RTF uses synthesis
session.wall_msdivided by final WAV duration and excludes model loading.Duration-weighted RTF across all rounds: 0.10294 -> 0.09866 (-4.15%). All 30 paired streaming measurements improved. The five round totals improved by 4.92%, 4.06%, 4.48%, 2.84%, and 4.45%.
Main did not emit streaming component/session timings, so the measured baseline includes only the same timing instrumentation used by the PR. Six stock-main vs timing-only baseline WAV comparisons were byte-identical.
Validation
mem_saver=true; and nonzero class-temperature sampling.qwen3-tts, with logging enabled.git diff --checkpasses.CPU and Vulkan runtime performance were not measured. Their attention lowering is unchanged; the common logits change only removes a host-vector copy. This does not claim universal parity across all hardware or inputs.
Local reproducibility artifacts, binaries, case files, comparison logs, and the full report are retained under
logs/omnivoice-optimizations/(not included in the PR).