Skip to content

feat(llama-swap-strix): llama-swap with the Strix Halo q8_0-KV FA patch (#25494) - #2883

Merged
fastlorenzo merged 1 commit into
mainfrom
feat/llama-swap-strix
Aug 11, 2026
Merged

fastlorenzo merged 1 commit into
mainfrom
feat/llama-swap-strix

Conversation

@fastlorenzo

Copy link
Copy Markdown
Owner

What

New app llama-swap-strix: llama-swap carrying ggml-org/llama.cpp#25494 (unmerged) — dequant q8_0 KV once in the Vulkan coopmat1 flash-attention path instead of once per workgroup. That is the exact configuration every generative route on ai-box (Strix Halo / gfx1151) runs: kv: q8_0 + -fa 1.

Author-reported on a Qwen3-MoE-30B-A3B with q8_0 KV (≈ ai-box's coder route):

pp512 @32k pp512 @65k tg32 @32k tg32 @65k
stock 200.2 t/s 99.1 t/s 36.71 26.27
patched 282.0 166.2 36.73 27.50

Greedy output byte-identical; cost is a scratch buffer that scales with KV size (~268 MB @128k).

How

Two build stages reproduce upstream llama.cpp's own .devops/vulkan.Dockerfile (same base, packages, cmake flags, plus the embedded web UI), applying patches/*.patch to the checked-out release tag first, then graft the patched llama-server and the ggml backend .sos onto the stock llama-swap image ai-box already runs.

  • The Vulkan FA code is in libggml-vulkan.so, not the binary — a binary-only copy would build, run, and benchmark as a null result. container_test.go asserts the libs are present and patches-applied.txt is non-empty.
  • Grafting onto the same BASE_IMAGE keeps the eventual A/B (ai-bench sweep coder-fa-patch on ai-box) to one variable.
  • The PR's tests/test-backend-ops.cpp hunk is dropped (doesn't apply to b10331; built with LLAMA_BUILD_TESTS=OFF).

Notes for review

  • VERSION (llama.cpp tag) and BASE_IMAGE (the llama-swap build from that same tag) must move together. Renovate is disabled for this app in .renovaterc.json5 so a bot can't bump one alone and silently invalidate every benchmark.
  • amd64 only — this exists for one gfx1151 APU.
  • Temporary: delete this app when #25494 merges upstream.

Local checks: hadolint clean, go vet ./apps/llama-swap-strix/..., docker buildx bake --print. The image has not been built end-to-end yet — first CI build is the real test (npm ci for the web UI stage, and whether a full Vulkan compile fits the runner).

🤖 Generated with Claude Code

llama-swap carrying ggml-org/llama.cpp#25494 (unmerged): dequant q8_0 KV once in
the Vulkan coopmat1 flash-attention path instead of once per workgroup — the
exact configuration ai-box's generative routes run (kv: q8_0 + -fa 1 on
gfx1151). Author-reported on a 30B-A3B MoE with q8_0 KV: pp512 @32k 200->282 t/s,
@65k 99->166 t/s, decode flat, greedy output byte-identical.

Two build stages reproduce upstream llama.cpp's own .devops/vulkan.Dockerfile
(same base, packages, cmake flags, plus the embedded web UI), applying
patches/*.patch to the checked-out release tag first, then graft the patched
llama-server AND the ggml backend .so files onto the stock llama-swap image
ai-box already runs — the Vulkan FA code is in libggml-vulkan.so, not the
binary, so a binary-only copy would benchmark as a null result. Grafting onto
the same base keeps the A/B one variable.

VERSION (llama.cpp tag) and BASE_IMAGE (the llama-swap build from that same tag)
must move together; renovate is disabled for this app so a bot cannot bump one
alone. amd64 only — one gfx1151 APU. Delete this app when #25494 merges upstream.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@fastlorenzo
fastlorenzo force-pushed the feat/llama-swap-strix branch from f20a44e to 6e56fa4 Compare August 9, 2026 19:20
@fastlorenzo
fastlorenzo merged commit 1a1267e into main Aug 11, 2026
12 checks passed
@fastlorenzo
fastlorenzo deleted the feat/llama-swap-strix branch August 11, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant