Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b9c32005f | ||
|
|
ea2fc6440b | ||
|
|
6248f02ca2 | ||
|
|
25df9d05a2 | ||
|
|
7601edfe28 | ||
|
|
e133d2412d | ||
|
|
9971cb559e | ||
|
|
e3a02e25c7 |
No files matched your search
@@ -19,11 +19,14 @@
|
|||||||
# is recorded in the parent tree, so cloning the parent commit recursively is
|
# is recorded in the parent tree, so cloning the parent commit recursively is
|
||||||
# reproducible without a second pin.
|
# reproducible without a second pin.
|
||||||
#
|
#
|
||||||
# THE BUILD LINE IS THE ONE PROVEN ON DANKCLAW, verbatim:
|
# THE BUILD LINE IS THE ONE PROVEN ON DANKCLAW, verbatim — with the Vulkan door
|
||||||
|
# open since 2026-10-19. That configure was run in this exact base image and
|
||||||
|
# answers `Found Vulkan: /usr/lib/x86_64-linux-gnu/libvulkan.so (found version
|
||||||
|
# "1.3.275") found components: glslc` then `Including Vulkan backend`:
|
||||||
#
|
#
|
||||||
# cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CCACHE=OFF \
|
# cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CCACHE=OFF \
|
||||||
# -DGGML_BACKEND_DL=OFF -DGGML_CPU_ALL_VARIANTS=OFF -DGGML_OPENMP=ON \
|
# -DGGML_BACKEND_DL=OFF -DGGML_CPU_ALL_VARIANTS=OFF -DGGML_OPENMP=ON \
|
||||||
# -DGGML_BLAS=OFF -DGGML_CUDA=OFF -DGGML_HIP=OFF -DGGML_VULKAN=OFF \
|
# -DGGML_BLAS=OFF -DGGML_CUDA=OFF -DGGML_HIP=OFF -DGGML_VULKAN=ON \
|
||||||
# -DGGML_METAL=OFF -DGGML_SYCL=OFF -DGGML_RPC=OFF \
|
# -DGGML_METAL=OFF -DGGML_SYCL=OFF -DGGML_RPC=OFF \
|
||||||
# && cmake --build build -j 8
|
# && cmake --build build -j 8
|
||||||
#
|
#
|
||||||
@@ -42,8 +45,12 @@
|
|||||||
# defaults it ON outside wasm/cross-compiles, i.e. -march=native for THIS
|
# defaults it ON outside wasm/cross-compiles, i.e. -march=native for THIS
|
||||||
# host — correct while build host == run host, wrong if anyone ever builds
|
# host — correct while build host == run host, wrong if anyone ever builds
|
||||||
# this image elsewhere, which is why the fleet builds it on Dankclaw.
|
# this image elsewhere, which is why the fleet builds it on Dankclaw.
|
||||||
# CUDA/HIP/VULKAN/METAL/SYCL/RPC all OFF: this is a CPU endpoint (the trial
|
# CUDA/HIP/METAL/SYCL/RPC stay OFF, VULKAN is ON: the endpoint computes on the
|
||||||
# ran on CPU; the box's GPUs belong to the text endpoints).
|
# gfx1151 iGPU (decision and co-tenancy gates:
|
||||||
|
# report/tts-npu-spike-verdict-2026-10-19.md, shape in [[Frank TTS Engine]]).
|
||||||
|
# Nothing else is available to this image: no ROCm userland, no NVIDIA
|
||||||
|
# userland, no macOS, no oneAPI, and RPC would add a second process to
|
||||||
|
# supervise on a box that already has one engine per card.
|
||||||
#
|
#
|
||||||
# BUILD SHARED LIBS, RUNTIME SMALL. BUILD_SHARED_LIBS defaults ON on Linux, so
|
# BUILD SHARED LIBS, RUNTIME SMALL. BUILD_SHARED_LIBS defaults ON on Linux, so
|
||||||
# tts-server links libggml*.so rather than swallowing them; the runtime stage
|
# tts-server links libggml*.so rather than swallowing them; the runtime stage
|
||||||
@@ -67,9 +74,28 @@ ARG BASE_IMAGE=docker.io/library/ubuntu:24.04@sha256:68ee22004a9109b44973313b02f
|
|||||||
# ------------------------------------------------------------------ build
|
# ------------------------------------------------------------------ build
|
||||||
FROM ${BASE_IMAGE} AS build
|
FROM ${BASE_IMAGE} AS build
|
||||||
|
|
||||||
|
# The three Vulkan build deps are not optional and not interchangeable:
|
||||||
|
# libvulkan-dev vulkan/vulkan.h + the VulkanHeaders/VulkanLoader CMake
|
||||||
|
# configs, i.e. what find_package(Vulkan) resolves to.
|
||||||
|
# glslc ggml compiles its shaders with glslc, not glslangValidator.
|
||||||
|
# Ubuntu's glslang-tools ships glslangValidator and NOT glslc,
|
||||||
|
# so without this package `find_package(Vulkan COMPONENTS
|
||||||
|
# glslc REQUIRED)` fails and there is no Vulkan backend.
|
||||||
|
# The archive's glslc is old (2023.8): it compiles
|
||||||
|
# GL_KHR_cooperative_matrix — the path ggml's quantized
|
||||||
|
# matmul needs — but reports cooperative_matrix2,
|
||||||
|
# integer_dot_product, bfloat16 and the micro-float
|
||||||
|
# extensions as unsupported, so those shader families are
|
||||||
|
# compiled out. If a Vulkan prefill ever reads as
|
||||||
|
# inexplicably slow, suspect this compiler before the device;
|
||||||
|
# the fix is a pinned glslang build passed as
|
||||||
|
# -DVulkan_GLSLC_EXECUTABLE=<path>, not a different runtime.
|
||||||
|
# spirv-headers find_package(SPIRV-Headers CONFIG REQUIRED); the distro
|
||||||
|
# package ships /usr/share/cmake/SPIRV-Headers/.
|
||||||
RUN apt-get update -qq \
|
RUN apt-get update -qq \
|
||||||
&& apt-get install -y -qq --no-install-recommends \
|
&& apt-get install -y -qq --no-install-recommends \
|
||||||
ca-certificates cmake g++ git make \
|
ca-certificates cmake g++ git make \
|
||||||
|
libvulkan-dev glslc spirv-headers \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Checked out detached at a full SHA, then the recorded submodule. No branch
|
# Checked out detached at a full SHA, then the recorded submodule. No branch
|
||||||
@@ -90,7 +116,7 @@ RUN cmake -B build -DCMAKE_BUILD_TYPE=Release \
|
|||||||
-DGGML_BLAS=OFF \
|
-DGGML_BLAS=OFF \
|
||||||
-DGGML_CUDA=OFF \
|
-DGGML_CUDA=OFF \
|
||||||
-DGGML_HIP=OFF \
|
-DGGML_HIP=OFF \
|
||||||
-DGGML_VULKAN=OFF \
|
-DGGML_VULKAN=ON \
|
||||||
-DGGML_METAL=OFF \
|
-DGGML_METAL=OFF \
|
||||||
-DGGML_SYCL=OFF \
|
-DGGML_SYCL=OFF \
|
||||||
-DGGML_RPC=OFF \
|
-DGGML_RPC=OFF \
|
||||||
@@ -102,9 +128,21 @@ FROM ${BASE_IMAGE}
|
|||||||
# libgomp1: the OpenMP runtime the build above links against. curl: the unit's
|
# libgomp1: the OpenMP runtime the build above links against. curl: the unit's
|
||||||
# HealthCmd. ca-certificates: so that curl can speak https if anyone ever
|
# HealthCmd. ca-certificates: so that curl can speak https if anyone ever
|
||||||
# points a probe at a URL with a scheme this host terminates elsewhere.
|
# points a probe at a URL with a scheme this host terminates elsewhere.
|
||||||
|
#
|
||||||
|
# libvulkan1 + mesa-vulkan-drivers are what make `--device Vulkan0` mean
|
||||||
|
# anything at runtime: libvulkan1 is the loader libggml-vulkan.so dlopens, and
|
||||||
|
# mesa-vulkan-drivers is the RADV ICD that claims the gfx1151. Loader without an
|
||||||
|
# ICD enumerates ZERO devices, and tts-server then dies in device lookup AFTER
|
||||||
|
# both GGUFs have been read — the journal reads as a model fault, not a missing
|
||||||
|
# driver. Enumerated from this base on 2026-10-19 with `--device /dev/dri
|
||||||
|
# --group-add keep-groups` plus the host's ComfyUI udev rule: "Radeon 8060S
|
||||||
|
# Graphics (RADV GFX1151)", API 1.4.318 (the heap figure is owned by
|
||||||
|
# [[Frank TTS Engine]]; it is the GTT-backed aperture, not the ~2 GiB DRM
|
||||||
|
# carve-out). No NVIDIA ICD is installed on purpose: one Vulkan device in the
|
||||||
|
# enumeration is what makes the NAME Vulkan0 safe to write down.
|
||||||
RUN apt-get update -qq \
|
RUN apt-get update -qq \
|
||||||
&& apt-get install -y -qq --no-install-recommends \
|
&& apt-get install -y -qq --no-install-recommends \
|
||||||
ca-certificates curl libgomp1 \
|
ca-certificates curl libgomp1 libvulkan1 mesa-vulkan-drivers \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Same unprivileged uid as the frank-tts façade (10000): the voice packs and the
|
# Same unprivileged uid as the frank-tts façade (10000): the voice packs and the
|
||||||
|
|||||||
@@ -40,12 +40,28 @@
|
|||||||
# speaks to the server from inside its own namespace, which is where the address
|
# speaks to the server from inside its own namespace, which is where the address
|
||||||
# is valid.
|
# is valid.
|
||||||
#
|
#
|
||||||
# MEMORY / NO GPU. Peak RSS measured 5.7 GiB with both GGUFs resident
|
# MEMORY / THE RENDER NODE. Host RSS is ~1.7 GiB, not the size of the GGUFs:
|
||||||
# (2026-10-18 trial); no memory limit is set because the box has the room and a
|
# the Vulkan backend copies both tensors into device memory at load, so they
|
||||||
# limit would convert a busy moment into an OOM kill mid-utterance. No
|
# stop counting in the process's RSS (measured after the 2026-10-19 cutover —
|
||||||
# /dev/kfd, no /dev/dri, no keep-groups: every GPU backend is compiled out of
|
# `podman stats` / `ps -o rss`). No memory limit is set: the box has the room
|
||||||
# the image, the endpoint is CPU-only by decision, and the GPUs on this host
|
# and a limit would convert a busy moment into an OOM kill mid-utterance.
|
||||||
# belong to the text endpoints.
|
#
|
||||||
|
# `AddDevice=/dev/dri` is what makes the iGPU visible; without it the Vulkan
|
||||||
|
# ICD enumerates nothing and the server dies on device lookup after it has
|
||||||
|
# already read both GGUFs. `GroupAdd=keep-groups` is belt-and-braces, not the
|
||||||
|
# thing that works here: the units podman spawns carry no supplementary groups
|
||||||
|
# at all, and this host grants render access a different way — the udev rule
|
||||||
|
# that makes the render nodes world-writable (same rule ComfyUI rides, see
|
||||||
|
# dankclaw/comfyui). Measured: `id` inside this container lists only the
|
||||||
|
# container's own group, and `tts-server` still holds renderD129.
|
||||||
|
# The node is NOT named: this host is hybrid, renderD128 is the NVIDIA card and
|
||||||
|
# renderD129 the amdgpu iGPU, so a node number in the unit is a guess that a
|
||||||
|
# re-probe can invalidate, while the directory hands the container every render
|
||||||
|
# node and the driver picks by name.
|
||||||
|
#
|
||||||
|
# /dev/kfd stays absent on purpose: that is the ROCm compute interface, owned by
|
||||||
|
# the engines that use HIP. A Vulkan endpoint has no use for it, and handing a
|
||||||
|
# container a second way onto the GPU is surface for nothing.
|
||||||
#
|
#
|
||||||
# THE VOICE MOUNT IS READ-ONLY AND IS FOR THE WARMER, NOT THE ENGINE. A voice
|
# THE VOICE MOUNT IS READ-ONLY AND IS FOR THE WARMER, NOT THE ENGINE. A voice
|
||||||
# becomes known to the engine only through POST /v1/audio/voices, and the
|
# becomes known to the engine only through POST /v1/audio/voices, and the
|
||||||
@@ -98,6 +114,9 @@ Network=frank-tts-engine.network
|
|||||||
EnvironmentFile=/home/dank/serverAppConfigs/scripts/frank-tts-engine.env
|
EnvironmentFile=/home/dank/serverAppConfigs/scripts/frank-tts-engine.env
|
||||||
Volume=/home/dank/models/Qwen3-TTS-GGUF:/models:ro
|
Volume=/home/dank/models/Qwen3-TTS-GGUF:/models:ro
|
||||||
Volume=/home/dank/voices:/voices:ro
|
Volume=/home/dank/voices:/voices:ro
|
||||||
|
# Render access for the iGPU (see MEMORY / THE RENDER NODE above).
|
||||||
|
AddDevice=/dev/dri
|
||||||
|
GroupAdd=keep-groups
|
||||||
HealthCmd=curl -fsS http://127.0.0.1:8880/health
|
HealthCmd=curl -fsS http://127.0.0.1:8880/health
|
||||||
HealthInterval=30s
|
HealthInterval=30s
|
||||||
HealthTimeout=10s
|
HealthTimeout=10s
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
# supervision, no retries, no logging of its own. PID 1 stays the server, so
|
# supervision, no retries, no logging of its own. PID 1 stays the server, so
|
||||||
# `podman stop` and the unit's Restart=always drive it directly.
|
# `podman stop` and the unit's Restart=always drive it directly.
|
||||||
#
|
#
|
||||||
# THE FLAGS THAT ARE NOT HERE, and must stay absent:
|
# THE FLAG THAT MUST STAY ABSENT:
|
||||||
#
|
#
|
||||||
# --threads / -t does not exist in this build. src/backend.h computes the
|
# --threads / -t does not exist in this build. src/backend.h computes the
|
||||||
# CPU thread count as std::thread::hardware_concurrency()/2
|
# CPU thread count as std::thread::hardware_concurrency()/2
|
||||||
@@ -18,13 +18,19 @@
|
|||||||
# placement — pinning is deliberately not done anywhere in
|
# placement — pinning is deliberately not done anywhere in
|
||||||
# this stack. See the env file header for the same warning
|
# this stack. See the env file header for the same warning
|
||||||
# aimed at the operator.
|
# aimed at the operator.
|
||||||
# --device left at its default. Every GPU backend is compiled out of
|
|
||||||
# the image, so the default device pick can only land on
|
|
||||||
# CPU; naming a device would add a way to be wrong.
|
|
||||||
#
|
#
|
||||||
# Everything defaults to the shape the 2026-10-18 trial measured, so an empty
|
# --device IS here, but conditionally: it reaches the binary only when
|
||||||
# environment still boots the decided configuration: 1.7 B talker Q4_K_M with
|
# QWENTTS_DEVICE is non-empty, and empty is the CPU rollback — the binary then
|
||||||
# the Q8_0 tokenizer, one request at a time, on the private bridge.
|
# takes its own default device, which is CPU because the CPU backend is always
|
||||||
|
# built. One line in scripts/frank-tts-engine.env moves the endpoint between the
|
||||||
|
# two shapes, with no rebuild. What must never reach argv is a device NAME the
|
||||||
|
# loader does not enumerate: that is not refused by the argument parser, it dies
|
||||||
|
# during device lookup with the loader's own error, so the journal reads as a
|
||||||
|
# load that failed rather than a configuration refusal.
|
||||||
|
#
|
||||||
|
# Everything defaults to the shape this endpoint runs: 1.7 B talker Q4_K_M with
|
||||||
|
# the Q8_0 tokenizer, one request at a time, on the private bridge, on the
|
||||||
|
# gfx1151 iGPU. An empty environment still boots that shape.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# The binary path. Overridable for one reason: the bats seam runs a stub
|
# The binary path. Overridable for one reason: the bats seam runs a stub
|
||||||
@@ -60,13 +66,33 @@ set -euo pipefail
|
|||||||
: "${QWENTTS_LANG:=auto}"
|
: "${QWENTTS_LANG:=auto}"
|
||||||
|
|
||||||
# One request at a time. The server-side queue is a serialised FIFO at this
|
# One request at a time. The server-side queue is a serialised FIFO at this
|
||||||
# setting, which is what keeps the measured per-voice timings true; batching
|
# setting, which is what keeps the per-voice timings predictable. A second
|
||||||
# on a CPU build splits the same cores between two syntheses and the warm RTF
|
# concurrent synthesis shares the device with the first — and on this box that
|
||||||
# margin (0.55-0.67 against real time 1.0) disappears. The engine's own
|
# device is also carrying frank-dragoon — so it buys no throughput and it
|
||||||
# default is also 1; it is written here because it is a decision, not an
|
# doubles the wait for the caller behind it. The engine's own default is also 1;
|
||||||
# accident.
|
# written here because it is a decision, not an accident.
|
||||||
: "${QWENTTS_MAX_BATCH:=1}"
|
: "${QWENTTS_MAX_BATCH:=1}"
|
||||||
|
|
||||||
|
# The compute device, NAMED and not numbered: `Vulkan0` is how ggml enumerates
|
||||||
|
# the gfx1151 iGPU on this host. An index would follow whatever order the
|
||||||
|
# loader's device list returns; a name says which device this endpoint means.
|
||||||
|
# The container sees exactly one Vulkan device because the image carries the
|
||||||
|
# Mesa ICD and no NVIDIA one, so the 3090 is not in the enumeration at all.
|
||||||
|
#
|
||||||
|
# EMPTY IS THE CPU ROLLBACK: a value that is set but EMPTY passes no `--device`,
|
||||||
|
# the binary picks its own default, and the CPU backend is always built — which
|
||||||
|
# is why moving this endpoint between the iGPU and the CPU is one line in
|
||||||
|
# scripts/frank-tts-engine.env and not a rebuild.
|
||||||
|
#
|
||||||
|
# That is also why the default below is NOT `${QWENTTS_DEVICE:=Vulkan0}`: `:=`
|
||||||
|
# fires on a set-but-empty variable as well as an unset one, so the rollback line
|
||||||
|
# `QWENTTS_DEVICE=` would be rewritten back to Vulkan0 and the endpoint would sit
|
||||||
|
# on the shared GPU with no way out short of a rebuild. Only UNSET takes the
|
||||||
|
# default.
|
||||||
|
if [[ ! -v QWENTTS_DEVICE ]]; then
|
||||||
|
QWENTTS_DEVICE=Vulkan0
|
||||||
|
fi
|
||||||
|
|
||||||
# Fail loudly BEFORE binding, so the journal says which artifact is missing
|
# Fail loudly BEFORE binding, so the journal says which artifact is missing
|
||||||
# instead of the unit reporting a container that starts and dies. This is the
|
# instead of the unit reporting a container that starts and dies. This is the
|
||||||
# self-healing path: Restart=always re-runs it every RestartSec, and the same
|
# self-healing path: Restart=always re-runs it every RestartSec, and the same
|
||||||
@@ -79,11 +105,20 @@ for artifact in "$QWENTTS_MODEL" "$QWENTTS_CODEC"; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
exec "$QWENTTS_BIN" \
|
ARGS=(
|
||||||
--model "$QWENTTS_MODEL" \
|
--model "$QWENTTS_MODEL"
|
||||||
--codec "$QWENTTS_CODEC" \
|
--codec "$QWENTTS_CODEC"
|
||||||
--alias "$QWENTTS_ALIAS" \
|
--alias "$QWENTTS_ALIAS"
|
||||||
--host "$QWENTTS_HOST" \
|
--host "$QWENTTS_HOST"
|
||||||
--port "$QWENTTS_PORT" \
|
--port "$QWENTTS_PORT"
|
||||||
--lang "$QWENTTS_LANG" \
|
--lang "$QWENTTS_LANG"
|
||||||
--max-batch "$QWENTTS_MAX_BATCH"
|
--max-batch "$QWENTTS_MAX_BATCH"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Only when a device is named. An empty QWENTTS_DEVICE has to produce NO flag,
|
||||||
|
# because "the rollback shape" is argv identical to the pre-iGPU endpoint.
|
||||||
|
if [[ -n "$QWENTTS_DEVICE" ]]; then
|
||||||
|
ARGS+=(--device "$QWENTTS_DEVICE")
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$QWENTTS_BIN" "${ARGS[@]}"
|
||||||
@@ -136,25 +136,36 @@ TTS engine today|3.84 GiB RSS, CPU|its device-resident replacement lands in that
|
|||||||
ICD**, so Vulkan device 0 is the iGPU here. Do not trust that ordering — select by
|
ICD**, so Vulkan device 0 is the iGPU here. Do not trust that ordering — select by
|
||||||
device *name*, or an image that grows an `nvidia_icd.json` silently points TTS at the
|
device *name*, or an image that grows an `nvidia_icd.json` silently points TTS at the
|
||||||
3090 slot.
|
3090 slot.
|
||||||
2. **Contention gate.** `frank-dragoon` is the endpoint the operator session runs on, so the
|
2. **Contention gate — PASSED, measured 2026-10-19 after the cutover.** With a 16.9 s
|
||||||
honest measurement with both loaded is dragoon's own TTFT and decode with a synthesis in
|
synthesis occupying the device, `frank-dragoon` answered a streamed 124-token request at
|
||||||
flight — one request each, no ladder. Expect compute-unit sharing rather than memory
|
**17 ms to first token and ~35 tok/s decode**, against 17 ms and ~33 tok/s for the same
|
||||||
pressure: the aperture has room, the shaders do not.
|
request with the card idle. Compute-unit sharing showed up as nothing. One request per
|
||||||
|
arm, no ladder: these are the gate's evidence, not a throughput record, and the engine's
|
||||||
|
own shape lives in [[Frank TTS Engine]].
|
||||||
|
|
||||||
**Change surface** — the whole edit, so nobody re-derives it:
|
**Change surface — as landed** (PR #34, `6248f02`; the CPU shape stays reachable as the
|
||||||
|
rollback):
|
||||||
|
|
||||||
1. `Containerfile.engine` build stage: add `libvulkan-dev glslang-dev`. It installs only
|
1. `Containerfile.engine` build stage: add **`libvulkan-dev glslc spirv-headers`**. The
|
||||||
`ca-certificates cmake g++ git make` today, and ggml's Vulkan backend compiles its
|
prediction above (`libvulkan-dev glslang-dev`) is wrong on two counts and the configure
|
||||||
shaders at build time — the flag alone fails at configure.
|
says so: ggml looks for `glslc`, which Ubuntu's `glslang-tools` does **not** ship (it
|
||||||
2. `-DGGML_VULKAN=OFF` → `ON` in the same cmake block; the flag list is written out
|
ships `glslangValidator`), and `find_package(SPIRV-Headers CONFIG REQUIRED)` needs the
|
||||||
explicitly, so this is a one-word diff.
|
distro's `spirv-headers`, which does carry the CMake config. `glslc` is its own source
|
||||||
3. Runtime stage: add `mesa-vulkan-drivers`. Without a Vulkan **ICD inside the image** the
|
package on noble, at 2023.8 — old enough that only `GL_KHR_cooperative_matrix` compiles,
|
||||||
device node buys nothing — there is no `radeon_icd.json` in the container today.
|
so the coopmat2 / integer-dot / bf16 / micro-float shader families are built out. Suspect
|
||||||
4. `frank-tts-engine.container`: `AddDevice=/dev/dri` + `GroupAdd=keep-groups` — **not**
|
that compiler before the device if a Vulkan prefill ever reads as slow.
|
||||||
`renderD128`. On this hybrid box that node is the NVIDIA card; the iGPU is
|
2. `-DGGML_VULKAN=OFF` → `ON`: one word in the written-out flag list.
|
||||||
`renderD129` (`readlink -f /sys/class/drm/renderD129/device/driver` → `amdgpu`).
|
3. Runtime stage: `mesa-vulkan-drivers` **and** `libvulkan1` — the ICD and its loader. An
|
||||||
5. Engine argv: `--device Vulkan0` — qwentts.cpp's tools take `--device <name>` at the
|
image with a loader and no ICD enumerates zero devices.
|
||||||
pinned commit.
|
4. `frank-tts-engine.container`: `AddDevice=/dev/dri` + `GroupAdd=keep-groups` — the
|
||||||
|
DIRECTORY, never the node: on this hybrid box `renderD128` is the NVIDIA card and
|
||||||
|
`renderD129` the amdgpu iGPU (`readlink -f /sys/class/drm/renderD129/device/driver` →
|
||||||
|
`amdgpu`). On this host the udev rule already makes the nodes world-writable, so the
|
||||||
|
group is belt-and-braces, not the gate.
|
||||||
|
5. Engine argv: `--device Vulkan0`, reached through `QWENTTS_DEVICE` in
|
||||||
|
`scripts/frank-tts-engine.env`. **An empty value passes no flag at all** — that is the
|
||||||
|
CPU rollback, and it is why the entrypoint's default is an `-v` test rather than `:=`,
|
||||||
|
which also fires on a set-but-empty value and would silently undo the rollback.
|
||||||
|
|
||||||
Gate 1 recipe, already run and **PASSED**: `mesa-vulkan-drivers` + `vulkan-tools` in a
|
Gate 1 recipe, already run and **PASSED**: `mesa-vulkan-drivers` + `vulkan-tools` in a
|
||||||
throwaway container off the same base, `--device /dev/dri`, then `vulkaninfo --text` and read
|
throwaway container off the same base, `--device /dev/dri`, then `vulkaninfo --text` and read
|
||||||
|
|||||||
@@ -27,6 +27,16 @@
|
|||||||
# below stop describing the process you are running. Nothing in this fleet
|
# below stop describing the process you are running. Nothing in this fleet
|
||||||
# pins this container; that is a decision, not an oversight.
|
# pins this container; that is a decision, not an oversight.
|
||||||
#
|
#
|
||||||
|
# THE DEVICE LAW (since the 2026-10-19 Vulkan cutover). Synthesis computes on
|
||||||
|
# the gfx1151 iGPU — the SAME card frank-dragoon serves. It is a shared device,
|
||||||
|
# never a dedicated one, so two numbers matter and neither is what `rocm-smi`
|
||||||
|
# prints first: the memory the container may use is the RADV heap inside the
|
||||||
|
# GTT-backed aperture (the ~2 GiB DRM carve-out is not the working set), and the
|
||||||
|
# timing that matters is dragoon's, measured WITH a synthesis in flight. The
|
||||||
|
# rollback is one line: set QWENTTS_DEVICE empty, and the entrypoint passes no
|
||||||
|
# --device at all — the pre-iGPU CPU shape, no rebuild, no restart of anything
|
||||||
|
# else on the box.
|
||||||
|
#
|
||||||
# THE REGISTRY LAW (why the unit has an ExecStartPost at all). Registrations live
|
# THE REGISTRY LAW (why the unit has an ExecStartPost at all). Registrations live
|
||||||
# in memory only, so a restart loses them, and re-registration alone does NOT warm
|
# in memory only, so a restart loses them, and re-registration alone does NOT warm
|
||||||
# a voice — the warm pass has to synthesize something. Without it the façade
|
# a voice — the warm pass has to synthesize something. Without it the façade
|
||||||
@@ -103,6 +113,17 @@ QWENTTS_LANG=auto
|
|||||||
# round-trip outside it) is what absorbs the queue.
|
# round-trip outside it) is what absorbs the queue.
|
||||||
QWENTTS_MAX_BATCH=1
|
QWENTTS_MAX_BATCH=1
|
||||||
|
|
||||||
|
# The compute device, by ggml device NAME. `Vulkan0` is the gfx1151 iGPU: the
|
||||||
|
# image carries the Mesa (RADV) ICD and no NVIDIA ICD, so this container's
|
||||||
|
# Vulkan enumeration has exactly one entry and it is the iGPU. The unit hands
|
||||||
|
# the container /dev/dri and keeps the render group; on this hybrid host the
|
||||||
|
# iGPU's render node is renderD129 and renderD128 is the NVIDIA card, which is
|
||||||
|
# why the unit passes the directory and lets the driver resolve the node.
|
||||||
|
#
|
||||||
|
# ROLLBACK: an empty value means no --device flag at all — the CPU shape this
|
||||||
|
# endpoint shipped with until 2026-10-19. One line, no rebuild.
|
||||||
|
QWENTTS_DEVICE=Vulkan0
|
||||||
|
|
||||||
# --- the boot warmer (dankclaw/voiceservice/tts-engine-warm.sh) --------------
|
# --- the boot warmer (dankclaw/voiceservice/tts-engine-warm.sh) --------------
|
||||||
# These three are read by the warm hook, not by tts-server. They live here
|
# These three are read by the warm hook, not by tts-server. They live here
|
||||||
# because the hook is exec-ed into this container and therefore inherits this
|
# because the hook is exec-ed into this container and therefore inherits this
|
||||||
|
|||||||
@@ -1,35 +1,36 @@
|
|||||||
---
|
---
|
||||||
type: reference
|
type: reference
|
||||||
description: "The engine behind the fleet's speech endpoint: its runtime, private bridge, and the surface it publishes."
|
description: "The engine behind the fleet's speech endpoint: its Vulkan build on the iGPU, its private bridge, and what it publishes."
|
||||||
tags:
|
tags:
|
||||||
- dankclaw
|
- dankclaw
|
||||||
- tts
|
- tts
|
||||||
- voice
|
- voice
|
||||||
- quadlet
|
- quadlet
|
||||||
- cpu
|
- vulkan
|
||||||
timestamp: 2026-10-18
|
timestamp: 2026-10-19
|
||||||
---
|
---
|
||||||
|
|
||||||
# Frank TTS Engine
|
# Frank TTS Engine
|
||||||
|
|
||||||
`frank-tts-engine` is the **arm A text-to-speech engine** on Dankclaw: [qwentts.cpp](https://github.com/ServeurpersoCom/qwentts.cpp)'s resident `tts-server` HTTP process, holding the Qwen3-TTS **1.7 B base talker (Q4_K_M)** and the **12 Hz tokenizer (Q8_0)** in RAM once and synthesizing from there. It listens on container port **8880** and is **deliberately not a fleet endpoint** — the endpoint consumers address is `frank-tts` on **7772**, which resolves voice names, re-encodes to mp3 and owns the timeout budget. This page is the engine runbook; the endpoint's contract lives with its own page.
|
`frank-tts-engine` is the **arm A text-to-speech engine** on Dankclaw: [qwentts.cpp](https://github.com/ServeurpersoCom/qwentts.cpp)'s resident `tts-server` HTTP process, holding the Qwen3-TTS **1.7 B base talker (Q4_K_M)** and the **12 Hz tokenizer (Q8_0)** loaded once and synthesizing from there — **on the gfx1151 iGPU** (ggml's Vulkan backend, `--device Vulkan0`) since 2026-10-19, and in host RAM before that. It listens on container port **8880** and is **deliberately not a fleet endpoint** — the endpoint consumers address is `frank-tts` on **7772**, which resolves voice names, re-encodes to mp3 when asked, and owns the timeout budget. This page is the engine runbook; the endpoint's contract lives with its own page.
|
||||||
|
|
||||||
**Deployed 2026-10-18.** The chain ran in the order at the bottom of this page — fetch (1.4 GiB, byte + LFS oid verified, 18 s), image build against the pinned commit, unit + network install, container-health gate, warm pass — and the live state still reads the way this page describes it: unit `active` with no drop-ins, container healthy 31 s after the build, **4.0 GiB** resident on a host that kept 17 GiB available, `3 voice(s) registered and warm` in the journal, and no published port anywhere. Two things the first real boot taught: the warm hook's registration body must reach curl through a **file**, not an argument (Troubleshooting), and `STEP 3/13 RUN useradd` is the first honest proof of the image's non-root user.
|
**Deployed 2026-10-18, cut over to the iGPU on 2026-10-19.** The first chain ran in the order at the bottom of this page — fetch (1.4 GiB, byte + LFS oid verified), image build against the pinned commit, unit + network install, container-health gate, warm pass — and the live state still reads the way this page describes it: unit `active` with no drop-ins, container healthy shortly after the build, `3 voice(s) registered and warm` in the journal, and no published port anywhere. Two things the first real boot taught: the warm hook's registration body must reach curl through a **file**, not an argument (Troubleshooting), and `STEP 3/13 RUN useradd` is the first honest proof of the image's non-root user.
|
||||||
|
|
||||||
**Host:** Dankclaw (`192.168.0.143`), rootless Podman, user `dank` — **Port:** 8880, **never published** — **Network:** the private `systemd-frank-tts-engine` bridge (10.89.5.0/24) and no other — **Deployer:** `frank-tts-engine` — **Consumers:** `frank-tts` (7772) and, through it, every voice request in the fleet including [[Open Notebook]]'s podcast renders.
|
**Host:** Dankclaw (`192.168.0.143`), rootless Podman, user `dank` — **Port:** 8880, **never published** — **Network:** the private `systemd-frank-tts-engine` bridge (10.89.5.0/24) and no other — **Deployer:** `frank-tts-engine` — **Consumers:** `frank-tts` (7772) and, through it, every voice request in the fleet including [[Open Notebook]]'s podcast renders.
|
||||||
|
|
||||||
## Facts (verified 2026-10-18 against the pinned upstream commit, the Hub, and the CPU trial on this host)
|
## Facts (verified 2026-10-18 against the pinned upstream commit, the Hub and the CPU trial; the device rows re-verified on the live iGPU shape 2026-10-19)
|
||||||
|
|
||||||
| Item | Value |
|
| Item | Value |
|
||||||
|------|-------|
|
|------|-------|
|
||||||
| Engine | `tts-server` from qwentts.cpp, pinned at commit `5916bf7c79dbb4e66fc059cdc507a79a23a28bb4` (`dankclaw/voiceservice/Containerfile.engine`). The source is **not vendored**: the image clones that commit and its recorded `ggml` submodule, so the build needs outbound HTTPS and the `cfhash` label is what keeps an unchanged re-deploy offline |
|
| Engine | `tts-server` from qwentts.cpp, pinned at commit `5916bf7c79dbb4e66fc059cdc507a79a23a28bb4` (`dankclaw/voiceservice/Containerfile.engine`). The source is **not vendored**: the image clones that commit and its recorded `ggml` submodule, so the build needs outbound HTTPS and the `cfhash` label is what keeps an unchanged re-deploy offline |
|
||||||
| Build line | `cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CCACHE=OFF -DGGML_BACKEND_DL=OFF -DGGML_CPU_ALL_VARIANTS=OFF -DGGML_OPENMP=ON -DGGML_BLAS=OFF -DGGML_CUDA=OFF -DGGML_HIP=OFF -DGGML_VULKAN=OFF -DGGML_METAL=OFF -DGGML_SYCL=OFF -DGGML_RPC=OFF && cmake --build build -j 8` — the exact line the 2026-10-18 trial ran on this box. `GGML_BLAS=OFF` is **forced**: Dankclaw has `libopenblas.so.0` and no BLAS dev headers, so upstream's own `Dockerfile` and `buildcpu.sh` (both of which pass BLAS on) cannot be copied. No `-DGGML_NATIVE` is passed, and ggml defaults it on, so the binary is `-march=native` for the machine that built it: **build this image on the host that runs it** |
|
| Build line | `cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CCACHE=OFF -DGGML_BACKEND_DL=OFF -DGGML_CPU_ALL_VARIANTS=OFF -DGGML_OPENMP=ON -DGGML_BLAS=OFF -DGGML_CUDA=OFF -DGGML_HIP=OFF -DGGML_VULKAN=ON -DGGML_METAL=OFF -DGGML_SYCL=OFF -DGGML_RPC=OFF && cmake --build build -j 8`. **`GGML_VULKAN=ON` since 2026-10-19**, and that door needs three packages in the build stage: `libvulkan-dev`, `spirv-headers`, and **`glslc`** — which Ubuntu's `glslang-tools` does NOT ship (it ships `glslangValidator`, and `find_package(Vulkan COMPONENTS glslc REQUIRED)` fails without the package). The archive's `glslc` is 2023.8: `GL_KHR_cooperative_matrix` compiles, the coopmat2 / integer-dot / bf16 / micro-float shader families do not. `GGML_BLAS=OFF` is **forced**: Dankclaw has `libopenblas.so.0` and no BLAS dev headers, so upstream's own `Dockerfile` and `buildcpu.sh` (both pass BLAS on) cannot be copied. No `-DGGML_NATIVE` is passed, and ggml defaults it on, so the binary is `-march=native` for the machine that built it: **build this image on the host that runs it** |
|
||||||
| Image | built locally as `franksdank/frank-tts-engine:latest`, two stages from one digest-pinned base `docker.io/library/ubuntu:24.04@sha256:68ee22004a9109b44973313b02ff7b1de250f1de0f5ecb628d73f579aaff33ac` (index digest resolved 2026-10-18). Runtime stage: `libgomp1` (OpenMP is on), `curl` (the unit's `HealthCmd` runs as `/bin/sh -c`, and the warmer speaks HTTP), uid **10000**, `LD_LIBRARY_PATH=/app` because ggml builds shared by default and the link-time RPATH names the build tree |
|
| Image | built locally as `franksdank/frank-tts-engine:latest`, two stages from one digest-pinned base `docker.io/library/ubuntu:24.04@sha256:68ee22004a9109b44973313b02ff7b1de250f1de0f5ecb628d73f579aaff33ac` (index digest resolved 2026-10-18). Runtime stage: `libgomp1` (OpenMP is on), `curl` (the unit's `HealthCmd` runs as `/bin/sh -c`, and the warmer speaks HTTP), `libvulkan1` + `mesa-vulkan-drivers` (the loader and the RADV ICD — a loader with no ICD enumerates ZERO devices, and the server then dies in device lookup after both GGUFs have been read), uid **10000**, `LD_LIBRARY_PATH=/app` because ggml builds shared by default and the link-time RPATH names the build tree. **No NVIDIA ICD on purpose**: exactly one Vulkan device in the enumeration is what makes the name `Vulkan0` safe to write down |
|
||||||
| Talker | `qwen-talker-1.7b-base-Q4_K_M.gguf`, **1 219 245 248 B**, sha256 `ea393ebaf2167ea23ce9fc18b093822851358a950d7075cd47ab4f6ce23e887d` (the Hub's LFS pointer oid) |
|
| Talker | `qwen-talker-1.7b-base-Q4_K_M.gguf`, **1 219 245 248 B**, sha256 `ea393ebaf2167ea23ce9fc18b093822851358a950d7075cd47ab4f6ce23e887d` (the Hub's LFS pointer oid) |
|
||||||
| Tokenizer | `qwen-tokenizer-12hz-Q8_0.gguf`, **291 150 624 B**, sha256 `1883beeed99348fc35e23dd225e9082f93f6f8c109330a33d935baa8acdbfd94` |
|
| Tokenizer | `qwen-tokenizer-12hz-Q8_0.gguf`, **291 150 624 B**, sha256 `1883beeed99348fc35e23dd225e9082f93f6f8c109330a33d935baa8acdbfd94` |
|
||||||
| Source of both | `https://huggingface.co/Serveurperso/Qwen3-TTS-GGUF`, fetched by `scripts/download-frank-tts-engine-qwentts.sh` into `/home/dank/models/Qwen3-TTS-GGUF`, mounted read-only at `/models`. It has to be the **base** variant: the engine refuses every voice registration unless the model reports type `base`, so on `customvoice`/`voicedesign` the cloned-voice product does not exist. A 0.6 B talker (628 905 056 B) exists and is **not** the decided artifact |
|
| Source of both | `https://huggingface.co/Serveurperso/Qwen3-TTS-GGUF`, fetched by `scripts/download-frank-tts-engine-qwentts.sh` into `/home/dank/models/Qwen3-TTS-GGUF`, mounted read-only at `/models`. It has to be the **base** variant: the engine refuses every voice registration unless the model reports type `base`, so on `customvoice`/`voicedesign` the cloned-voice product does not exist. A 0.6 B talker (628 905 056 B) exists and is **not** the decided artifact |
|
||||||
| Memory | **5.7 GiB peak RSS** with both files resident (2026-10-18 trial). No `LimitMEMORY`/`MemoryMax`: a limit would turn a busy moment into an OOM kill in the middle of an utterance |
|
| Device | `--device Vulkan0`: the gfx1151 iGPU, **shared with [[frank-dragoon]] as a co-tenant, never a handover**. Proven on the live pair, not inferred: `fuser -v /dev/dri/renderD129` lists `tts-server` beside `flash_serve`. Both gates (the RADV heap and dragoon's contention) are §5 of `report/tts-npu-spike-verdict-2026-10-19.md`, which also carries the change surface. **Rollback: `QWENTTS_DEVICE=` (empty) in `scripts/frank-tts-engine.env`, redeploy this one service** — the entrypoint then passes no `--device` at all, which is the CPU shape, no rebuild, nothing else restarts |
|
||||||
| Concurrency | `--max-batch 1`: a serialised FIFO. Warm RTF on this box is 0.55–0.67 against real time 1.0, and that margin is the entire headroom a live stream has; two concurrent syntheses split the same cores and the second caller's first byte additionally waits for the first utterance to finish |
|
| Memory | **1.7 GiB host RSS** since the iGPU cutover — the weights ride the device. No `LimitMEMORY`/`MemoryMax`: a limit would turn a busy moment into an OOM kill in the middle of an utterance |
|
||||||
|
| Concurrency | `--max-batch 1`: a serialised FIFO. Warm RTF on the iGPU measures **0.20** (11.04 s of audio in 2.23 s) with `frank-dragoon` live on the same card, so a live stream has room to spare; a second concurrent synthesis would share the device with the first and make the caller behind it wait out the whole first utterance, so the FIFO stays a decision, not an accident |
|
||||||
| Network | `systemd-frank-tts-engine` (10.89.5.0/24, `dankclaw/voiceservice/quadlet/frank-tts-engine.network`) and **nothing else**, with **no `PublishPort` at all**. `frank-tts` joins the same bridge and dials `http://frank-tts-engine:8880` |
|
| Network | `systemd-frank-tts-engine` (10.89.5.0/24, `dankclaw/voiceservice/quadlet/frank-tts-engine.network`) and **nothing else**, with **no `PublishPort` at all**. `frank-tts` joins the same bridge and dials `http://frank-tts-engine:8880` |
|
||||||
| Voices | `/home/dank/voices` mounted read-only at `/voices`, and it is the **warmer** that reads it, not the server: `tts-server` receives reference audio as base64 in a registration body and keeps its registry in memory only |
|
| Voices | `/home/dank/voices` mounted read-only at `/voices`, and it is the **warmer** that reads it, not the server: `tts-server` receives reference audio as base64 in a registration body and keeps its registry in memory only |
|
||||||
| Health | `GET /health` → `{"status":"ok"}`, served by the HTTP thread rather than the synthesis queue, so a busy engine still reads healthy. Probed by the unit (`HealthCmd`, 30 s interval, 120 s start period) **inside the container's namespace**, because there is no published port to probe from outside |
|
| Health | `GET /health` → `{"status":"ok"}`, served by the HTTP thread rather than the synthesis queue, so a busy engine still reads healthy. Probed by the unit (`HealthCmd`, 30 s interval, 120 s start period) **inside the container's namespace**, because there is no published port to probe from outside |
|
||||||
@@ -37,18 +38,11 @@ timestamp: 2026-10-18
|
|||||||
|
|
||||||
## Why this engine, and not the alternatives
|
## Why this engine, and not the alternatives
|
||||||
|
|
||||||
The criterion Frank set on 2026-10-18 was **"whatever is better for live output"**, and live output is decided by time-to-first-audio and by whether the stream stays ahead of real time — not by benchmark throughput. RTF only has to stay under 1.0 with margin; what separates the arms is first-byte latency and **spread**. Measured on this host the same day (CPU; the full A/B is the section *"Decision: arm A for live output (2026-10-18)"* in , which is the source of these numbers):
|
The criterion Frank set on 2026-10-18 was **"whatever is better for live output"**, and live output is decided by time-to-first-audio and by whether the stream stays ahead of real time — not by benchmark throughput. On that criterion the resident `tts-server` (arm A) beat the mainline per-request CLI path (arm B) on this box the same day, and the deciding property was **spread**: the resident server repeats the same first-audio latency every run, while the CLI path varies enough that some runs fall behind real time and a live listener hears the stream stall mid-sentence. That A/B was a CPU measurement and the endpoint has since moved to the iGPU, so the shape of the argument is what is kept here; no page carries its numbers any more, and they are not worth re-deriving.
|
||||||
|
|
||||||
| Measure | Resident `tts-server` (arm A, chosen) | Mainline per-request CLI path (arm B) |
|
The rollback to the other backend stays in the repo untouched — `TTS_BACKEND=llama-tts-cli` in `scripts/frank-tts.env` still selects the per-request CLI engine, and that file's header documents what it costs.
|
||||||
|---|---|---|
|
|
||||||
| first audio byte | **86–451 ms** end to end; **94–112 ms** server-side | model load, per request |
|
|
||||||
| warm real-time factor while streaming | **0.55–0.67** | 0.93–0.99 |
|
|
||||||
| run-to-run spread | **±0.01** | ±0.25 |
|
|
||||||
| HTTP surface | serves `/v1/audio/speech` itself | none — façade CLI only |
|
|
||||||
|
|
||||||
The spread is the whole argument: at ±0.01 the engine finishes synthesizing 1.5–1.8× faster than the audio plays, every run; at ±0.25 some runs fall behind real time and a live listener hears the stream stall mid-sentence. The rollback path stays in the repo untouched — `TTS_BACKEND=llama-tts-cli` in `scripts/frank-tts.env` still selects the per-request CLI engine, and that file's header documents what it costs.
|
## Four laws this service lives under
|
||||||
|
|
||||||
## Three laws this service lives under
|
|
||||||
|
|
||||||
**1. The registry law → the unit warms at boot.** The voice registry is **memory only**: a restart forgets every voice, and re-registering one does **not** warm it — only synthesizing does. A boot that registers nothing leaves the façade answering 400 for every name, which is why `frank-tts-engine.container` carries
|
**1. The registry law → the unit warms at boot.** The voice registry is **memory only**: a restart forgets every voice, and re-registering one does **not** warm it — only synthesizing does. A boot that registers nothing leaves the façade answering 400 for every name, which is why `frank-tts-engine.container` carries
|
||||||
|
|
||||||
@@ -64,10 +58,12 @@ frank-tts-engine-warm: voice narrator1 cold=1402ms warm=1812ms
|
|||||||
frank-tts-engine-warm: 3 voice(s) registered and warm
|
frank-tts-engine-warm: 3 voice(s) registered and warm
|
||||||
```
|
```
|
||||||
|
|
||||||
**2. The thread law → nothing is ever pinned.** `tts-server` in this build has **no `-t`/`--threads` flag**: `src/backend.h` computes the CPU thread count as `std::thread::hardware_concurrency() / 2` (its comment: GEMM shares SIMD units across hyperthreads). Thread count therefore follows what the kernel *reports*, not what a cgroup *allows* — so `CPUQuota=`, `CPUAffinity=`, `taskset` or a slice silently changes the engine's GEMM tiling and its timings, with no log line. Nothing in this fleet pins this container. If a neighbour starves it, fix the neighbour.
|
**2. The thread law → nothing is ever pinned.** `tts-server` in this build has **no `-t`/`--threads` flag**: `src/backend.h` computes the CPU thread count as `std::thread::hardware_concurrency() / 2` (its comment: GEMM shares SIMD units across hyperthreads). Thread count therefore follows what the kernel *reports*, not what a cgroup *allows* — so `CPUQuota=`, `CPUAffinity=`, `taskset` or a slice silently changes the engine's pool sizes and its timings, with no log line. The rule did not retire with the iGPU cutover: the binary still sizes those pools from what the kernel says, whatever the device ends up doing with the matmuls. Nothing in this fleet pins this container. If a neighbour starves it, fix the neighbour.
|
||||||
|
|
||||||
**3. Streaming is not buffered.** At the same seed, `response_format=pcm` (chunked, codec chunks pushed as they decode) and `response_format=wav` (buffered) differ in **92.2 % of samples**, −41.6 dB RMS. Nothing may compare the two paths, cache one against the other, or assume a seed pins output across `response_format`. `frank-tts` always asks for `wav`; the warmer asks for `wav`; the test seam is forbidden from pinning either.
|
**3. Streaming is not buffered.** At the same seed, `response_format=pcm` (chunked, codec chunks pushed as they decode) and `response_format=wav` (buffered) differ in **92.2 % of samples**, −41.6 dB RMS. Nothing may compare the two paths, cache one against the other, or assume a seed pins output across `response_format`. `frank-tts` always asks for `wav`; the warmer asks for `wav`; the test seam is forbidden from pinning either.
|
||||||
|
|
||||||
|
**4. The device law → the card is shared, and the rollback is one line.** Synthesis computes on the gfx1151 **beside** [[frank-dragoon]], so a change to either tenant is a change to both. Two gates decide that pair, and both passed on 2026-10-19 with the other tenant live: the RADV heap a rootless container tenant is actually handed (not the ~2 GiB DRM carve-out), and dragoon's own first-token and decode rates with a synthesis in flight — unchanged. Their numbers, the recipe that measures them, and the full change surface are §5 of `report/tts-npu-spike-verdict-2026-10-19.md`; do not re-derive them here. What belongs on this page is the move: `QWENTTS_DEVICE=` (empty) in `scripts/frank-tts-engine.env`, re-deploy this one service, and synthesis is back on CPU — no rebuild, and dragoon never restarts.
|
||||||
|
|
||||||
## The voice registry contract
|
## The voice registry contract
|
||||||
|
|
||||||
A voice becomes known to the engine through `POST /v1/audio/voices`, and only these shapes are accepted:
|
A voice becomes known to the engine through `POST /v1/audio/voices`, and only these shapes are accepted:
|
||||||
@@ -97,9 +93,9 @@ The **façade** on 7772 is the pair's public surface and carries the probe. Note
|
|||||||
| `dankclaw/voiceservice/Containerfile.engine` | two-stage build of the pinned commit, proven cmake line, digest-pinned base, ships both scripts |
|
| `dankclaw/voiceservice/Containerfile.engine` | two-stage build of the pinned commit, proven cmake line, digest-pinned base, ships both scripts |
|
||||||
| `dankclaw/voiceservice/tts-engine-start.sh` | image entrypoint (`/app/start.sh`): env → flags, refuses to boot without weights |
|
| `dankclaw/voiceservice/tts-engine-start.sh` | image entrypoint (`/app/start.sh`): env → flags, refuses to boot without weights |
|
||||||
| `dankclaw/voiceservice/tts-engine-warm.sh` | boot warmer (`/app/warm-voices.sh`): register from `reference.wav` (body via a temp file), speak a fixed sentence twice, report cold/warm |
|
| `dankclaw/voiceservice/tts-engine-warm.sh` | boot warmer (`/app/warm-voices.sh`): register from `reference.wav` (body via a temp file), speak a fixed sentence twice, report cold/warm |
|
||||||
| `dankclaw/voiceservice/quadlet/frank-tts-engine.container` | the unit: bridge only, no publish, env file, two read-only mounts, health probe, warm hook, `Restart=always` |
|
| `dankclaw/voiceservice/quadlet/frank-tts-engine.container` | the unit: bridge only, no publish, env file, two read-only mounts, render access (`AddDevice=/dev/dri` + `GroupAdd=keep-groups`), health probe, warm hook, `Restart=always` |
|
||||||
| `dankclaw/voiceservice/quadlet/frank-tts-engine.network` | the private 10.89.5.0/24 bridge, with the subnet registry |
|
| `dankclaw/voiceservice/quadlet/frank-tts-engine.network` | the private 10.89.5.0/24 bridge, with the subnet registry |
|
||||||
| `scripts/frank-tts-engine.env` | paths and numbers only, with the thread law and the registry law in its header |
|
| `scripts/frank-tts-engine.env` | paths and numbers only, with the thread law, the registry law and the device law in its header |
|
||||||
| `scripts/download-frank-tts-engine-qwentts.sh` | weight fetcher: no resume, byte count + LFS oid check, `--verify-only` |
|
| `scripts/download-frank-tts-engine-qwentts.sh` | weight fetcher: no resume, byte count + LFS oid check, `--verify-only` |
|
||||||
| `scripts/deploy-remote.sh` → `deploy_frank_tts_engine` | weights gate → build → quadlet → restart → container health → warm |
|
| `scripts/deploy-remote.sh` → `deploy_frank_tts_engine` | weights gate → build → quadlet → restart → container health → warm |
|
||||||
| `tests/frank_tts_engine.bats` | the seam: generator output, entrypoint argv, warmer against a stub engine, planner and routing maps |
|
| `tests/frank_tts_engine.bats` | the seam: generator output, entrypoint argv, warmer against a stub engine, planner and routing maps |
|
||||||
@@ -118,6 +114,25 @@ still open.
|
|||||||
6. **Then the façade on 7772** (its own page), after the engine answered — that order is the whole point of step 6: publishing the façade in front of a dead engine would make every consumer fail at the first voice line.
|
6. **Then the façade on 7772** (its own page), after the engine answered — that order is the whole point of step 6: publishing the façade in front of a dead engine would make every consumer fail at the first voice line.
|
||||||
7. **Open:** [[Open Notebook]] is still not installed, so nothing renders a podcast yet; the voice leg it waits on now exists.
|
7. **Open:** [[Open Notebook]] is still not installed, so nothing renders a podcast yet; the voice leg it waits on now exists.
|
||||||
|
|
||||||
|
### 2026-10-19 — the iGPU cutover (PR #34, `6248f02`)
|
||||||
|
|
||||||
|
1. **Configure gate before touching anything** — the flag set, configured inside the
|
||||||
|
digest-pinned base on Dankclaw: `Found Vulkan: … found components: glslc` then
|
||||||
|
`Including Vulkan backend`. That probe is what caught `glslc` missing from
|
||||||
|
`glslang-tools`; the Containerfile's flag comment carries the finding.
|
||||||
|
2. **Deploy** — `./scripts/deploy.sh dankclaw --service frank-tts-engine`: image rebuild
|
||||||
|
(the `cfhash` moved), unit reinstall, health gate, warm pass
|
||||||
|
(`3 voice(s) registered and warm`), Playwright e2e 33/33.
|
||||||
|
3. **Prove the device, not the flag** — `sudo fuser -v /dev/dri/renderD129` lists
|
||||||
|
`tts-server` next to dragoon's `flash_serve`. Do this instead of reading the log: the
|
||||||
|
engine prints nothing about which backend it chose, so argv (`--device Vulkan0`) proves
|
||||||
|
intent and the render-node holder list proves use.
|
||||||
|
4. **Consumer path** — one `/v1/audio/speech` per voice through the façade on 7772; all
|
||||||
|
three answered with audio. The RTF figure in the Facts table comes from one engine-direct
|
||||||
|
WAV, where the duration is exact.
|
||||||
|
5. **Co-tenancy gate** — §5 of the verdict report: dragoon's first token and decode
|
||||||
|
unchanged with a 16.9 s synthesis occupying the card.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
| Symptom | Meaning | Move |
|
| Symptom | Meaning | Move |
|
||||||
@@ -131,3 +146,5 @@ still open.
|
|||||||
| `podman exec` in the deploy says `no such file or directory` for `/app/warm-voices.sh` | the image predates the warmer | re-deploy: since 2026-10-18 `build_compose_image` hashes every file the image `COPY`s, not only `Containerfile.engine`, so editing the warmer rebuilds it — see |
|
| `podman exec` in the deploy says `no such file or directory` for `/app/warm-voices.sh` | the image predates the warmer | re-deploy: since 2026-10-18 `build_compose_image` hashes every file the image `COPY`s, not only `Containerfile.engine`, so editing the warmer rebuilds it — see |
|
||||||
| The warm pass logs `registered, but the warm synthesis failed` for EVERY voice, while a hand-run `/app/warm-voices.sh` succeeds | `WARM_TEXT` arrived **with its quotes**. podman's `--env-file` does no shell parsing — it takes the literal remainder of the line — so the env-file reader got `"Warm up, one two three."` where `source` gives `Warm up, one two three.`; the quotes plus a backslash then make the synthesis body invalid JSON | the hook strips one matched pair and escapes what is left; prove the value with `podman exec frank-tts-engine env \| grep WARM_TEXT`. The seam pins both readers, because a test that only sources the env file cannot see this |
|
| The warm pass logs `registered, but the warm synthesis failed` for EVERY voice, while a hand-run `/app/warm-voices.sh` succeeds | `WARM_TEXT` arrived **with its quotes**. podman's `--env-file` does no shell parsing — it takes the literal remainder of the line — so the env-file reader got `"Warm up, one two three."` where `source` gives `Warm up, one two three.`; the quotes plus a backslash then make the synthesis body invalid JSON | the hook strips one matched pair and escapes what is left; prove the value with `podman exec frank-tts-engine env \| grep WARM_TEXT`. The seam pins both readers, because a test that only sources the env file cannot see this |
|
||||||
| A `502` for `/v1/voices` where the engine answers `200` on `/health` from the same boot | the engine restarted and its in-memory registry is empty again — `/health` is model-loaded, NOT voices-registered | re-run `podman exec frank-tts-engine /app/warm-voices.sh`; that is the same distinction the `frank-tts` healthcheck enforces |
|
| A `502` for `/v1/voices` where the engine answers `200` on `/health` from the same boot | the engine restarted and its in-memory registry is empty again — `/health` is model-loaded, NOT voices-registered | re-run `podman exec frank-tts-engine /app/warm-voices.sh`; that is the same distinction the `frank-tts` healthcheck enforces |
|
||||||
|
| Unit restarts every 10 s and the log ends on a **device** error *after* both GGUFs were read | the image has the Vulkan loader but no ICD, or the container has no render node — the device name then resolves to nothing | `podman exec frank-tts-engine ls /dev/dri` (it must see `renderD129`) and `podman exec frank-tts-engine dpkg -l \| grep -E 'mesa-vulkan\|libvulkan1'`; re-deploy to rebuild the image, or set `QWENTTS_DEVICE=` and re-deploy for the CPU shape |
|
||||||
|
| `frank-dragoon` slows while TTS speaks | the contention premise broke — a Mesa bump, a third GPU tenant, a bigger synthesis | `QWENTTS_DEVICE=` + re-deploy this service, then re-run the gate recipe in §5 of `report/tts-npu-spike-verdict-2026-10-19.md` before putting it back |
|
||||||
@@ -113,17 +113,18 @@ shows up as a failed synthesis, never as a down probe.
|
|||||||
|
|
||||||
## Where the engine computes
|
## Where the engine computes
|
||||||
|
|
||||||
CPU, and only CPU is compiled in: `Containerfile.engine` builds `qwentts.cpp` with
|
The **gfx1151 iGPU**, as a co-tenant beside `frank-dragoon`: the Vulkan build of
|
||||||
`-DGGML_VULKAN=OFF` written out explicitly, so the container carries `libggml-cpu` and no
|
`qwentts.cpp` with `--device Vulkan0`, and `/dev/dri` handed to the engine container. That is
|
||||||
other backend. The realistic accelerator is the gfx1151 iGPU behind that flag — plus
|
the shape since 2026-10-19. The flag, the device name, the render-node trap on this hybrid box
|
||||||
`/dev/dri` passthrough, the ComfyUI pattern — on the same payload and the same pinned
|
and the one-line CPU rollback are owned by [[Frank TTS Engine]] — read that page before
|
||||||
commit, and the intended shape is **co-tenancy**: the engine resident on the card beside
|
touching either tenant, because a change to one is a change to both. Co-tenancy was gated with
|
||||||
`frank-dragoon`, not a handover. Memory is not what decides that; shader contention is, and
|
`frank-dragoon` live on the card (its first token and decode rates unchanged with a synthesis
|
||||||
the census plus both gates are in `report/tts-npu-spike-verdict-2026-10-19.md` §5.
|
in flight); both gate recipes are §5 of `report/tts-npu-spike-verdict-2026-10-19.md`.
|
||||||
**The Strix Halo NPU is not a door at all**: XDNA2 executes only precompiled AIE
|
|
||||||
partition programs, and AMD's own Linux runtime opens `/dev/accel/accel0`, succeeds at the
|
**The Strix Halo NPU is not a door at all**: XDNA2 executes only precompiled AIE partition
|
||||||
ioctls, then declines this model family's graph without emitting a single log line. The
|
programs, and AMD's own Linux runtime opens `/dev/accel/accel0`, succeeds at the ioctls, then
|
||||||
measured record and the model-side contract live in `report/` at the repo root
|
declines this model family's graph without emitting a single log line. The measured record and
|
||||||
|
the model-side contract live in `report/` at the repo root
|
||||||
(`tts-npu-spike-verdict-2026-10-19.md`).
|
(`tts-npu-spike-verdict-2026-10-19.md`).
|
||||||
|
|
||||||
## Files
|
## Files
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
type: reference
|
type: reference
|
||||||
title: LLM Performance Diagnosis
|
title: LLM Performance Diagnosis
|
||||||
description: "Probing why a served model is slow: the flat-depth probe, offload duty-cycle arithmetic, and profiler attribution."
|
description: "Probing why a served model is slow: the flat-depth probe, offload duty-cycle arithmetic, and step-shape attribution."
|
||||||
tags: [performance, profiling, moe, pcie, prefix-cache, routing, telemetry]
|
tags: [performance, profiling, moe, pcie, prefix-cache, routing, telemetry]
|
||||||
timestamp: 2026-10-05T00:00:00-07:00
|
timestamp: 2026-10-19T00:00:00-07:00
|
||||||
---
|
---
|
||||||
|
|
||||||
# LLM Performance Diagnosis
|
# LLM Performance Diagnosis
|
||||||
@@ -213,9 +213,75 @@ function directly with synthetic bodies (stdlib-only policy module)
|
|||||||
conversation identity is the FIRST N KiB of prompt — a shorter tested prefix
|
conversation identity is the FIRST N KiB of prompt — a shorter tested prefix
|
||||||
hashes differently per turn and pinning silently never happens.
|
hashes differently per turn and pinning silently never happens.
|
||||||
|
|
||||||
|
## 9. Decode cadence under a prefill (the step-shape census)
|
||||||
|
|
||||||
|
"Decode turns to sludge the moment a long prompt arrives, then recovers" is not a
|
||||||
|
link or a gather story — on a chunked-prefill engine the unit of interference is
|
||||||
|
**the step**. A step that carries a prefill chunk takes the chunk's time, and every
|
||||||
|
decode row sharing that step waits that long for its next token. Chunk size is
|
||||||
|
`min(remaining, --checkpoint-interval, --max-num-batched-tokens)`, so on a hybrid
|
||||||
|
model the interval caps it before the budget does.
|
||||||
|
|
||||||
|
Census it without touching the model — the engine's own counters (`/stats`,
|
||||||
|
`/metrics`, cumulative since boot):
|
||||||
|
|
||||||
|
```
|
||||||
|
decode-only step = step_ns_decode / steps_decode
|
||||||
|
shared step = (step_ns - step_ns_decode) / (steps_prefill + steps_mixed)
|
||||||
|
```
|
||||||
|
|
||||||
|
Then bucket a day of `decode_tokens_per_second` by `prefill_tokens_per_second`
|
||||||
|
(Prometheus `query_range`, step 120 s) and **check the lag**: correlate decode with
|
||||||
|
prefill at lag 0 and again at 2-14 minutes. Lag-0-only ⇒ step-time contention, the
|
||||||
|
chunk is holding the device. A lagged tail ⇒ residency churn — the prefill's working
|
||||||
|
set evicted something decode needs (expert slab, KV) and decode pays after the
|
||||||
|
prefill is over. `preemptions` separates the third shape: a preempted-and-recomputed
|
||||||
|
sequence stops producing entirely and then re-prefills from token 0, which is a
|
||||||
|
stall, not sludge.
|
||||||
|
|
||||||
|
Knobs, in the order worth trying them (radiance GUIDE §4.5):
|
||||||
|
|
||||||
|
- `--prefill-interleave N` — after a chunk step taken beside decoders, the next N
|
||||||
|
steps carry decode rows only and admit nothing. Decoders keep their cadence; the
|
||||||
|
prompt pays that in TTFT. Counts as `engine_steps_held_total`.
|
||||||
|
- `--busy-prefill-chunk MODE` — the chunk's share of a step that has other work:
|
||||||
|
`auto` (default) reserves a row plus the draft window per decode row behind it and
|
||||||
|
an eighth of the budget per waiting prefill/request, `off` lets the chunk take the
|
||||||
|
whole step (admission never runs while it does), `N` pins the share. Never under
|
||||||
|
the prefill stager's smallest pass — the startup line names it, and below it every
|
||||||
|
routed layer reads its pooled experts synchronously, which costs the prefill far
|
||||||
|
more than sharing saves. Counts as `engine_prefill_chunks_capped_total`.
|
||||||
|
- `--max-num-batched-tokens` — the blunt rung, and the only one older pins have. The
|
||||||
|
vendor's curve on a 48-layer MoE at 200k on two cards: chunk 512 → 1750 t/s, 1024
|
||||||
|
→ 2200, 2048 → 2706 (a 185k prompt: 138 s against 91 s), so halving the stall
|
||||||
|
costs ~19 % of prefill. Raising it past the interval buys nothing and loses expert
|
||||||
|
residency to the arena.
|
||||||
|
- `--prefill-span N` — the inverse trade: a *lone* prefill carries N intervals a step
|
||||||
|
while every shared step is planned at a smaller shared budget, which on an
|
||||||
|
expert-tiered box lends that arena back to the expert slab. Vendor TP2
|
||||||
|
expert-tiered TTFT deltas vs a plain 2048 budget: −6.1 % at 2k, +2.3 % at 18k,
|
||||||
|
+49.1 % at 250k — long prompts only.
|
||||||
|
|
||||||
|
Two traps. **The arena/slab coupling makes a shared step doubly expensive on an
|
||||||
|
expert-tiered shape**: the full-plan arena takes VRAM the resident expert slab would
|
||||||
|
have had (320 MiB/card at TP2 for a 4096 budget), so the decode rows inside that step
|
||||||
|
also read experts over the link — a smaller shared budget helps twice. And **re-check
|
||||||
|
`prefix_hit_rate` / `prefix_evictions` after any chunk change**: the arena and the KV
|
||||||
|
pool are the same memory, and the failure looks like turn two taking as long as turn
|
||||||
|
one.
|
||||||
|
|
||||||
|
Availability is a version question, not a config question: `--busy-prefill-chunk` and
|
||||||
|
`--prefill-interleave` are absent from older pins — prove it on the running container
|
||||||
|
(`podman exec <c> <binary> --help | grep -iE "prefill|chunk"`), never from the vendored
|
||||||
|
tree, and check the source clone's depth before dating a flag from `git log -S`
|
||||||
|
(a `--depth 1` clone reports its own tip for every search).
|
||||||
|
|
||||||
|
Run on: [[frank-archon]] (radiance 1.0.13, TP2 `expert_tiered`, budget 2048 = interval
|
||||||
|
2048) — the measured census and the verdict for this fleet's shape are that page's.
|
||||||
|
|
||||||
## Related
|
## Related
|
||||||
|
|
||||||
- the window discipline and usage-counter law
|
- the window discipline and usage-counter law
|
||||||
- [[PCIe Link and Atomics]] — link probing and the streaming-vs-compute ceiling
|
- [[PCIe Link and Atomics]] — link probing and the streaming-vs-compute ceiling
|
||||||
- [[RDNA4 MoE Expert Offload VRAM Budget]] — the plan behind duty-cycle terms
|
- [[RDNA4 MoE Expert Offload VRAM Budget]] — the plan behind duty-cycle terms
|
||||||
- the compile fix for the pointwise-glue bound
|
- [[frank-archon]] — the endpoint where §9's step-shape census was run
|
||||||
@@ -239,6 +239,29 @@ vllm-radiance era (this table opens on 09-26; the era page claims 10-10).
|
|||||||
- **MNBT 2048.** 2560 collapses decode to 2.6-7.7 t/s (MTP resonance); the w4 file tier streams
|
- **MNBT 2048.** 2560 collapses decode to 2.6-7.7 t/s (MTP resonance); the w4 file tier streams
|
||||||
in place only at MNBT ≤ 2048 and the activation arena scales with the chunk (32768 → 33.3
|
in place only at MNBT ≤ 2048 and the activation arena scales with the chunk (32768 → 33.3
|
||||||
GiB, refused).
|
GiB, refused).
|
||||||
|
- **Decode pays for the chunk it shares a step with.** Census of the live engine
|
||||||
|
(radiance 1.0.13, `/stats` + `/metrics`, cumulative over the 2026-10-15 boot):
|
||||||
|
1,435,585 decode-only steps at **18.7 ms** each against 127,991 prefill+mixed steps
|
||||||
|
at **317 ms** — 60 % of engine wall-clock spent inside 8 % of the steps, because the
|
||||||
|
chunk is `min(remaining, checkpoint interval 2048, MNBT 2048)` = 2048 rows and every
|
||||||
|
decode row in that step waits the whole chunk. Day of Prometheus (120 s step, 721
|
||||||
|
samples): `decode_tokens_per_second` median **13.3 t/s** in the 56 % of samples where
|
||||||
|
`prefill_tokens_per_second` ≥ 1000, against 106-240 t/s in the light-prefill buckets;
|
||||||
|
bucketed by mean step time it is 128.7 t/s at 0.02-0.05 s steps and 12.0 t/s at
|
||||||
|
0.15-0.4 s. The stall is **during**, not after — decode in windows 2-14 min after a
|
||||||
|
busy-prefill window sits at the idle baseline (58-64 vs 77-85 t/s, the residual
|
||||||
|
confounded by co-scheduling), so no lingering expert-residency penalty at 2-minute
|
||||||
|
resolution, and `preemptions: 0` rules out preempt-and-re-prefill. Method:
|
||||||
|
[[LLM Performance Diagnosis]] §9.
|
||||||
|
- **The knobs for it are not in this pin.** `--busy-prefill-chunk` and
|
||||||
|
`--prefill-interleave` (radiance GUIDE §4.5 — a shared chunk's cap, and N decode-only
|
||||||
|
steps after each chunk) are absent from 1.0.13: proven on the running container
|
||||||
|
(`podman exec frank-archon radiance --help` prints no `prefill`/`chunk` flag), and the
|
||||||
|
2026-10-18 source tree carries both. The only crank this pin has is MNBT, and that is
|
||||||
|
an arm and not an edit: the vendor prices a 1024 chunk at −19 % prefill to halve the
|
||||||
|
stall, and this page's own MNBT law already knows 2560 collapses decode (MTP
|
||||||
|
resonance). An image bump is gated by the 1.2.0 numerics dead end below, so any try
|
||||||
|
re-scores draft acceptance before it is trusted.
|
||||||
- **Slots cost KV and rows, never speed.** `--max-num-seqs` carries no radiance constraint: it
|
- **Slots cost KV and rows, never speed.** `--max-num-seqs` carries no radiance constraint: it
|
||||||
adds 110 MiB of recurrent state per slot and declares the fused TP all-reduce over `seqs ×
|
adds 110 MiB of recurrent state per slot and declares the fused TP all-reduce over `seqs ×
|
||||||
(1 + spec)` rows, and `wht6` is bit-exact up to 25 rows (single-sequence decode and any step
|
(1 + spec)` rows, and `wht6` is bit-exact up to 25 rows (single-sequence decode and any step
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ the endpoint's **Eras** table, and the numbers a retired era measured are gone.
|
|||||||
| [[GGUF Compatibility]] | Answering whether an engine loads a GGUF from the file header alone, and pinning a fork build that can. |
|
| [[GGUF Compatibility]] | Answering whether an engine loads a GGUF from the file header alone, and pinning a fork build that can. |
|
||||||
| [[Heterogeneous Split Triage]] | Triage before splitting across unequal accelerators: link characterisation, real bottleneck, what placement never buys. |
|
| [[Heterogeneous Split Triage]] | Triage before splitting across unequal accelerators: link characterisation, real bottleneck, what placement never buys. |
|
||||||
| [[Llama Cpp Serving Sizing]] | Measurement-first sizing for llama.cpp shapes: slot pools against a headroom band, per-device accounting, prompt cache. |
|
| [[Llama Cpp Serving Sizing]] | Measurement-first sizing for llama.cpp shapes: slot pools against a headroom band, per-device accounting, prompt cache. |
|
||||||
| [[LLM Performance Diagnosis]] | Probing why a served model is slow: the flat-depth probe, offload duty-cycle arithmetic, and profiler attribution. |
|
| [[LLM Performance Diagnosis]] | Probing why a served model is slow: the flat-depth probe, offload duty-cycle arithmetic, and step-shape attribution. |
|
||||||
| [[Model Swap and Rollback]] | The model-swap discipline: fit preflight, fetch verification, build and flag checks, live validation, three-pin revert. |
|
| [[Model Swap and Rollback]] | The model-swap discipline: fit preflight, fetch verification, build and flag checks, live validation, three-pin revert. |
|
||||||
| [[PCIe Link and Atomics]] | Link probing, the streaming-versus-compute ceiling arithmetic, and the atomics wall that decides multi-GPU collectives. |
|
| [[PCIe Link and Atomics]] | Link probing, the streaming-versus-compute ceiling arithmetic, and the atomics wall that decides multi-GPU collectives. |
|
||||||
| [[Quantization by Hardware Architecture]] | This page maps LLM quantization formats to the GPU and CPU architectures that support them. |
|
| [[Quantization by Hardware Architecture]] | This page maps LLM quantization formats to the GPU and CPU architectures that support them. |
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ is a locator: one row, one clause, no numbers.
|
|||||||
| [[ComfyUI Qwen-Image Workflows]] | Proven Qwen-Image text-to-image workflows on Dankclaw: the recipes, the API call shape, and which models to add next. |
|
| [[ComfyUI Qwen-Image Workflows]] | Proven Qwen-Image text-to-image workflows on Dankclaw: the recipes, the API call shape, and which models to add next. |
|
||||||
| [[Dankclaw Stack]] | Service inventory and routing overview for the Dankclaw AI, development, and observability host. |
|
| [[Dankclaw Stack]] | Service inventory and routing overview for the Dankclaw AI, development, and observability host. |
|
||||||
| [[Frank TTS]] | The fleet's cloned-voice speech endpoint and the one voice surface consumers address; wired as the harness speech role. |
|
| [[Frank TTS]] | The fleet's cloned-voice speech endpoint and the one voice surface consumers address; wired as the harness speech role. |
|
||||||
| [[Frank TTS Engine]] | The engine behind the fleet's speech endpoint: its runtime, private bridge, and the surface it publishes. |
|
| [[Frank TTS Engine]] | The engine behind the fleet's speech endpoint: its Vulkan build on the iGPU, its private bridge, and what it publishes. |
|
||||||
| [[Gitea]] | Gitea deployment on Dankclaw with its web UI reverse-proxied by the canonical Caddy service. |
|
| [[Gitea]] | Gitea deployment on Dankclaw with its web UI reverse-proxied by the canonical Caddy service. |
|
||||||
| [[Gluetun]] | Gluetun is a lightweight VPN client container. |
|
| [[Gluetun]] | Gluetun is a lightweight VPN client container. |
|
||||||
| [[Hermes]] | Hermes is the self-improving AI agent from Nous Research. |
|
| [[Hermes]] | Hermes is the self-improving AI agent from Nous Research. |
|
||||||
@@ -154,7 +154,7 @@ is a locator: one row, one clause, no numbers.
|
|||||||
| [[GGUF Compatibility]] | Answering whether an engine loads a GGUF from the file header alone, and pinning a fork build that can. |
|
| [[GGUF Compatibility]] | Answering whether an engine loads a GGUF from the file header alone, and pinning a fork build that can. |
|
||||||
| [[Heterogeneous Split Triage]] | Triage before splitting across unequal accelerators: link characterisation, real bottleneck, what placement never buys. |
|
| [[Heterogeneous Split Triage]] | Triage before splitting across unequal accelerators: link characterisation, real bottleneck, what placement never buys. |
|
||||||
| [[Llama Cpp Serving Sizing]] | Measurement-first sizing for llama.cpp shapes: slot pools against a headroom band, per-device accounting, prompt cache. |
|
| [[Llama Cpp Serving Sizing]] | Measurement-first sizing for llama.cpp shapes: slot pools against a headroom band, per-device accounting, prompt cache. |
|
||||||
| [[LLM Performance Diagnosis]] | Probing why a served model is slow: the flat-depth probe, offload duty-cycle arithmetic, and profiler attribution. |
|
| [[LLM Performance Diagnosis]] | Probing why a served model is slow: the flat-depth probe, offload duty-cycle arithmetic, and step-shape attribution. |
|
||||||
| [[Model Swap and Rollback]] | The model-swap discipline: fit preflight, fetch verification, build and flag checks, live validation, three-pin revert. |
|
| [[Model Swap and Rollback]] | The model-swap discipline: fit preflight, fetch verification, build and flag checks, live validation, three-pin revert. |
|
||||||
| [[PCIe Link and Atomics]] | Link probing, the streaming-versus-compute ceiling arithmetic, and the atomics wall that decides multi-GPU collectives. |
|
| [[PCIe Link and Atomics]] | Link probing, the streaming-versus-compute ceiling arithmetic, and the atomics wall that decides multi-GPU collectives. |
|
||||||
| [[Quantization by Hardware Architecture]] | This page maps LLM quantization formats to the GPU and CPU architectures that support them. |
|
| [[Quantization by Hardware Architecture]] | This page maps LLM quantization formats to the GPU and CPU architectures that support them. |
|
||||||
|
|||||||
@@ -331,13 +331,40 @@ FAKE
|
|||||||
[ "$(argv --port)" = "8880" ]
|
[ "$(argv --port)" = "8880" ]
|
||||||
[ "$(argv --lang)" = "auto" ]
|
[ "$(argv --lang)" = "auto" ]
|
||||||
[ "$(argv --max-batch)" = "1" ]
|
[ "$(argv --max-batch)" = "1" ]
|
||||||
# The two flags that must never appear: there is no thread count to set (it
|
# The device the env names has to reach argv BY NAME: the image ships the
|
||||||
# comes from hardware_concurrency()/2), and naming a device on an image with
|
# Mesa ICD and no NVIDIA one, so Vulkan0 is the gfx1151 and cannot drift onto
|
||||||
# every GPU backend compiled out is only a new way to be wrong.
|
# another card the way an index would.
|
||||||
! grep -qx -- '--device' "$ARGS_FILE"
|
[ "$(argv --device)" = "Vulkan0" ]
|
||||||
|
# The flag that must never appear: there is no thread count to set in this
|
||||||
|
# build (it comes from hardware_concurrency()/2), so naming one would only
|
||||||
|
# disagree with what the binary sized its pools from.
|
||||||
! grep -qE -- '^--?t$|^--threads$' "$ARGS_FILE"
|
! grep -qE -- '^--?t$|^--threads$' "$ARGS_FILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "an empty device value is the CPU rollback: no --device reaches argv" {
|
||||||
|
# The same entrypoint with one key cleared, which is the rollback the env
|
||||||
|
# header documents. A script-level default that survived an explicitly empty
|
||||||
|
# value would leave the endpoint on the iGPU with no way back except a
|
||||||
|
# rebuild.
|
||||||
|
cat > "$TEST_TMP/fake-tts-server" <<'FAKE'
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
printf '%s\n' "$@" > "$ARGS_FILE"
|
||||||
|
FAKE
|
||||||
|
chmod +x "$TEST_TMP/fake-tts-server"
|
||||||
|
mkdir -p "$TEST_TMP/models"
|
||||||
|
: > "$TEST_TMP/models/$TALKER"
|
||||||
|
: > "$TEST_TMP/models/$CODEC"
|
||||||
|
export QWENTTS_MODEL="$TEST_TMP/models/$TALKER"
|
||||||
|
export QWENTTS_CODEC="$TEST_TMP/models/$CODEC"
|
||||||
|
export QWENTTS_BIN="$TEST_TMP/fake-tts-server"
|
||||||
|
export ARGS_FILE="$TEST_TMP/argv.txt"
|
||||||
|
export QWENTTS_DEVICE=""
|
||||||
|
|
||||||
|
run bash "$START"
|
||||||
|
[ "$status" -eq 0 ] || { echo "$output"; false; }
|
||||||
|
! grep -qx -- '--device' "$ARGS_FILE"
|
||||||
|
}
|
||||||
|
|
||||||
@test "missing weights are a refusal that names the fetcher, before the port is bound" {
|
@test "missing weights are a refusal that names the fetcher, before the port is bound" {
|
||||||
cat > "$TEST_TMP/fake-tts-server" <<'FAKE'
|
cat > "$TEST_TMP/fake-tts-server" <<'FAKE'
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
@@ -627,17 +654,23 @@ PY
|
|||||||
@test "the image build is the pinned commit with the proven cmake line" {
|
@test "the image build is the pinned commit with the proven cmake line" {
|
||||||
# GGML_BLAS=OFF is forced by the host (libopenblas.so.0 present, no dev
|
# GGML_BLAS=OFF is forced by the host (libopenblas.so.0 present, no dev
|
||||||
# headers) and upstream's own Dockerfile passes it ON, so this file is not a
|
# headers) and upstream's own Dockerfile passes it ON, so this file is not a
|
||||||
# copy of upstream on purpose. -j 8 and the OFF-for-every-GPU-backend list
|
# copy of upstream on purpose. -j 8 is what the 2026-10-18 trial ran;
|
||||||
# are what the 2026-10-18 trial ran.
|
# GGML_VULKAN=ON is the 2026-10-19 iGPU cutover, and the two greps below are
|
||||||
|
# the packages that door needs at build time and at run time.
|
||||||
grep -qE '^ARG QWENTTS_COMMIT=[0-9a-f]{40}$' "$CF"
|
grep -qE '^ARG QWENTTS_COMMIT=[0-9a-f]{40}$' "$CF"
|
||||||
grep -qF '5916bf7c79dbb4e66fc059cdc507a79a23a28bb4' "$CF"
|
grep -qF '5916bf7c79dbb4e66fc059cdc507a79a23a28bb4' "$CF"
|
||||||
grep -qE 'git -C /src checkout --detach' "$CF"
|
grep -qE 'git -C /src checkout --detach' "$CF"
|
||||||
grep -qE 'submodule update --init' "$CF" # ggml is a submodule; without it the build cannot configure
|
grep -qE 'submodule update --init' "$CF" # ggml is a submodule; without it the build cannot configure
|
||||||
for flag in -DGGML_CCACHE=OFF -DGGML_BACKEND_DL=OFF -DGGML_CPU_ALL_VARIANTS=OFF \
|
for flag in -DGGML_CCACHE=OFF -DGGML_BACKEND_DL=OFF -DGGML_CPU_ALL_VARIANTS=OFF \
|
||||||
-DGGML_OPENMP=ON -DGGML_BLAS=OFF -DGGML_CUDA=OFF -DGGML_HIP=OFF \
|
-DGGML_OPENMP=ON -DGGML_BLAS=OFF -DGGML_CUDA=OFF -DGGML_HIP=OFF \
|
||||||
-DGGML_VULKAN=OFF -DGGML_METAL=OFF -DGGML_SYCL=OFF -DGGML_RPC=OFF; do
|
-DGGML_VULKAN=ON -DGGML_METAL=OFF -DGGML_SYCL=OFF -DGGML_RPC=OFF; do
|
||||||
grep -qF -- "$flag" "$CF" || { echo "build line lost $flag"; false; }
|
grep -qF -- "$flag" "$CF" || { echo "build line lost $flag"; false; }
|
||||||
done
|
done
|
||||||
|
# glslc is not in glslang-tools on this distro, and the configure fails
|
||||||
|
# without it; an image with the loader and no RADV ICD enumerates zero
|
||||||
|
# devices and dies in device lookup after the weights load.
|
||||||
|
grep -qE 'libvulkan-dev glslc spirv-headers' "$CF"
|
||||||
|
grep -qE 'libvulkan1 mesa-vulkan-drivers' "$CF"
|
||||||
grep -qE 'cmake --build build -j 8' "$CF"
|
grep -qE 'cmake --build build -j 8' "$CF"
|
||||||
# OpenMP on means the runtime stage needs the OpenMP runtime, and the probe
|
# OpenMP on means the runtime stage needs the OpenMP runtime, and the probe
|
||||||
# runs as /bin/sh -c, so the runtime stage needs curl.
|
# runs as /bin/sh -c, so the runtime stage needs curl.
|
||||||
|
|||||||
Reference in new issue
Block a user