From 1892303c7fc5c0242fb1aa345b14bd672245bd7b Mon Sep 17 00:00:00 2001 From: Mikei386 <44135113+Mikei386@users.noreply.github.com> Date: Thu, 22 Oct 2026 16:32:11 +0200 Subject: [PATCH] Record isolated RX470 Vulkan Qwen Q4 test and full cleanup --- docs/CURRENT_SYSTEM.md | 10 ++ .../tts-rx470-2026-10-22/README.md | 118 ++++++++++++++++ .../tts-rx470-2026-10-22/audio-check.json | 7 + .../tts-rx470-2026-10-22/baseline.json | 8 ++ .../experiments/tts-rx470-2026-10-22/bench.py | 130 ++++++++++++++++++ .../tts-rx470-2026-10-22/build-flags.json | 15 ++ .../tts-rx470-2026-10-22/cleanup.json | 10 ++ .../tts-rx470-2026-10-22/evidence.json | 18 +++ .../tts-rx470-2026-10-22/prepare.py | 63 +++++++++ .../tts-rx470-2026-10-22/results.json | 53 +++++++ 10 files changed, 432 insertions(+) create mode 100644 docs/experiments/tts-rx470-2026-10-22/README.md create mode 100644 docs/experiments/tts-rx470-2026-10-22/audio-check.json create mode 100644 docs/experiments/tts-rx470-2026-10-22/baseline.json create mode 100644 docs/experiments/tts-rx470-2026-10-22/bench.py create mode 100644 docs/experiments/tts-rx470-2026-10-22/build-flags.json create mode 100644 docs/experiments/tts-rx470-2026-10-22/cleanup.json create mode 100644 docs/experiments/tts-rx470-2026-10-22/evidence.json create mode 100644 docs/experiments/tts-rx470-2026-10-22/prepare.py create mode 100644 docs/experiments/tts-rx470-2026-10-22/results.json diff --git a/docs/CURRENT_SYSTEM.md b/docs/CURRENT_SYSTEM.md index 4c508e1..e1b867b 100644 --- a/docs/CURRENT_SYSTEM.md +++ b/docs/CURRENT_SYSTEM.md @@ -1,3 +1,13 @@ +## AT-Helper RX470 Qwen Q4 test ·22 October2026 + +Unmodified upstream qwentts.cpp5916bf7/ABI6 builds for the no-AVX Xeon and uses +Vulkan0/RX470 with the existing Anna reference. Two warmed PCM runs:22.08s audio +in64.721/64.635s, RTF2.93; GPU100%, peak1.90GiB VRAM. This tested configuration +does not support realtime conversation. Original Piper PID/service state and +Athena/Strata/TTS connection unchanged. Temporary loopback-only server, source, +build, model copies, shader cache and private reference removed; no deployment. +[Full conditions, limits, cleanup and native reproduction](experiments/tts-rx470-2026-10-22/README.md). + ## TTS Q4codec comparison ·22 October2026 Native0.4.2 loads the pinned Q4codec with the same Q4talker and Anna reference, diff --git a/docs/experiments/tts-rx470-2026-10-22/README.md b/docs/experiments/tts-rx470-2026-10-22/README.md new file mode 100644 index 0000000..abe7df8 --- /dev/null +++ b/docs/experiments/tts-rx470-2026-10-22/README.md @@ -0,0 +1,118 @@ +# Qwen Q4 with Anna on AT-Helper RX470 ·22 October2026 + +Michael authorized an isolated test only; Strata and the running TTS connection +must remain unchanged. **The tested Vulkan configuration is too slow for live +conversation:** two warmed runs produce22.08s audio in64.721s/64.635s, RTF2.93. +The test is removed, no production migration or permanent installation made. + +## Hardware and exact upstream + +AT-Helper(`at-helper.scc.kit.edu`), Debian13.7, XeonX3450 four cores/eight SMT, +no AVX/AVX2/F16C/FMA,8GiB system RAM; RadeonRX4708GiB, RADV Polaris10, +Mesa25.0.7-2+deb13u1, Vulkan1.4.305. Dedicated GPU is Vulkan0, not llvmpipe. +The backend reports fp16=0,bf16=0,int dot=0 and no matrix cores. + +Unmodified[ServeurpersoCom/qwentts.cpp](https://github.com/ServeurpersoCom/qwentts.cpp) +commit`5916bf7c79dbb4e66fc059cdc507a79a23a28bb4`, GGML submodule +`cc5df49a6b878db2b68b9a7b45976e279594627d`, public ABI6. Git status verified +clean after build/test. Existing tools suffice: CMake3.31.6-2,Ninja1.12.1-1, +GCC/G++14.2.0,glslc2025.2-1,libvulkan-dev1.4.309.0-1. No packages installed. + +Release build with upstream options only: Vulkan on, shared library on, +GGML_NATIVE/AVX/AVX2/F16C/FMA/AVX512/BMI2/BLAS off, two build jobs at Nice10. +Full flags and successful binary checksums are included. The upstream C ABI +probe runs on this non-AVX CPU. No source patches, model conversions, GPU clock, +power-cap, BIOS, fan, driver or kernel changes. + +Public models from +`Serveurperso/Qwen3-TTS-GGUF@b7ee2e8c7459c3bea99da23e3d178125a7d1713c`: + +| File | Bytes | SHA-256 | +| --- | ---: | --- | +|qwen-talker-0.6b-base-Q4_K_M.gguf|628905056|4b468ec7b1f62b90ef4ca316c0aa57deadfd54b2cf9651703ea753cedaf04226| +|qwen-tokenizer-12hz-Q8_0.gguf|291150624|1883beeed99348fc35e23dd225e9082f93f6f8c109330a33d935baa8acdbfd94| + +Both downloaded into the isolated test directory and checksum-verified. The +existing KoboldCpp/F16 assets and Piper files are neither replaced nor edited. + +## Streaming test and observed result + +The upstream `tts-server` runs temporarily as the existing restricted +`athena-tts` user, binds **127.0.0.1:18129 only**, explicitly selects Vulkan0, +and uses `--no-fa`, German, max-batch1. A collected transient systemd unit +limits RAM to6GiB, swap0,tasks128, runtime600s,Nice10. Its shader cache is +redirected into its temporary directory. No persistent service file is created. + +The existing Anna reference is streamed over encrypted SSH pipes to a0600 +temporary file, uploaded only to this server's loopback voice-registration API, +and deleted immediately after registration. Base speaker-only cloning has no +reference transcript. Voice latents live only in the temporary process. +No original voice reference, embedding, API key or model weight enters Git. + +The same neutral German passage used in the Athena experiments is submitted as +three sentence requests, seed42, talker/subtalker temperature0, repetition1.05, +max1024audio tokens per sentence. Measure PCM arrival, not buffered WAV mode. +Warmup precedes both complete runs; loading/voice preparation are excluded. +No synthetic Strata load is sent: this is offloading to independent hardware. + +| Request | Wall time | Audio | RTF | First PCM | Largest packet gap | Extra startup reserve | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | +|Short warmup|8.472s|2.08s|4.073|2.074s|1.838s|4.398s| +|Warmed run1|64.721s|22.08s|2.931|0.506s|1.845s|42.306s| +|Warmed run2|64.635s|22.08s|2.927|0.509s|1.845s|42.217s| + +Model startup4.075s, one-time voice preparation2.987s. GPU reached100% busy and +2043404288bytes(~1.90GiB) VRAM. Logs explicitly confirm Talker Vulkan0 and the +RX470 device. GPU busy is an aggregate driver metric, not proof of a specific +kernel bottleneck. No CPU/software-Vulkan fallback is claimed as the cause. +An incidental diagnostic read showed1242MHz GPU clock and300MHz memory clock; +clock readings were not synchronized into the GPU sample trace, so they do not +establish sustained memory-clock behavior or its performance impact. Power +mode stays auto. These results qualify this configuration, not every possible +RX470 runtime or power profile. + +The passage yields22.08s here versus17.76s on the prior CPU backend. Hardware, +runtime revision and streaming cadence differ; do not treat total wall-time +ratios as a controlled backend speed comparison. Realtime failure on this host +is nevertheless direct: generation takes2.93times playback duration. A large +startup buffer would add tens of seconds of latency for this short passage. + +The retained sample is valid24kHz monoPCM16, peak0.298,RMS0.0301, no clipped +samples. No subjective speaker-identity/quality score and no Conduit call test. +The generated local sample is outside Git at +`outputs/tts-rx470-20261022/anna-rx470.wav`. + +## Cleanup and unchanged production + +Existing Piper API retains PID154082 and its13October start time, active/enabled; +the older optional KoboldCpp service remains inactive/disabled. Before/after +unit status strings match. Strata, Deck, Hermes, TTS endpoint settings, voice +defaults and model publication are not changed; Athena is accessed only to +read the explicitly requested Anna reference for the SSH transfer. + +The temporary server stops and its collected unit disappears; test port18129 +is closed. GPU returns to its original5439488bytes of residual VRAM. Temporary +voice reference is absent. Source checkout, build, both public model copies, +shader cache, server log, generated remote WAVs and test scripts in +`/var/tmp/athena-qwen-rx470-20261022`, plus the separate preparation script, +are removed:1267577781bytes. No test monitor/service/cache remains running. +Only local scripts, sanitized technical results and one synthetic listening +sample remain; cleanup evidence is included. + +## Reproduction and native restore + +`prepare.py` actions clone/models/configure/build create an isolated tree as +the existing `athena-tts` account, using pinned source/submodule/public model +hashes. Reproduction requires the listed Debian compiler/Vulkan packages, +existing video/render device permissions and explicit host topology. Transfer +the authorized voice through a protected channel only; never print its bytes +or commit it. `bench.py` performs local registration, warmup and two bounded +PCM tests, stops only its own transient unit and removes its voice copy. +After retaining only technical results and the requested generated sample, +remove that exact self-created tree and verify the old services/test port. + +This is a native C++/systemd temporary experiment with no Docker dependency. +No production feature is added, so no new persistent installation or restore +dependency is introduced. Existing encrypted-backup rules for private voices +remain unchanged. Full fresh-host restore qualification remains the existing +separate open task; a successful temporary build does not satisfy it. diff --git a/docs/experiments/tts-rx470-2026-10-22/audio-check.json b/docs/experiments/tts-rx470-2026-10-22/audio-check.json new file mode 100644 index 0000000..fb943c2 --- /dev/null +++ b/docs/experiments/tts-rx470-2026-10-22/audio-check.json @@ -0,0 +1,7 @@ +{ + "audio_seconds": 22.08, + "rms": 0.030053213517071322, + "peak": 0.29791259765625, + "clipped_fraction": 0.0, + "subjective_quality_not_assessed": true +} diff --git a/docs/experiments/tts-rx470-2026-10-22/baseline.json b/docs/experiments/tts-rx470-2026-10-22/baseline.json new file mode 100644 index 0000000..0014d77 --- /dev/null +++ b/docs/experiments/tts-rx470-2026-10-22/baseline.json @@ -0,0 +1,8 @@ +{ + "services": "MainPID=154082\nExecMainStartTimestamp=Tue 2026-10-13 13:06:48 CEST\nActiveState=active\nSubState=running\nUnitFileState=enabled\n\nMainPID=0\nExecMainStartTimestamp=\nActiveState=inactive\nSubState=dead\nUnitFileState=disabled\n", + "gpu": { + "gpu_busy_percent": "0", + "mem_info_vram_total": "8589934592", + "mem_info_vram_used": "5439488" + } +} diff --git a/docs/experiments/tts-rx470-2026-10-22/bench.py b/docs/experiments/tts-rx470-2026-10-22/bench.py new file mode 100644 index 0000000..2c79e89 --- /dev/null +++ b/docs/experiments/tts-rx470-2026-10-22/bench.py @@ -0,0 +1,130 @@ +"""Temporary localhost-only upstream Vulkan server and Anna streaming test.""" +import base64, json, os, socket, subprocess, threading, time, urllib.error, urllib.request, wave +from pathlib import Path + +root = Path('/var/tmp/athena-qwen-rx470-20261022') +unit = 'athena-qwen-rx470-test-20261022.service' +base = 'http://127.0.0.1:18129' +gpu_root = Path('/sys/class/drm/card0/device') +reference = root/'anna-reference.wav' +stop = threading.Event() +gpu_samples = [] +results = [] +before = json.loads((root/'baseline.json').read_text()) +parts = ['Dies ist ein Test mit fest aufgeteilten Prozessorkernen.', + 'Während Strata eine Antwort berechnet, erzeugt Anna diese Sprachausgabe.', + 'Wir prüfen, ob die Sprache gleichmäßig und schneller als in Echtzeit ankommt.'] + +def emit(value): print(json.dumps(value), flush=True) +def request(path, data=None, timeout=90): + return urllib.request.urlopen(urllib.request.Request(base+path, + data=json.dumps(data).encode() if data is not None else None, + headers={'Content-Type':'application/json'}),timeout=timeout) +def monitor(): + while not stop.is_set(): + try: + gpu_samples.append(dict(at=time.monotonic(),busy=int((gpu_root/'gpu_busy_percent').read_text()), + vram_bytes=int((gpu_root/'mem_info_vram_used').read_text()))) + except OSError: pass + stop.wait(.2) +def service_state(): + return subprocess.check_output(['systemctl','show','athena-helper-tts-api.service','athena-helper-tts.service', + '-p','ActiveState','-p','SubState','-p','MainPID','-p','UnitFileState','-p','ExecMainStartTimestamp'],text=True) + +def speech(label, inputs): + started = time.monotonic();first=latest=None;total=packets=0;maxgap=deficit=0.0;pcm=[] + for text in inputs: + data=dict(model='rx470-qwen-q4-test',voice='Anna',language='german', + input=text,response_format='pcm',seed=42,temperature=0, + subtalker_temperature=0,max_new_tokens=1024,repetition_penalty=1.05) + with request('/v1/audio/speech',data,timeout=100) as response: + assert response.headers.get('Content-Type','').startswith('audio/pcm') + while True: + block=response.read1(16384) + if not block: break + now=time.monotonic() + if now-started>90: raise TimeoutError('Bounded speech test exceeded90seconds') + if first is None: first=now + else: + maxgap=max(maxgap,now-latest) + deficit=max(deficit,now-first-total/48000) + pcm.append(block);total+=len(block);latest=now;packets+=1 + assert total<32*1024**2 + elapsed=time.monotonic()-started + assert total and total%2==0 and first is not None + if label!='warmup': + with wave.open(str(root/(label+'.wav')),'wb') as output: + output.setnchannels(1);output.setsampwidth(2);output.setframerate(24000) + output.writeframes(b''.join(pcm)) + result=dict(label=label,seconds=elapsed,audio_seconds=total/48000,rtf=elapsed/(total/48000), + first_pcm_seconds=first-started,bytes=total,packets=packets, + longest_packet_gap_seconds=maxgap,required_buffer_after_first_pcm_seconds=max(0,deficit)) + emit(result) + return result + +started_unit=False +report=dict(upstream_revision='5916bf7c79dbb4e66fc059cdc507a79a23a28bb4', + device='Vulkan0',model_quant='Q4_K_M',codec_quant='Q8_0', + loopback_only=True,production_connection_unchanged=True,runs=results) +try: + assert service_state()==before['services'], 'Existing TTS service changed before test' + assert int((gpu_root/'gpu_busy_percent').read_text())<=5, 'GPU is busy; test deferred' + with socket.socket() as probe: probe.bind(('127.0.0.1',18129)) + command=['systemd-run','--quiet','--collect','--unit='+unit, + '--property=User=athena-tts','--property=Group=athena-tts', + '--property=WorkingDirectory='+str(root),'--property=MemoryMax=6G', + '--property=MemorySwapMax=0','--property=TasksMax=128','--property=Nice=10', + '--property=RuntimeMaxSec=600','--property=NoNewPrivileges=yes', + '--property=StandardOutput=append:'+str(root/'server.log'), + '--property=StandardError=append:'+str(root/'server.log'), + '--setenv=XDG_CACHE_HOME='+str(root/'cache'), + '--setenv=MESA_SHADER_CACHE_DIR='+str(root/'cache/mesa'), + str(root/'build/tts-server'),'--model',str(root/'models/qwen-talker-0.6b-base-Q4_K_M.gguf'), + '--codec',str(root/'models/qwen-tokenizer-12hz-Q8_0.gguf'), + '--device','Vulkan0','--no-fa','--lang','german','--host','127.0.0.1', + '--port','18129','--alias','rx470-qwen-q4-test','--max-batch','1'] + subprocess.run(command,check=True,timeout=15);started_unit=True + watcher=threading.Thread(target=monitor,daemon=True);watcher.start() + start=time.monotonic() + while time.monotonic()-start<180: + try: + with request('/health',timeout=2) as response: + assert response.status==200 + break + except (OSError,urllib.error.URLError): + active=subprocess.run(['systemctl','is-active','--quiet',unit]).returncode==0 + if not active: raise RuntimeError('Temporary Vulkan server failed to start; see its own log') + time.sleep(1) + else:raise TimeoutError('Vulkan server startup deadline') + report['load_seconds']=time.monotonic()-start + emit(dict(phase='server_ready',seconds=report['load_seconds'])) + # The existing private voice is used only by this explicitly requested test. + # Its base64 payload is memory-only, never printed, logged or written to Git. + start=time.monotonic() + with request('/v1/audio/voices',dict(name='Anna',wav_b64=base64.b64encode(reference.read_bytes()).decode()),timeout=180) as response: + assert response.status in (200,201) + response.read() + report['voice_preparation_seconds']=time.monotonic()-start + reference.unlink() + emit(dict(phase='anna_registered',seconds=report['voice_preparation_seconds'],temporary_reference_removed=True)) + warmup=speech('warmup',['Die Sprachausgabe ist bereit.']) + report['warmup']=warmup + for label in ('run-1','run-2'): + results.append(speech(label,parts)) + (root/'results.json').write_text(json.dumps(report,indent=2)+'\n') +except Exception as error: + report.update(failed=True,error_type=type(error).__name__,error=str(error)) + raise +finally: + if started_unit:subprocess.run(['systemctl','stop',unit],check=False,timeout=25,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL) + stop.set() + if 'watcher' in locals():watcher.join(2) + reference.unlink(missing_ok=True) + report['existing_tts_service_state_unchanged']=service_state()==before['services'] + report['gpu_peak_vram_bytes']=max((r['vram_bytes'] for r in gpu_samples),default=0) + report['gpu_peak_busy_percent']=max((r['busy'] for r in gpu_samples),default=0) + report['temporary_reference_removed']=not reference.exists() + report['gpu_after']={k:(gpu_root/k).read_text().strip() for k in ('gpu_busy_percent','mem_info_vram_used')} + (root/'gpu-samples.json').write_text(json.dumps(gpu_samples,indent=2)+'\n') + (root/'results.json').write_text(json.dumps(report,indent=2)+'\n') + emit(dict(phase='final',**report)) diff --git a/docs/experiments/tts-rx470-2026-10-22/build-flags.json b/docs/experiments/tts-rx470-2026-10-22/build-flags.json new file mode 100644 index 0000000..7ba9539 --- /dev/null +++ b/docs/experiments/tts-rx470-2026-10-22/build-flags.json @@ -0,0 +1,15 @@ +[ + "-G", + "Ninja", + "-DCMAKE_BUILD_TYPE=Release", + "-DGGML_VULKAN=ON", + "-DGGML_NATIVE=OFF", + "-DGGML_AVX=OFF", + "-DGGML_AVX2=OFF", + "-DGGML_F16C=OFF", + "-DGGML_FMA=OFF", + "-DGGML_AVX512=OFF", + "-DGGML_BMI2=OFF", + "-DGGML_BLAS=OFF", + "-DQWEN_SHARED=ON" +] diff --git a/docs/experiments/tts-rx470-2026-10-22/cleanup.json b/docs/experiments/tts-rx470-2026-10-22/cleanup.json new file mode 100644 index 0000000..7293ad3 --- /dev/null +++ b/docs/experiments/tts-rx470-2026-10-22/cleanup.json @@ -0,0 +1,10 @@ +{ + "temporary_tree_removed": true, + "temporary_prepare_removed": true, + "test_server_stopped": true, + "test_port_closed": true, + "existing_services_unchanged": true, + "removed_bytes": 1267577781, + "power_mode": "auto", + "gpu_vram_after": 5439488 +} diff --git a/docs/experiments/tts-rx470-2026-10-22/evidence.json b/docs/experiments/tts-rx470-2026-10-22/evidence.json new file mode 100644 index 0000000..e245c35 --- /dev/null +++ b/docs/experiments/tts-rx470-2026-10-22/evidence.json @@ -0,0 +1,18 @@ +{ + "upstream_revision": "5916bf7c79dbb4e66fc059cdc507a79a23a28bb4", + "ggml": "cc5df49a6b878db2b68b9a7b45976e279594627d ggml (heads/master)", + "upstream_source_unmodified": true, + "runtime_evidence": [ + "[GGML] ggml_vulkan: Found 1 Vulkan devices:", + "[GGML] ggml_vulkan: 0 = AMD Radeon RX 470 Graphics (RADV POLARIS10) (radv) | uma: 0 | fp16: 0 | bf16: 0 | fp4: 0 | warp size: 64 | shared memory: 65536 | int dot: 0 | matrix cores: none", + "[Load] Talker backend: Vulkan0 (CPU threads: 4)", + "[Server] listening on 127.0.0.1:18129", + "[Server] voice 'anna' registered (T=150, ref_text=no)" + ], + "binaries": { + "tts-server": "3dbeffcafcc2c93e904cc8822a980f9b540f1ce47ad266b9611af59a27bf8910", + "libqwen.so": "4ab144d263a072ffdc04e0ca60808900f6b6943033be5d3074e6e0d7814ee58d" + }, + "existing_services": "MainPID=154082\nExecMainStartTimestamp=Tue 2026-10-13 13:06:48 CEST\nActiveState=active\nSubState=running\nUnitFileState=enabled\n\nMainPID=0\nExecMainStartTimestamp=\nActiveState=inactive\nSubState=dead\nUnitFileState=disabled\n", + "power_mode": "auto" +} diff --git a/docs/experiments/tts-rx470-2026-10-22/prepare.py b/docs/experiments/tts-rx470-2026-10-22/prepare.py new file mode 100644 index 0000000..796ed96 --- /dev/null +++ b/docs/experiments/tts-rx470-2026-10-22/prepare.py @@ -0,0 +1,63 @@ +"""Build unmodified pinned upstream for RX470 in an isolated temporary folder.""" +import hashlib, json, os, pwd, subprocess, sys, urllib.request +from pathlib import Path + +root = Path('/var/tmp/athena-qwen-rx470-20261022') +revision = '5916bf7c79dbb4e66fc059cdc507a79a23a28bb4' +models_revision = 'b7ee2e8c7459c3bea99da23e3d178125a7d1713c' +account = pwd.getpwnam('athena-tts') +def emit(value): print(json.dumps(value), flush=True) +def run(command, log, timeout=300): + with (root/log).open('a') as output: + result = subprocess.run(['runuser','-u','athena-tts','--',*command], + cwd=root,stdout=output,stderr=subprocess.STDOUT,timeout=timeout) + if result.returncode: + emit(dict(failed_log=log, tail=(root/log).read_text()[-5000:])) + raise RuntimeError('Upstream preparation failed') + +action = sys.argv[1] +if action == 'clone': + root.mkdir(mode=0o700) + os.chown(root,account.pw_uid,account.pw_gid) + services = subprocess.check_output(['systemctl','show','athena-helper-tts-api.service','athena-helper-tts.service', + '-p','ActiveState','-p','SubState','-p','MainPID','-p','UnitFileState','-p','ExecMainStartTimestamp'],text=True) + gpu = {k:(Path('/sys/class/drm/card0/device')/k).read_text().strip() + for k in ('gpu_busy_percent','mem_info_vram_total','mem_info_vram_used')} + (root/'baseline.json').write_text(json.dumps(dict(services=services,gpu=gpu),indent=2)+'\n') + run(['git','clone','--no-checkout','--depth','1','https://github.com/ServeurpersoCom/qwentts.cpp.git','source'],'clone.log') + run(['git','-C','source','fetch','--depth','1','origin',revision],'clone.log') + run(['git','-C','source','checkout','--detach',revision],'clone.log') + run(['git','-C','source','submodule','update','--init','--depth','1','ggml'],'clone.log') + emit(dict(upstream_revision=revision,source_ready=True,temporary_root=str(root))) +elif action == 'models': + target=root/'models';target.mkdir(exist_ok=True,mode=0o700) + os.chown(target,account.pw_uid,account.pw_gid) + specs=[('qwen-talker-0.6b-base-Q4_K_M.gguf',628905056,'4b468ec7b1f62b90ef4ca316c0aa57deadfd54b2cf9651703ea753cedaf04226'), + ('qwen-tokenizer-12hz-Q8_0.gguf',291150624,'1883beeed99348fc35e23dd225e9082f93f6f8c109330a33d935baa8acdbfd94')] + for name,size,expected in specs: + path=target/name + if not path.exists(): + url=f'https://huggingface.co/Serveurperso/Qwen3-TTS-GGUF/resolve/{models_revision}/{name}' + part=path.with_suffix('.part') + with urllib.request.urlopen(url,timeout=120) as response,part.open('wb') as output: + while True: + chunk=response.read(1024*1024) + if not chunk: break + output.write(chunk) + part.replace(path) + assert path.stat().st_size==size + with path.open('rb') as source:actual=hashlib.file_digest(source,'sha256').hexdigest() + assert actual==expected, 'Public model checksum mismatch' + os.chown(path,account.pw_uid,account.pw_gid);path.chmod(0o600) + emit(dict(file=name,bytes=size,sha256=actual)) +elif action == 'configure': + flags=['-G','Ninja','-DCMAKE_BUILD_TYPE=Release','-DGGML_VULKAN=ON', + '-DGGML_NATIVE=OFF','-DGGML_AVX=OFF','-DGGML_AVX2=OFF','-DGGML_F16C=OFF', + '-DGGML_FMA=OFF','-DGGML_AVX512=OFF','-DGGML_BMI2=OFF','-DGGML_BLAS=OFF','-DQWEN_SHARED=ON'] + run(['cmake','-S','source','-B','build',*flags],'configure.log') + (root/'build-flags.json').write_text(json.dumps(flags,indent=2)+'\n') + emit(dict(configured=True,no_avx=True,flags=flags)) +elif action == 'build': + run(['nice','-n','10','cmake','--build','build','--parallel','2'],'build.log',timeout=1200) + emit(dict(built=True,executables=[p.name for p in (root/'build').iterdir() if p.is_file() and os.access(p,os.X_OK)])) +else:raise ValueError('Unknown action') diff --git a/docs/experiments/tts-rx470-2026-10-22/results.json b/docs/experiments/tts-rx470-2026-10-22/results.json new file mode 100644 index 0000000..06ed17d --- /dev/null +++ b/docs/experiments/tts-rx470-2026-10-22/results.json @@ -0,0 +1,53 @@ +{ + "upstream_revision": "5916bf7c79dbb4e66fc059cdc507a79a23a28bb4", + "device": "Vulkan0", + "model_quant": "Q4_K_M", + "codec_quant": "Q8_0", + "loopback_only": true, + "production_connection_unchanged": true, + "runs": [ + { + "label": "run-1", + "seconds": 64.72126557212323, + "audio_seconds": 22.08, + "rtf": 2.9312167378679, + "first_pcm_seconds": 0.50645757233724, + "bytes": 1059840, + "packets": 109, + "longest_packet_gap_seconds": 1.8453851589001715, + "required_buffer_after_first_pcm_seconds": 42.30579679708928 + }, + { + "label": "run-2", + "seconds": 64.63534484710544, + "audio_seconds": 22.08, + "rtf": 2.9273254006841234, + "first_pcm_seconds": 0.5086411880329251, + "bytes": 1059840, + "packets": 109, + "longest_packet_gap_seconds": 1.8454325939528644, + "required_buffer_after_first_pcm_seconds": 42.21748124219477 + } + ], + "load_seconds": 4.0747002749703825, + "voice_preparation_seconds": 2.9867931669577956, + "warmup": { + "label": "warmup", + "seconds": 8.472190568689257, + "audio_seconds": 2.08, + "rtf": 4.073168542639066, + "first_pcm_seconds": 2.074050250928849, + "bytes": 99840, + "packets": 12, + "longest_packet_gap_seconds": 1.8382422849535942, + "required_buffer_after_first_pcm_seconds": 4.397841268684715 + }, + "existing_tts_service_state_unchanged": true, + "gpu_peak_vram_bytes": 2043404288, + "gpu_peak_busy_percent": 100, + "temporary_reference_removed": true, + "gpu_after": { + "gpu_busy_percent": "0", + "mem_info_vram_used": "5439488" + } +}