Files

6.4 KiB
Raw Permalink Blame History

Qwen Q4 audio-codec comparison ·22 October2026

Rejected as a speed improvement. Same Anna reference and Q4 talker, Q8codec mean22.519s versus Q4codec23.189s for17.76s speech under simultaneous bounded Strata load. Original production workers and settings never changed. Q4 is therefore not added to the production component recipe and no image update is needed. Final endpoint running, Strata/TTS/STT loaded,0active requests.

Public candidate and compatibility

Same repository/revision as the existing assets: Serveurperso/Qwen3-TTS-GGUF@b7ee2e8c7459c3bea99da23e3d178125a7d1713c.

Codec file Bytes SHA-256
qwen-tokenizer-12hz-Q8_0.gguf 291150624 1883beeed99348fc35e23dd225e9082f93f6f8c109330a33d935baa8acdbfd94
qwen-tokenizer-12hz-Q4_K_M.gguf 254974752 cf3788b4d50aaa665fb6e57c170396aae03a3555fea52d2b5d0cda902d658039

The Q4 file is downloaded from its pinned public URL and checksum-verified. GGUF headers show identical tensor names/shapes;62decoder tensor types and 48encoder tensor types change. Decoder weight bytes fall201270724→177677764; 151135684bytes of F32/F16 decoder weights remain unchanged. That unchanged portion is75.1% of the original decoder's stored bytes, not75.1% of its parameter count or runtime work. Full codec file size falls12.4%.

The existing native CPU0.4.2/ABI5 runtime successfully loads and synthesizes with both codecs. No library patch, new package, image, Hermes change, profile change, production weight replacement or new persistent service was required. This confirms the tested compatibility, not universal codec qualification.

Controlled comparison

Existing Ryzen5 5600, TTS CPUs2–5/8–11(two exclusive physical cores plus two shared with Strata),2generation/2codec threads,2stream frames, Nice10, CPU flash attention off, same Q4talker, seed42, greedy, speaker-only Anna, same application speech preprocessing/sentence splitter and max1024tokens per sentence. Strata IQ3dual remains loaded with unchanged CPU/GPU/context settings. All synthetic LLM requests use512output tokens, temperature0 and reasoning none. No real user conversation or incoming call is used as input.

Arm Speech Synthesis RTF First PCM Calculated extra startup reserve
Q8 A 17.76s 22.650s 1.275 0.392s 4.608s
Q4 A 17.76s 23.015s 1.296 0.444s 4.963s
Q4 B 17.76s 23.362s 1.315 0.540s 5.207s
Q8 B 17.76s 22.389s 1.261 0.386s 4.394s

Two runs per codec in ABBA order. Q4's observed mean is3.0% slower; this small sample is evidence of no demonstrated speed gain, not a universal3% penalty. LLM generation covers88.6–91.5% of speech synthesis; gaps remain between bounded requests. Peak native RSS is approximately69MiB lower with Q4. All memory-event counters remain unchanged, no measured external-request overlap or monitoring failure. Neither codec reaches realtime.

The comparison uses a separate short-lived native worker inside the existing Deck container. The production Q8 worker stays resident and idle; the test adds a second model footprint. Initial admission requires7GiB host available RAM and6GiB cgroup headroom. The test worker has an8GiB virtual-address limit and60second cooperative synthesis timer, with bounded protocol waits and targeted cleanup of only the identified test process. These are not a separate hard RSS cgroup. health.low_memory would flag headroom below1.5GiB; it did not occur. Production PIDs remain Qwen855546/Strata855651 for every measured arm. The CPU-policy file is checked unchanged after each run.

Each native instance loads/caches the same existing Anna reference in memory and runs the same short warmup first. No reference copy is made. Measured times exclude model loading/warmup and WAV writing; they measure native callback arrival rather than the normal HTTP speech endpoint or actual phone playback. Both arms use the same path. Scalar native profiles show almost all elapsed time is within native synthesis; they do not distinguish talker, code predictor, codec computation and CPU scheduling waits.

Audio and cleanup

Both A-run WAVs are valid24kHz mono PCM16 with426240samples/17.76s and no clipped samples. Their aligned waveform correlation is0.98939. These are technical checks, not subjective listening, a speaker-identity score or proof of equal quality. Local synthetic listening samples are kept outside Git under outputs/tts-codec-q4-20261022/; the original Anna reference is never exported.

After all four measurements the test processes exit. The exact six files in the isolated state experiment folder(public Q4GGUF, worker script and four synthetic WAVs) are removed after checking no matching test process is active: 258389921bytes released. The now-empty state experiment folder is removed. Only reproducible scripts/technical results remain in the separate maintenance directory /opt/athena-deck-dev/tts-codec-q4-20261022 and this report; two local synthetic WAVs remain available for listening. No scheduler hook or monitor is left running. Production continues with its original Q8codec and Anna.

Reproduction and native restore

prepare.py downloads only the pinned public Q4candidate and copies the test worker. inspect_codecs.py reads only the two public GGUF headers. bench.py consumes an existing API key as stdin JSON, discovers only the managed Deck process descendants, refuses active requests and runs one requested arm. No API key is passed in arguments or stored in results. Adapt its Athena paths explicitly if reproducing; the Docker adapter is only for today's experiment.

For native Debian/systemd use the already documented0.4.2CPU environment and application source on PYTHONPATH, run worker.py directly with the actual model/codec/reference paths and validated CPU topology as stdin configuration, then issue the same warmup/test protocol. Observe the same RAM admission and ensure cleanup affects only that experiment worker. No additional production installer, backup or restore dependency is introduced because this candidate is rejected and removed. Original voices/models/configuration remain covered by their existing encrypted-backup recipes; full native host restoration is still the separately documented open qualification task.

Reproduce only in idle time, complete the bounded runs and remove the candidate afterwards. No rollback of production is necessary: no production setting was changed. The existing component recipe intentionally remains pinned to Q8.