Record CPU TTS comparison with Strata 512K under sustained load
This commit is contained in:
1 parent
087517b60f
commit
e84ac4b8d7
12 files changed
+1155
-3
No files matched your search
@@ -24,9 +24,13 @@ neuen Mehrbenutzer-Schalter; sie bleiben produktiv aus. SSD-Druck beim langen
|
||||
Einlesen besteht fort. Das vorherige IQ3-Single-Profil wurde regulär wieder geladen.
|
||||
Das MP3-Update wurde anschließend auf diese Strata-Version aufgesetzt und mit
|
||||
expliziter Neustartfreigabe aktiviert. [Sprachtests und WebUI-Anbindung](experiments/hermes-voice-2026-10-17/README.md).
|
||||
Browser-Diktat und lokale Athena-TTS-Wiedergabe sind bestätigt. Die ausdrücklich
|
||||
freigegebene, auf eine LAN-URL begrenzte WebUI-Anpassung ist persistent aktiv.
|
||||
Offen: OmniVoice braucht eine feste Referenz, damit die Stimme nicht pro Abschnitt wechselt.
|
||||
Browser-Diktat und lokale Athena-TTS-Wiedergabe sind bestätigt. Die gezielte
|
||||
LAN-Ausnahme ist persistent aktiv; Anna ist als feste Referenz hinterlegt.
|
||||
Der [CPU-TTS-Vergleich mit geladenem Strata 512K](experiments/tts-cpu-with-strata-2026-10-17/README.md)
|
||||
zeigt: OmniVoice auf Athena etwa20-mal langsamer als Echtzeit; Qwen1.7B und
|
||||
VoxCPM2 überschreiten das 8-GiB-Testbudget. Piper auf AT-Helper schafft dagegen
|
||||
0,4–0,7s für etwa3,3s Audio. Hermes ist noch nicht auf diesen Piper-Dienst
|
||||
umgestellt; seine OmniVoice-Anbindung ist weiterhin GPU-TTS.
|
||||
|
||||
Am 11. Oktober 2026: Strata-Q4 nach Vergleich verworfen, keine produktive
|
||||
Q4-Profilfreigabe. Isolierte Q4-Testdateien und Gewichte entfernt; historische
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
# CPU TTS while Strata IQ3 512K remains active — 17 October 2026
|
||||
|
||||
The earlier standalone OmniVoice GPU speed was NOT evidence for TTS alongside
|
||||
Strata. This comparison keeps the regular `flash-next-strata-iq3-512k` profile
|
||||
loaded and makes sustained synthetic 512-token generation requests while each
|
||||
Athena CPU TTS model is tested sequentially. The regular API evicts the previous
|
||||
GPU OmniVoice worker when loading Strata. No production profile or RAM policy
|
||||
is modified and Deck is not restarted.
|
||||
|
||||
Athena: Ryzen 5 5600, 6 physical cores / 12 threads, 48-GB-class system RAM,
|
||||
RTX 3060 12 GiB + RTX 5080 16 GiB. Normal Strata reserves remain unchanged.
|
||||
GPU utilization is measured, not claimed to be a synthetic constant 100%.
|
||||
Both GPUs retain their normal model allocation. Each CPU container has no NVIDIA
|
||||
runtime/device exposure (`runc`, CUDA unavailable assertion), at most 6 CPU
|
||||
threads/6 CPU quota, at most 8 GiB memory, no container swap, and at least about
|
||||
3 GiB available host RAM reserved when admitting the test. This is a practical
|
||||
coexistence budget, not a universal model memory requirement.
|
||||
|
||||
Identical synthetic sentence:
|
||||
"Hallo Michael, die Sprachausgabe läuft jetzt auf der CPU."
|
||||
OmniVoice and VoxCPM2 use the existing private Anna reference; Qwen1.7 uses its
|
||||
existing Ryan embedding. All weights/runtimes are already installed and offline.
|
||||
The existing PyTorch runtimes are used in CPU mode; OmniVoice and Qwen use
|
||||
float32, OmniVoice 32 diffusion steps, VoxCPM2 10 steps. No quantization changes,
|
||||
new model downloads or benchmark-only production tuning.
|
||||
|
||||
## Test harness corrections
|
||||
|
||||
Initial OmniVoice/Qwen imports inherited a PyTorch compiler-cache path pointing
|
||||
to read-only production state. Those attempts are preparation failures, not
|
||||
performance results. HF, PyTorch/Inductor, Triton and XDG caches were redirected
|
||||
to the test's writable `/tmp` without changing production runtimes. VoxCPM2's
|
||||
exit137 was subsequently explicitly confirmed as Docker `OOMKilled=true`.
|
||||
The initial first-call OmniVoice measurement was followed by an additional
|
||||
same-process two-call measurement to distinguish startup from sustained speed.
|
||||
|
||||
## Reproduction
|
||||
|
||||
`stage.py` reads only model identifiers/components from the existing profiles
|
||||
and creates public-weight entry manifests in
|
||||
`/opt/athena-deck-dev/tts-cpu-strata-20261017`. `benchmark.py` runs CPU synthesis.
|
||||
`run-comparison.py` orchestrates the offline containers and real API Strata
|
||||
workload. Its stdin expects a JSON `key` supplied internally from the existing
|
||||
service identity; never put the credential in Git, CLI arguments or logs.
|
||||
The script targets the existing image
|
||||
`athena-deck-standalone:strata-0.1.45-anna-20261017` and current runtime IDs;
|
||||
on another installation resolve these from each runtime's `active.json` first.
|
||||
|
||||
All model/runtime mounts are read-only; only the test result directory and
|
||||
bounded temporary cache are writable. Each CPU attempt is bounded to 420s.
|
||||
Own test containers are removed and the own load loop drains its last request;
|
||||
Strata remains loaded. Do not run while unrelated user requests are active.
|
||||
|
||||
AT-Helper's already-installed Piper and Qwen0.6 are additional separately
|
||||
labelled tests on its Xeon X3450; they are not Ryzen measurements. Piper's
|
||||
production service stays running. A temporary Qwen0.6 test service uses CPU,
|
||||
no Vulkan/`--ttsgpu`, 4-core quota, 4-GiB memory and no swap; it is stopped after
|
||||
measurement. No Helper service configuration changes.
|
||||
|
||||
Only scripts, synthetic numeric results and this report belong in Git. Audio,
|
||||
private Anna reference/transcript and runtime logs do not. These are transient
|
||||
experiments, not a new persistent service; no new backup/restore dependencies.
|
||||
|
||||
## Results
|
||||
|
||||
| Model / host | Ready after | Synthesis first / repeat | Audio duration | RTF | Result |
|
||||
|---|---:|---:|---:|---:|---|
|
||||
| OmniVoice / Athena Ryzen5600 | 7.18s incl imports (5.60s model load) | 82.82 / 82.84s | 4.16 / 4.16s | 19.91 / 19.91 | Too slow on CPU |
|
||||
| Qwen-TTS1.7B / Athena | 7.93s incl imports | No complete audio | — | — | Confirmed OOM at 8-GiB test budget during first generation |
|
||||
| VoxCPM2 / Athena | Did not finish loading | No audio | — | — | Confirmed OOM at 8-GiB test budget while loading |
|
||||
| Piper Thorsten-medium / AT-Helper Xeon X3450 | Already running; reports load2.945s | 0.702 / 0.404s incl local HTTP | 3.320 / 3.367s | 0.211 / 0.120 | Faster than realtime |
|
||||
| Qwen-TTS0.6B F16 / AT-Helper | Not separately timed | 134.97 / 131.82s | 3.977 / 4.057s | 33.94 / 32.49 | Too slow on CPU |
|
||||
|
||||
RTF = generation time / audio duration; values below1 are faster than realtime.
|
||||
An earlier valid OmniVoice first-call measurement was92.64s/4.16s (RTF22.27).
|
||||
The two-call check confirms the slowdown is sustained, not just initialization.
|
||||
OOM rows have no speed estimate: 8GiB was our safe coexistence budget, not an
|
||||
assertion that those models can never run on a CPU with more RAM or a different
|
||||
precision/loading implementation. No BF16/int8/quantized PyTorch variant was
|
||||
measured. The Qwen0.6 GGUF test already uses the available F16 weights.
|
||||
|
||||
During the final two-call OmniVoice check Strata completed24 synthetic requests
|
||||
without a recorded error. GPU allocation stayed at11249MiB on3060 and15424MiB
|
||||
on5080 in all samples. Actual utilization ranged0–52% and4–60%; it is NOT a
|
||||
100%-utilization stress test, but normal sustained Strata decoding with its
|
||||
full configured GPU memory allocation. No unrelated GPU stress generator or
|
||||
extra reservation was used. `summary.json` and full numeric samples document
|
||||
this distinction.
|
||||
|
||||
OmniVoice output is valid non-silent PCM16 WAV (peak11798); an independent
|
||||
local STT check recognized the sentence but rendered initial "Hallo" as "Jo".
|
||||
This is a basic intelligibility check, not a subjective quality score or proof
|
||||
of exact pronunciation. Private reference audio/transcript remain outside Git.
|
||||
|
||||
Qwen0.6's Vulkan library enumerates/opens the RX470 during startup even without
|
||||
Vulkan selection flags; the dedicated test logs explicitly confirm CPU for
|
||||
TTSTransformer, AudioTokenizerDecoder and AudioTokenizerEncoder. GPU-device-FD
|
||||
presence alone therefore was NOT used as compute-placement evidence.
|
||||
|
||||
All own Athena test containers and synthetic load loops are finished. The own
|
||||
Helper Qwen CPU service is stopped; Piper's production service is untouched.
|
||||
Strata IQ3 512K remains loaded, with the same GPU process on both cards. No
|
||||
Deck/host restart or production profile change occurred during this comparison.
|
||||
|
||||
**Practical conclusion:** use the existing Piper CPU service on AT-Helper for
|
||||
responsive CPU-only speech. This test does not configure Hermes/Deck to use it
|
||||
and does not provide a female Piper voice: the installed voice is Thorsten.
|
||||
The current Hermes OmniVoice setting still requests GPU TTS; it must not be
|
||||
advertised as the demonstrated concurrent CPU solution.
|
||||
@@ -0,0 +1,822 @@
|
||||
{
|
||||
"model": "flash-next-strata-iq3-512k",
|
||||
"tests": {
|
||||
"voxcpm": {
|
||||
"phase": "timeout_or_terminated",
|
||||
"memory_limit_bytes": 8589934592,
|
||||
"model": "voxcpm",
|
||||
"threads": 6,
|
||||
"text": "Hallo Michael, die Sprachausgabe l\u00e4uft jetzt auf der CPU.",
|
||||
"runs": [],
|
||||
"cuda_available": false,
|
||||
"import_seconds": 1.150627571012592,
|
||||
"container_exit": 137,
|
||||
"oom_killed": true
|
||||
},
|
||||
"qwen": {
|
||||
"phase": "timeout_or_terminated",
|
||||
"memory_limit_bytes": 8589934592,
|
||||
"model": "qwen",
|
||||
"threads": 6,
|
||||
"text": "Hallo Michael, die Sprachausgabe l\u00e4uft jetzt auf der CPU.",
|
||||
"runs": [],
|
||||
"cuda_available": false,
|
||||
"import_seconds": 1.2652623049798422,
|
||||
"load_seconds": 6.669334388978314,
|
||||
"ready_seconds": 7.934829720004927,
|
||||
"container_wall_seconds": 45.102903991995845,
|
||||
"container_exit": 137,
|
||||
"oom_killed": true
|
||||
},
|
||||
"omni": {
|
||||
"phase": "complete",
|
||||
"memory_limit_bytes": 8589934592,
|
||||
"model": "omni",
|
||||
"threads": 6,
|
||||
"text": "Hallo Michael, die Sprachausgabe l\u00e4uft jetzt auf der CPU.",
|
||||
"runs": [
|
||||
{
|
||||
"run": 1,
|
||||
"generation_seconds": 82.81799395100097,
|
||||
"audio_seconds": 4.16,
|
||||
"realtime_factor": 19.90817162283677,
|
||||
"faster_than_realtime": false,
|
||||
"sample_rate": 24000
|
||||
},
|
||||
{
|
||||
"run": 2,
|
||||
"generation_seconds": 82.83631674500066,
|
||||
"audio_seconds": 4.16,
|
||||
"realtime_factor": 19.91257614062516,
|
||||
"faster_than_realtime": false,
|
||||
"sample_rate": 24000
|
||||
}
|
||||
],
|
||||
"cuda_available": false,
|
||||
"import_seconds": 1.5861557539901696,
|
||||
"load_seconds": 5.595139726996422,
|
||||
"ready_seconds": 7.181520391983213,
|
||||
"container_wall_seconds": 174.44673319501453,
|
||||
"container_exit": 0,
|
||||
"oom_killed": false
|
||||
}
|
||||
},
|
||||
"samples": [
|
||||
{
|
||||
"time": 1792266272.8333218,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 0",
|
||||
"1, 15424, 16303, 10"
|
||||
],
|
||||
"available_ram_bytes": 12555984896
|
||||
},
|
||||
{
|
||||
"time": 1792266275.873488,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 40",
|
||||
"1, 15424, 16303, 48"
|
||||
],
|
||||
"available_ram_bytes": 12228669440
|
||||
},
|
||||
{
|
||||
"time": 1792266278.9075925,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 48",
|
||||
"1, 15424, 16303, 49"
|
||||
],
|
||||
"available_ram_bytes": 12066856960
|
||||
},
|
||||
{
|
||||
"time": 1792266281.9520512,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 44",
|
||||
"1, 15424, 16303, 53"
|
||||
],
|
||||
"available_ram_bytes": 11782148096
|
||||
},
|
||||
{
|
||||
"time": 1792266285.0004544,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 36",
|
||||
"1, 15424, 16303, 58"
|
||||
],
|
||||
"available_ram_bytes": 11512131584
|
||||
},
|
||||
{
|
||||
"time": 1792266288.046898,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 42",
|
||||
"1, 15424, 16303, 53"
|
||||
],
|
||||
"available_ram_bytes": 11475120128
|
||||
},
|
||||
{
|
||||
"time": 1792266291.103199,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 42",
|
||||
"1, 15424, 16303, 51"
|
||||
],
|
||||
"available_ram_bytes": 11433132032
|
||||
},
|
||||
{
|
||||
"time": 1792266294.1433294,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 42",
|
||||
"1, 15424, 16303, 53"
|
||||
],
|
||||
"available_ram_bytes": 11386130432
|
||||
},
|
||||
{
|
||||
"time": 1792266297.1911154,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 45",
|
||||
"1, 15424, 16303, 50"
|
||||
],
|
||||
"available_ram_bytes": 11584364544
|
||||
},
|
||||
{
|
||||
"time": 1792266300.231247,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 46",
|
||||
"1, 15424, 16303, 55"
|
||||
],
|
||||
"available_ram_bytes": 11562426368
|
||||
},
|
||||
{
|
||||
"time": 1792266303.2774734,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 41",
|
||||
"1, 15424, 16303, 53"
|
||||
],
|
||||
"available_ram_bytes": 11497353216
|
||||
},
|
||||
{
|
||||
"time": 1792266306.3269815,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 46",
|
||||
"1, 15424, 16303, 51"
|
||||
],
|
||||
"available_ram_bytes": 11476025344
|
||||
},
|
||||
{
|
||||
"time": 1792266309.378467,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 46",
|
||||
"1, 15424, 16303, 52"
|
||||
],
|
||||
"available_ram_bytes": 11573059584
|
||||
},
|
||||
{
|
||||
"time": 1792266312.4277422,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 38",
|
||||
"1, 15424, 16303, 52"
|
||||
],
|
||||
"available_ram_bytes": 11533393920
|
||||
},
|
||||
{
|
||||
"time": 1792266315.4792795,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 42",
|
||||
"1, 15424, 16303, 51"
|
||||
],
|
||||
"available_ram_bytes": 11564167168
|
||||
},
|
||||
{
|
||||
"time": 1792266318.5250578,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 45",
|
||||
"1, 15424, 16303, 50"
|
||||
],
|
||||
"available_ram_bytes": 11475300352
|
||||
},
|
||||
{
|
||||
"time": 1792266321.574479,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 44",
|
||||
"1, 15424, 16303, 54"
|
||||
],
|
||||
"available_ram_bytes": 11689959424
|
||||
},
|
||||
{
|
||||
"time": 1792266324.6310887,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 43",
|
||||
"1, 15424, 16303, 52"
|
||||
],
|
||||
"available_ram_bytes": 11499442176
|
||||
},
|
||||
{
|
||||
"time": 1792266327.671139,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 45",
|
||||
"1, 15424, 16303, 51"
|
||||
],
|
||||
"available_ram_bytes": 11473059840
|
||||
},
|
||||
{
|
||||
"time": 1792266330.731108,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 44",
|
||||
"1, 15424, 16303, 50"
|
||||
],
|
||||
"available_ram_bytes": 11565867008
|
||||
},
|
||||
{
|
||||
"time": 1792266333.7668524,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 41",
|
||||
"1, 15424, 16303, 51"
|
||||
],
|
||||
"available_ram_bytes": 11493728256
|
||||
},
|
||||
{
|
||||
"time": 1792266336.811047,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 46",
|
||||
"1, 15424, 16303, 56"
|
||||
],
|
||||
"available_ram_bytes": 11500871680
|
||||
},
|
||||
{
|
||||
"time": 1792266339.847995,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 43",
|
||||
"1, 15424, 16303, 45"
|
||||
],
|
||||
"available_ram_bytes": 11447496704
|
||||
},
|
||||
{
|
||||
"time": 1792266342.8919418,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 43",
|
||||
"1, 15424, 16303, 53"
|
||||
],
|
||||
"available_ram_bytes": 11450118144
|
||||
},
|
||||
{
|
||||
"time": 1792266345.9277084,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 31",
|
||||
"1, 15424, 16303, 52"
|
||||
],
|
||||
"available_ram_bytes": 11511439360
|
||||
},
|
||||
{
|
||||
"time": 1792266348.9773812,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 44",
|
||||
"1, 15424, 16303, 51"
|
||||
],
|
||||
"available_ram_bytes": 11490476032
|
||||
},
|
||||
{
|
||||
"time": 1792266352.0140314,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 42",
|
||||
"1, 15424, 16303, 48"
|
||||
],
|
||||
"available_ram_bytes": 11518218240
|
||||
},
|
||||
{
|
||||
"time": 1792266355.0613005,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 46",
|
||||
"1, 15424, 16303, 53"
|
||||
],
|
||||
"available_ram_bytes": 11561144320
|
||||
},
|
||||
{
|
||||
"time": 1792266358.1019247,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 46",
|
||||
"1, 15424, 16303, 49"
|
||||
],
|
||||
"available_ram_bytes": 11469123584
|
||||
},
|
||||
{
|
||||
"time": 1792266361.155265,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 32",
|
||||
"1, 15424, 16303, 55"
|
||||
],
|
||||
"available_ram_bytes": 11485208576
|
||||
},
|
||||
{
|
||||
"time": 1792266364.2049446,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 40",
|
||||
"1, 15424, 16303, 57"
|
||||
],
|
||||
"available_ram_bytes": 11322552320
|
||||
},
|
||||
{
|
||||
"time": 1792266367.2630303,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 43",
|
||||
"1, 15424, 16303, 52"
|
||||
],
|
||||
"available_ram_bytes": 11475378176
|
||||
},
|
||||
{
|
||||
"time": 1792266370.3121123,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 45",
|
||||
"1, 15424, 16303, 52"
|
||||
],
|
||||
"available_ram_bytes": 11448811520
|
||||
},
|
||||
{
|
||||
"time": 1792266373.3534653,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 44",
|
||||
"1, 15424, 16303, 48"
|
||||
],
|
||||
"available_ram_bytes": 11486351360
|
||||
},
|
||||
{
|
||||
"time": 1792266376.4035194,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 43",
|
||||
"1, 15424, 16303, 49"
|
||||
],
|
||||
"available_ram_bytes": 11634483200
|
||||
},
|
||||
{
|
||||
"time": 1792266379.4635725,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 31",
|
||||
"1, 15424, 16303, 57"
|
||||
],
|
||||
"available_ram_bytes": 11478138880
|
||||
},
|
||||
{
|
||||
"time": 1792266382.507041,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 49",
|
||||
"1, 15424, 16303, 37"
|
||||
],
|
||||
"available_ram_bytes": 11471024128
|
||||
},
|
||||
{
|
||||
"time": 1792266385.5550444,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 32",
|
||||
"1, 15424, 16303, 50"
|
||||
],
|
||||
"available_ram_bytes": 11435925504
|
||||
},
|
||||
{
|
||||
"time": 1792266388.59378,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 42",
|
||||
"1, 15424, 16303, 57"
|
||||
],
|
||||
"available_ram_bytes": 11439243264
|
||||
},
|
||||
{
|
||||
"time": 1792266391.6507733,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 41",
|
||||
"1, 15424, 16303, 54"
|
||||
],
|
||||
"available_ram_bytes": 11593207808
|
||||
},
|
||||
{
|
||||
"time": 1792266394.703132,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 41",
|
||||
"1, 15424, 16303, 54"
|
||||
],
|
||||
"available_ram_bytes": 11582586880
|
||||
},
|
||||
{
|
||||
"time": 1792266397.767227,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 48",
|
||||
"1, 15424, 16303, 4"
|
||||
],
|
||||
"available_ram_bytes": 11497504768
|
||||
},
|
||||
{
|
||||
"time": 1792266400.8038664,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 41",
|
||||
"1, 15424, 16303, 58"
|
||||
],
|
||||
"available_ram_bytes": 11459510272
|
||||
},
|
||||
{
|
||||
"time": 1792266403.8488815,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 43",
|
||||
"1, 15424, 16303, 48"
|
||||
],
|
||||
"available_ram_bytes": 11459850240
|
||||
},
|
||||
{
|
||||
"time": 1792266406.8977795,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 40",
|
||||
"1, 15424, 16303, 53"
|
||||
],
|
||||
"available_ram_bytes": 11457875968
|
||||
},
|
||||
{
|
||||
"time": 1792266409.9470723,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 34",
|
||||
"1, 15424, 16303, 50"
|
||||
],
|
||||
"available_ram_bytes": 11488374784
|
||||
},
|
||||
{
|
||||
"time": 1792266412.993193,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 38",
|
||||
"1, 15424, 16303, 55"
|
||||
],
|
||||
"available_ram_bytes": 11482189824
|
||||
},
|
||||
{
|
||||
"time": 1792266416.0356221,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 44",
|
||||
"1, 15424, 16303, 60"
|
||||
],
|
||||
"available_ram_bytes": 11667210240
|
||||
},
|
||||
{
|
||||
"time": 1792266419.0870085,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 49",
|
||||
"1, 15424, 16303, 50"
|
||||
],
|
||||
"available_ram_bytes": 11489882112
|
||||
},
|
||||
{
|
||||
"time": 1792266422.1470902,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 39",
|
||||
"1, 15424, 16303, 54"
|
||||
],
|
||||
"available_ram_bytes": 11507089408
|
||||
},
|
||||
{
|
||||
"time": 1792266425.190181,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 52",
|
||||
"1, 15424, 16303, 46"
|
||||
],
|
||||
"available_ram_bytes": 11471912960
|
||||
},
|
||||
{
|
||||
"time": 1792266428.2281184,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 39",
|
||||
"1, 15424, 16303, 57"
|
||||
],
|
||||
"available_ram_bytes": 11448799232
|
||||
},
|
||||
{
|
||||
"time": 1792266431.2694747,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 45",
|
||||
"1, 15424, 16303, 52"
|
||||
],
|
||||
"available_ram_bytes": 11428847616
|
||||
},
|
||||
{
|
||||
"time": 1792266434.319049,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 41",
|
||||
"1, 15424, 16303, 51"
|
||||
],
|
||||
"available_ram_bytes": 11505721344
|
||||
},
|
||||
{
|
||||
"time": 1792266437.3550165,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 45",
|
||||
"1, 15424, 16303, 53"
|
||||
],
|
||||
"available_ram_bytes": 11468218368
|
||||
},
|
||||
{
|
||||
"time": 1792266440.4064262,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 48",
|
||||
"1, 15424, 16303, 51"
|
||||
],
|
||||
"available_ram_bytes": 11458244608
|
||||
},
|
||||
{
|
||||
"time": 1792266443.4553063,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 42",
|
||||
"1, 15424, 16303, 60"
|
||||
],
|
||||
"available_ram_bytes": 11449532416
|
||||
},
|
||||
{
|
||||
"time": 1792266446.4909692,
|
||||
"gpus": [
|
||||
"0, 11249, 12288, 46",
|
||||
"1, 15424, 16303, 50"
|
||||
],
|
||||
"available_ram_bytes": 11583078400
|
||||
}
|
||||
],
|
||||
"strata_requests": [
|
||||
{
|
||||
"seconds": 6.628690497018397,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.316447096003685,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.275252280989662,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.0444831929926295,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.574748986022314,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.612668369984021,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.290708145999815,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.379691885987995,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.097678514983272,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.301183952018619,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.552317476016469,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.461933801008854,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.276782717002789,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.2784200420137495,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.365482821012847,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.626683596987277,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.276440226996783,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 6.969592986977659,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.617232279997552,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.079203107015928,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.544935879996046,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.269691217981745,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.358408566011349,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
},
|
||||
{
|
||||
"seconds": 7.418516243022168,
|
||||
"usage": {
|
||||
"prompt_tokens": 38,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 550,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 31
|
||||
}
|
||||
},
|
||||
"backend_timings": null
|
||||
}
|
||||
],
|
||||
"strata_load_request_seconds": 0.18939993099775165,
|
||||
"finished": true
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"file": "results/omni/run-1.wav",
|
||||
"duration": 4.16,
|
||||
"sample_width": 2,
|
||||
"peak": 11798
|
||||
},
|
||||
{
|
||||
"file": "results/omni/run-2.wav",
|
||||
"duration": 4.16,
|
||||
"sample_width": 2,
|
||||
"peak": 11798
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,53 @@
|
||||
"""Offline CPU-only TTS comparison; only synthetic text is written to results."""
|
||||
import os,json,time,sys,contextlib,traceback
|
||||
from pathlib import Path
|
||||
os.environ.update(TORCHINDUCTOR_CACHE_DIR='/tmp/torchinductor',TRITON_CACHE_DIR='/tmp/triton',HF_HOME='/tmp/hf',HF_HUB_CACHE='/tmp/hf/hub',TRANSFORMERS_CACHE='/tmp/hf',TORCH_HOME='/tmp/torch',XDG_CACHE_HOME='/tmp/cache',HF_MODULES_CACHE='/tmp/hf/modules',HUGGINGFACE_HUB_CACHE='/tmp/hf/hub')
|
||||
root=Path('/test');kind=sys.argv[1];output=root/kind;output.mkdir(exist_ok=True)
|
||||
started=time.monotonic();result={'model':kind,'phase':'imports','threads':6,'text':'Hallo Michael, die Sprachausgabe läuft jetzt auf der CPU.','runs':[]}
|
||||
def save():
|
||||
p=output/'status.tmp';p.write_text(json.dumps(result,indent=2));p.replace(output/'results.json')
|
||||
try:
|
||||
save()
|
||||
with contextlib.redirect_stdout(sys.stderr):
|
||||
import torch,soundfile as sf
|
||||
torch.set_num_threads(6);torch.set_num_interop_threads(1)
|
||||
assert not torch.cuda.is_available(),'GPU exposed to CPU test'
|
||||
result['cuda_available']=False;result['import_seconds']=time.monotonic()-started;result['phase']='loading';save();t=time.monotonic()
|
||||
model_dir=output/'model'
|
||||
if kind in ('omni','voxcpm'):
|
||||
entries=json.loads((root/(kind+'-entries.json')).read_text());model_dir.mkdir(exist_ok=True)
|
||||
for entry in entries:
|
||||
source=Path('/var/lib/deck/models')/entry['id']/('model'+Path(entry['file']).suffix)
|
||||
target=model_dir/entry['file'];target.parent.mkdir(parents=True,exist_ok=True)
|
||||
if not target.exists():target.symlink_to(source)
|
||||
if kind=='omni':
|
||||
from omnivoice import OmniVoice,OmniVoiceGenerationConfig
|
||||
model=OmniVoice.from_pretrained(str(model_dir),device_map='cpu',dtype=torch.float32,local_files_only=True,load_asr=False)
|
||||
ref=Path('/reference/Anna/reference.wav');ref_text=json.loads(Path('/reference/Anna/reference.json').read_text())['text']
|
||||
def generate():return model.generate(text=result['text'],language='German',ref_audio=str(ref),ref_text=ref_text,generation_config=OmniVoiceGenerationConfig(num_step=32,guidance_scale=2.0))[0],model.sampling_rate
|
||||
elif kind=='voxcpm':
|
||||
from voxcpm import VoxCPM
|
||||
model=VoxCPM.from_pretrained(str(model_dir),load_denoiser=False,local_files_only=True,optimize=False,device='cpu')
|
||||
def generate():return model.generate(text=result['text'],reference_wav_path='/reference/Anna/reference.wav',cfg_value=2.0,inference_timesteps=10,max_len=512,normalize=False,denoise=False,retry_badcase_max_times=1),model.tts_model.sample_rate
|
||||
elif kind=='qwen':
|
||||
from qwen_tts import Qwen3TTSModel,VoiceClonePromptItem
|
||||
from safetensors.torch import load_file
|
||||
model=Qwen3TTSModel.from_pretrained('/var/lib/deck/tts-runtime/20261006000000000000000000000001/model',device_map='cpu',dtype=torch.float32,attn_implementation='sdpa',local_files_only=True)
|
||||
rows=load_file('/app/assets/tts-presets/bundle.safetensors',device='cpu');row=rows.get('ryan',rows.get('Ryan'))
|
||||
voice=VoiceClonePromptItem(ref_code=None,ref_spk_embedding=row.to(device='cpu',dtype=torch.float32).contiguous(),x_vector_only_mode=True,icl_mode=False,ref_text=None)
|
||||
def generate():
|
||||
waves,rate=model.generate_voice_clone(text=result['text'],language='German',voice_clone_prompt=[voice],max_new_tokens=256,do_sample=False)
|
||||
return waves[0],rate
|
||||
result['load_seconds']=time.monotonic()-t;result['ready_seconds']=time.monotonic()-started;result['phase']='ready';save()
|
||||
for i in range(2):
|
||||
result['phase']='generation-'+str(i+1);save();torch.manual_seed(42);t=time.monotonic()
|
||||
with torch.inference_mode():wave,rate=generate()
|
||||
elapsed=time.monotonic()-t
|
||||
if isinstance(wave,torch.Tensor):wave=wave.detach().float().cpu().numpy()
|
||||
import numpy as np
|
||||
wave=np.asarray(wave).squeeze();assert wave.ndim==1 and len(wave)>0 and np.isfinite(wave).all()
|
||||
duration=len(wave)/rate;sf.write(output/('run-'+str(i+1)+'.wav'),wave,rate,subtype='PCM_16')
|
||||
result['runs'].append({'run':i+1,'generation_seconds':elapsed,'audio_seconds':duration,'realtime_factor':elapsed/duration,'faster_than_realtime':elapsed<duration,'sample_rate':rate});save()
|
||||
result['phase']='complete';save()
|
||||
except Exception as exc:
|
||||
result.update(phase='error',error_class=type(exc).__name__,error=str(exc)[:350],error_locations=[{'file':f.filename,'line':f.lineno,'function':f.name} for f in traceback.extract_tb(exc.__traceback__)[-6:]]);save()
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"host": "AT-Helper",
|
||||
"health": {
|
||||
"status": "ok",
|
||||
"engine": "piper",
|
||||
"device": "cpu",
|
||||
"voice": "thorsten",
|
||||
"language": "de",
|
||||
"model_load_seconds": 2.945
|
||||
},
|
||||
"runs": [
|
||||
{
|
||||
"generation_seconds": 0.7018593880347908,
|
||||
"audio_seconds": 3.320453514739229,
|
||||
"realtime_factor": 0.21137455619218662
|
||||
},
|
||||
{
|
||||
"generation_seconds": 0.40353727992624044,
|
||||
"audio_seconds": 3.3668934240362813,
|
||||
"realtime_factor": 0.11985448575395476
|
||||
}
|
||||
],
|
||||
"cpu": "Intel(R) Xeon(R) CPU X3450 @ 2.67GHz"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"tts_transformer_cpu": true,
|
||||
"audio_decoder_cpu": true,
|
||||
"audio_encoder_cpu": true,
|
||||
"vulkan_enumerated": true
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"host": "AT-Helper",
|
||||
"model": "Qwen3-TTS 0.6B F16",
|
||||
"device": "cpu",
|
||||
"runs": [
|
||||
{
|
||||
"generation_seconds": 134.97174527100287,
|
||||
"audio_seconds": 3.976875,
|
||||
"realtime_factor": 33.939147011410434
|
||||
},
|
||||
{
|
||||
"generation_seconds": 131.81729592895135,
|
||||
"audio_seconds": 4.056875,
|
||||
"realtime_factor": 32.49232375386261
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
import json,sys,subprocess,time,threading,urllib.request,os,statistics
|
||||
from pathlib import Path
|
||||
key=json.load(sys.stdin)['key'];stage=Path('/opt/athena-deck-dev/tts-cpu-strata-20261017');state=Path('/opt/athena-deck-dev/runtime/state');results=stage/'results';results.mkdir(exist_ok=True);os.chown(results,65534,65534)
|
||||
for kind in ('omni','voxcpm'):(results/(kind+'-entries.json')).write_bytes((stage/(kind+'-entries.json')).read_bytes())
|
||||
headers={'Authorization':'Bearer '+key,'Content-Type':'application/json'};model='flash-next-strata-iq3-512k';image='athena-deck-standalone:strata-0.1.45-anna-20261017';stop=threading.Event();samples=[];requests=[];report={'model':model,'tests':{},'samples':samples,'strata_requests':requests}
|
||||
save_lock=threading.Lock()
|
||||
def save():
|
||||
with save_lock:
|
||||
p=stage/'comparison.tmp';p.write_text(json.dumps(report,indent=2));p.replace(stage/'comparison.json')
|
||||
def call(path,data=None,port=8120,timeout=600):
|
||||
r=urllib.request.Request(f'http://127.0.0.1:{port}'+path,data=None if data is None else json.dumps(data).encode(),headers=headers)
|
||||
with urllib.request.urlopen(r,timeout=timeout) as response:return json.load(response)
|
||||
def decode(tokens):return call('/v1/chat/completions',{'model':model,'messages':[{'role':'user','content':'Schreibe eine lange, fortlaufende Geschichte über eine Wanderung im Schwarzwald. Erzähle ausführlich weiter.'}],'max_tokens':tokens,'reasoning_effort':'none'})
|
||||
def sampler():
|
||||
while not stop.is_set():
|
||||
try:
|
||||
gpu=subprocess.check_output(['nvidia-smi','--query-gpu=index,memory.used,memory.total,utilization.gpu','--format=csv,noheader,nounits'],text=True).strip().splitlines()
|
||||
mem={line.split(':')[0]:int(line.split()[1])*1024 for line in Path('/proc/meminfo').read_text().splitlines() if line.startswith(('MemAvailable:','MemTotal:'))}
|
||||
samples.append({'time':time.time(),'gpus':gpu,'available_ram_bytes':mem['MemAvailable']});save()
|
||||
except Exception as e:report['sampling_error']=type(e).__name__
|
||||
stop.wait(3)
|
||||
def load_loop():
|
||||
while not stop.is_set():
|
||||
t=time.monotonic()
|
||||
try:
|
||||
d=decode(512);requests.append({'seconds':time.monotonic()-t,'usage':d.get('usage'),'backend_timings':d.get('backend_timings')});save()
|
||||
except Exception as e:report['strata_error']=type(e).__name__;save();stop.set();break
|
||||
try:
|
||||
s=call('/api/v1/status',port=8108);assert s['endpoint']['active_requests']==0,'Other request active'
|
||||
print('Loading Strata IQ3 512K via regular API',flush=True);t=time.monotonic();d=decode(2);report['strata_load_request_seconds']=time.monotonic()-t;save()
|
||||
print('Strata loaded; starting sustained synthetic generation',flush=True)
|
||||
monitor=threading.Thread(target=sampler,daemon=True);load=threading.Thread(target=load_loop,daemon=True);monitor.start();load.start()
|
||||
for kind in ('omni','voxcpm','qwen'):
|
||||
assert not stop.is_set(),'Strata workload failed'
|
||||
available=next(int(line.split()[1])*1024 for line in Path('/proc/meminfo').read_text().splitlines() if line.startswith('MemAvailable:'))
|
||||
limit=min(8*1024**3,available-3*1024**3)
|
||||
if limit<3*1024**3:
|
||||
report['tests'][kind]={'phase':'skipped','reason':'Not enough safe host RAM for CPU float32 model','available_bytes':available};save();continue
|
||||
runtime={'omni':('omnivoice-runtime','ea451f80b98c4575a2c99639570de647'),'voxcpm':('voxcpm-runtime','ed95c9d044d943cba2c2bb02afd524b1'),'qwen':('tts-runtime','20261006000000000000000000000001')}[kind]
|
||||
name='athena-tts-cpu-20261017-'+kind;cmd=['docker','run','--name',name,'--runtime','runc','--network','none','--read-only','--cap-drop','ALL','--security-opt','no-new-privileges','--memory',str(limit),'--memory-swap',str(limit),'--cpus','6','--pids-limit','256','--user','65534:65534','--tmpfs','/tmp:rw,mode=1777,size=256m','-e','CUDA_VISIBLE_DEVICES=','-e','NVIDIA_VISIBLE_DEVICES=void','-e','HF_HUB_OFFLINE=1','-e','TRANSFORMERS_OFFLINE=1','-e','OMP_NUM_THREADS=6','-e','MKL_NUM_THREADS=6','-e','OPENBLAS_NUM_THREADS=6','-e','PYTHONDONTWRITEBYTECODE=1','-e','HOME=/tmp','-v',str(results)+':/test','-v',str(stage/'benchmark.py')+':/benchmark.py:ro','-v',str(state/'speech-voices')+':/reference:ro']
|
||||
for directory in ('models','image-runtime','tts-runtime','omnivoice-runtime','voxcpm-runtime'):
|
||||
if (state/directory).is_dir():cmd+=['-v',str(state/directory)+':/var/lib/deck/'+directory+':ro']
|
||||
cmd+=['--entrypoint','/var/lib/deck/'+runtime[0]+'/'+runtime[1]+'/python/bin/python',image,'/benchmark.py',kind]
|
||||
# Qwen's existing environment uses bin/python directly rather than python/bin/python.
|
||||
if kind=='qwen':cmd[cmd.index('--entrypoint')+1]='/var/lib/deck/tts-runtime/'+runtime[1]+'/python/bin/python'
|
||||
report['tests'][kind]={'phase':'starting','memory_limit_bytes':limit};save();print('CPU test: '+kind,flush=True)
|
||||
start=time.monotonic()
|
||||
with (stage/(kind+'-private-runtime.log')).open('w') as log:
|
||||
proc=subprocess.Popen(cmd,stdout=log,stderr=log)
|
||||
try:
|
||||
proc.wait(timeout=420)
|
||||
except subprocess.TimeoutExpired:
|
||||
subprocess.run(['docker','stop','--time','3',name],stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL);proc.wait(timeout=15)
|
||||
report['tests'][kind]={'phase':'timeout','elapsed_seconds':time.monotonic()-start}
|
||||
path=results/kind/'results.json'
|
||||
if path.exists():
|
||||
measured=json.loads(path.read_text());report['tests'][kind].update(measured)
|
||||
if proc.returncode and measured.get('phase') not in ('error','complete'):report['tests'][kind]['phase']='timeout_or_terminated'
|
||||
report['tests'][kind]['container_wall_seconds']=time.monotonic()-start
|
||||
report['tests'][kind]['container_exit']=proc.returncode
|
||||
inspection=json.loads(subprocess.check_output(['docker','inspect',name],text=True))[0]
|
||||
report['tests'][kind]['oom_killed']=inspection['State']['OOMKilled']
|
||||
subprocess.run(['docker','rm',name],stdout=subprocess.DEVNULL,check=True)
|
||||
save();print(json.dumps({'model':kind,'phase':report['tests'][kind].get('phase'),'runs':report['tests'][kind].get('runs',[]),'error_class':report['tests'][kind].get('error_class')}),flush=True)
|
||||
finally:
|
||||
stop.set()
|
||||
for kind in ('omni','voxcpm','qwen'):subprocess.run(['docker','stop','--time','3','athena-tts-cpu-20261017-'+kind],stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
|
||||
if 'load' in locals():load.join(timeout=90)
|
||||
for kind in ('omni','voxcpm','qwen'):subprocess.run(['docker','rm','athena-tts-cpu-20261017-'+kind],stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
|
||||
report['finished']=True;save();print('CPU comparison ended; Strata remains loaded',flush=True)
|
||||
@@ -0,0 +1,8 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
r=Path('/opt/athena-deck-dev/runtime/state');out=Path('/opt/athena-deck-dev/tts-cpu-strata-20261017');rows=json.loads((r/'profiles.json').read_text())
|
||||
for kind,name in [('omni','OmniVoice Studio'),('voxcpm','VoxCPM 2')]:
|
||||
p=next(p for p in rows if p['name']==name);ids=[p['model_id'],*p['components'].values()];entries=[]
|
||||
for ident in ids:
|
||||
d=json.loads((r/'models'/ident/'entry.json').read_text());entries.append({'id':ident,'file':d['file']})
|
||||
(out/(kind+'-entries.json')).write_text(json.dumps(entries))
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"strata_profile": "flash-next-strata-iq3-512k",
|
||||
"strata_requests_completed": 24,
|
||||
"strata_error": null,
|
||||
"gpus": [
|
||||
{
|
||||
"index": 0,
|
||||
"min_used_mib": 11249,
|
||||
"max_used_mib": 11249,
|
||||
"utilization_min_percent": 0,
|
||||
"utilization_max_percent": 52
|
||||
},
|
||||
{
|
||||
"index": 1,
|
||||
"min_used_mib": 15424,
|
||||
"max_used_mib": 15424,
|
||||
"utilization_min_percent": 4,
|
||||
"utilization_max_percent": 60
|
||||
}
|
||||
],
|
||||
"minimum_available_host_ram_gib": 10.54494857788086
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"text": "Jo Michael, die Sprachausgabe läuft jetzt auf der CPU."
|
||||
}
|
||||
Reference in new issue
Block a user