Repository navigation
Conversation
codec_audio_lm_backbone_req::n_ubatch == 0 made the runner use n_ctx as the micro-batch, so the context reserved a compute buffer for the whole context at once: 2.5 GB for Qwen3-TTS 0.6B (n_ctx 4096) on every load, 172 MB for Soprano. A model whose prompt needs one physical batch still says so (OuteTTS: 4096); otherwise the runner now uses llama.cpp's default of 512 and llama.cpp splits longer prompts. tts-cli / tts-server take --ubatch N (tts_runner_params::n_ubatch). Verified on CPU (8 threads): - Qwen3-TTS 0.6B Base, ICL clone: compute buffer 2502 -> 313 MiB, output bit-identical to --ubatch 4096, same timing. - Soprano, prompt shorter than 512 tokens: bit-identical; a ~500-token prompt (split in two): first 6 s at 35-46 dB SNR (summation order), then a greedy step flips and the generations diverge, as any float change does. Peak RSS 932 -> 872 MB, compute buffer 172 -> 22 MiB.
This reverts commit f3e3e5d.
…h, default 512) Replaces the reverted implementation: both parts touch public headers (codec_audio_lm.h n_ubatch meaning, tts_runner.h host field), so they come as a proposal with the evidence for where the model-specified value came from. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Now a proposal only. The implementation is reverted on this branch (bfe476f reverts f3e3e5d). Both parts of the change touched public headers: the meaning of
codec_audio_lm_backbone_req::n_ubatchininclude/codec_audio_lm.h, and a host field incommon/tts_runner.h.docs/proposals/backbone-ubatch.mdcovers:examples/tts.py(7afe2ab) setn_ubatch = n_ctxwithout giving a reason, and the C++ host copied it. OuteTTS's 4096 (f10a3d5) was a cap that came with its 8192-token context, not a requirement.n_ubatch >= n_tokensonly for non-causal attention (llama-context.cpp:1750) or encoders. Every backbone here is a causal LM.n_ubatchthe way llama.cpp does (default 512,-ub/--ubatch-size). The struct field becomes a minimum that the model requires, and every family sets it to 0. There are no "0 means n_ctx" semantics.Net diff vs main: one new doc file.
🤖 Generated with Claude Code