Files

4.9 KiB
Raw Permalink Blame History

Qwen CPU TTS throughput tuning · 19 October 2026

Ryzen5 5600,6 physical cores/12 logical CPUs; existing Qwen0.6B Q8 CPU runtime0.4.2/ABI5, Anna speaker-only,24kHz monoPCM16, greedy seed42. Strata IQ3 262K remains loaded throughout; no GPU setting, model or Mac app changed. Separate bounded native systemd workers use6GiB RAM/no swap/Nice10, CPUQuota600% or800%; no persistent unit or additional service/container. The production sentence splitter and speech normalization are copied unchanged into the isolated test directory. Test text is synthetic.

Isolated TTS results (Strata loaded, not generating)

Generation/codec threads Frames CPU quota Quant Short RTF Story RTF
4/4 2 600% Q8 0.960 0.971
4/4 4 600% Q8 0.941 0.954
6/2 4 600% Q8 1.269 1.260
4/4 2 800% Q8 0.745 0.748
4/6 2 800% Q8 0.843 0.815

Q8 4/4/2 audio at600% and800% is byte-identical for short and story. Faster output is a CPU-budget gain, not quality degradation. Four-frame cadence slightly raises throughput but raises virtual startup reserve to290ms instead of60–74ms; rejected. Retain4/4/2.

Q4 talker from same pinned HF revision b7ee2e8c7459c3bea99da23e3d178125a7d1713c, SHA2564b468ec7b1f62b90ef4ca316c0aa57deadfd54b2cf9651703ea753cedaf04226, 628905056 bytes. Codec remains originalQ8. The native checkpoint-specific Q8 onset profile refuses Q4; the test correctly uses documented off instead of bypassing validation. Short text becomes17.36s audio with11.70s below RMS0.003 in10ms blocks, versusQ8 7.20s/1.81s quiet. RawRTF0.657 is misleading: extra silence makes it unsuitable for live talk. Stopped this candidate and remaining Q4 matrix; do not claim Q4 quality qualified. Downloaded Q4 assets are removed after testing; redownload pinned artifact if reproducing.

Real endpoint with simultaneous LLM generation

Existing token was used internally, never printed or committed. PCM response was read from Unraid through the actual neutral /v1/audio/speech endpoint. All synthetic LLM loads were admitted only at0active requests, max1536 output tokens, reasoning none; no real user chat was used as test material.

Scenario CPU budget TTS nice Generated audio Wall time RTF
No concurrent LLM 8 10 20.56s 15.104s 0.735
Concurrent Strata 8 10 20.56s 41.419s 2.015
Concurrent Strata 8 0 20.56s 36.587s 1.779
Concurrent Strata 12 0 20.56s 28.218s 1.372

Overlaps are35.742/35.358/27.112s respectively, recorded in endpoint JSONs. These test texts were not identical LLM decoding runs (normal stochastic server sampling); results establish a clear shared-resource limitation, not precise universal CPU scaling. Nice0 and twelveCPU test changes are reverted. Chunk-arrival reserve excludes physical speaker/Hermes playback. No claimed client listening acceptance or fix for app playback clicks.

Retained change and persistence

Only Deck CPU budget rises6→8, applied with docker update without restart; image6460872535b77f97, RAM44GiB, Q8weights,4/4threads,2frame blocks,Nice10 unchanged. Host installation.json now has cpu_limit:8; deploy/install.py uses that optional field on future recreations (default6 for other installations). Host canonical source is updated too. No new app build or sign-in is required. The application-container backup inventory supports nanocpus, but this is not a claim that it restores the Deck root container. Preserve installation.json (cpu_limit:8) for Deck recreation or explicitly set the same value during native restore. Automatic inclusion of this host manifest in every backup path was not verified in this tuning task.

Native reproduction needs the already documented native0.4.2 environment and pinned Q8weights from ../qwen06-native-cpu-2026-10-19. bench.py/run*.sh provide bounded experiments with explicit paths. In native systemd production apply CPUQuota=800% to the shared Deck service cgroup, keep native TTSworkerNice10, and leave memory/other limits unchanged. Reapply after daemon-reload/service activation under the existing maintenance rules. This hardware result does not qualify another host or a full fresh Debian restore.

Conclusion: real idle TTS gains about25% lower RTF and is comfortably faster than realtime on the tested text. Full concurrent Strata decoding still makes CPU TTS slower than realtime even with12logical CPUs. CPU tuning alone does not meet the live-talk target; no claim of a complete fix.

Follow-up22October:the requested longer passage did not reproduce the very long Q4 quiet intervals from this short-text trial. Q4 generated40.96s in30.36s, longest quiet interval0.56s, versus Q8 42.56s in44.47s,0.51s. This limits the earlier rejection to its tested samples; it is not evidence all Q4 text is poor. Michael subsequently selected Q4 as the production default. See the comparison and activation for scope and caveats.