Date: 2026-08-01
Host: AMD Ryzen 7 5800H + Radeon Graphics (gfx90c / RADV RENOIR), ~12 GiB system RAM
Builds (llama.cpp 0005475):
- TheRock HIP:
build-work/llama.cpp/build-therock(GGML_HIP=ON,GPU_TARGETS=gfx90c,GGML_HIP_GRAPHS=OFF) — broken compute - Mesa Vulkan:
build-work/llama.cpp/build-vulkan(GGML_VULKAN=ON,GGML_HIP=OFF) — working
Helpers: utils/bench-gpu.sh (HIP), utils/bench-vulkan.sh (Vulkan/RADV)
| Model | Source | File | On-disk size |
|---|---|---|---|
| Gemma 4 E2B IT QAT Q4_0 | google/gemma-4-E2B-it-qat-q4_0-gguf |
gemma-4-E2B_q4_0-it.gguf |
3.10 GiB (4.63B params reported) |
| Gemma 4 E4B IT QAT Q4_0 | google/gemma-4-E4B-it-qat-q4_0-gguf |
gemma-4-E4B_q4_0-it.gguf |
4.79 GiB (7.46B params reported) |
| Qwen3.6 35B-A3B MoE IQ2_M | HauhauCS/Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive |
...-IQ2_M.gguf |
10.85 GiB (34.66B total / ~3B active) |
| Baseline | local | Qwen3-0.6B-Q4_0.gguf |
359 MiB |
GGUF weights live under build-work/ (not committed).
Device:
ggml_vulkan: 0 = AMD Radeon Graphics (RADV RENOIR) (radv) | uma: 1 | fp16: 1 | warp size: 64
Available devices:
Vulkan0: AMD Radeon Graphics (RADV RENOIR) (~8700 MiB reported)
llama-bench: -ngl 99 -t 1 -fa off -b 512 -ub 512 -r 2 (helper: utils/bench-vulkan.sh).
| Model | backend | ngl | pp128 t/s | tg64 t/s |
|---|---|---|---|---|
| Qwen3 0.6B Q4_0 | Vulkan | 99 | 1083.44 ± 12.26 | 88.75 ± 0.26 |
| Gemma 4 E2B Q4_0 | Vulkan | 99 | 312.56 ± 7.30 | 26.15 ± 0.02 |
| Gemma 4 E4B Q4_0 | Vulkan | 99 | 156.73 ± 1.46 | 12.84 ± 0.02 |
E2B Vulkan smoke (llama-completion -ngl 99 --jinja -no-cnv): load ~1.3 s; short prompt completes.
Best GPU fit on this host: Gemma 4 E2B on Vulkan/RADV (~26 tg t/s, ~2x decode vs E4B, fits UMA comfortably).
Device enumeration works; GPU compute fails.
ggml_cuda_init: found 1 ROCm devices (Total VRAM: 6652 MiB):
Device 0: AMD Radeon Graphics, gfx90c (0x90c), VMM: no, Wave Size: 64
Available devices:
ROCm0: AMD Radeon Graphics (6652 MiB, ...)
Observed with HIP visible (-ngl > 0):
ROCm error: unspecified launch failureonMUL_MAT(also afterGGML_HIP_GRAPHS=OFF).utils/bench-gpu.shaborts on warmup prompt; some runs stall until hard timeout.- Repeated failures can wedge the GPU (
gpu_busy_percentstuck at 99%, dmesgqcm fence wait loop timeout/device wedged) until reboot.
gfx90c is outside this repo's published HIP targets. Prefer Vulkan here; use HIP on listed dGPU/APU targets (gfx110X / gfx1151 / ...).
Recover after a HIP hang:
sudo build-work/rocm/bin/amd-smi reset -G -g 0CPU reference (HIP hidden)
Useful when comparing backends; not the recommended deploy path once Vulkan works.
| Model | pp | tg |
|---|---|---|
E2B (pp64/tg32) |
11.30 | 8.48 |
E4B (pp64/tg32) |
5.59 | 4.40 |
Qwen3-0.6B (pp32/tg16) |
41.44 | 28.11 |
Qwen3.6-35B-A3B IQ2_M (pp32/tg16) |
3.73 | 3.21 |
MoE IQ2_M: mmap CPU smoke only; too large for useful GPU offload on this UMA budget.
- Primary (this host): Gemma 4 E2B QAT Q4_0 via Vulkan (
build-vulkan,utils/bench-vulkan.sh). - Secondary: E4B Vulkan if quality > speed (~13 tg t/s).
- ROCm/Lemonade production: supported GPU targets +
utils/bench-gpu.sh; do not rely on Renoir HIP today. - MoE demo: Qwen3.6-35B-A3B IQ2_M on CPU mmap only here.
- PLE (Per-Layer Embeddings) on E2B/E4B: large embedding tables, cheap lookups; "effective" params much smaller than total with embeddings. Keep QAT GGUFs; avoid re-quantizing blindly.
- Hybrid attention: sliding-window local layers interleaved with global layers (p-RoPE / unified KV on globals).
- QAT Q4_0: prefer Google's official QAT GGUF over post-hoc Q4 when available.
- MoE 26B A4B: ~25B total / ~3.8B active, 8-of-128 experts + shared MLP (llama.cpp
gemma4MoE path). Needs RAM/VRAM for all experts. - MTP / assistant draught + speculative decoding: matching QAT draught models on stronger GPUs.
- Multimodal: mmproj for vision/audio on E2B/E4B — optional follow-up on Vulkan.
- Sparse MoE (
qwen35moe): ~35B total / ~3B active — memory still tracks total weights. - IQ2_M: only near-fit quant on 12 GiB; higher K_P quants need much more RAM.
- Jinja chat template required (
--jinja).
- Vulkan:
utils/bench-vulkan.sh(-ngl 99); keep TheRock out ofLD_LIBRARY_PATH. - HIP (supported GPUs):
utils/bench-gpu.sh; considerGGML_HIP_GRAPHS=OFFif launch failures appear. - Try
-fa onafter validating flash-attn for the backend/GPU.
# Build (once)
cmake -S build-work/llama.cpp -B build-work/llama.cpp/build-vulkan -G Ninja \
-DCMAKE_BUILD_TYPE=Release -DGGML_VULKAN=ON -DGGML_HIP=OFF
cmake --build build-work/llama.cpp/build-vulkan -j"$(nproc)" --target llama-bench llama-completion
# Bench
BENCH_MODEL=$PWD/build-work/gemma-4-E2B_q4_0-it.gguf ./utils/bench-vulkan.sh| Goal | Pick |
|---|---|
| Edge GPU on this gfx90c host | Gemma 4 E2B QAT Q4_0 + Vulkan/RADV (~26 tg t/s) |
| Stronger edge, still local | Gemma 4 E4B QAT Q4_0 + Vulkan (~13 tg t/s) |
| MoE mechanics demo | Qwen3.6-35B-A3B IQ2_M (CPU mmap) |
| ROCm HIP on this iGPU | Blocked — use supported GPU targets instead |
Served with serve-gemma4-e2b.sh (default profile: --jinja, 131072 ctx,
SERV_SPEC=ngram-map-k,ngram-cache) on 127.0.0.1:8081 and used as a real agent — not just a
synthetic get_weather probe — against a live company knowledge base (hybrid vector+FTS search
behind an OpenAI-compatible brain_search tool).
Flow exercised end-to-end:
- system+user → model emits a well-formed
tool_calls(brain_search {"q":"oo CLI usage and environment variables"}) plus coherentreasoning_content - tool result fed back → grounded natural-language answer, correctly citing the retrieved doc
(
ONLYOFFICE_URL/ONLYOFFICE_USER/ONLYOFFICE_PASSWORD) - write→read loop: a fact ingested minutes earlier via the KB's MCP server was found and used by the agent without restart
Measured agent-turn rates (chat completions incl. jinja template + reasoning + JSON tool syntax,
so lower than raw tg64 bench):
| Turn | prompt tok | gen tok | secs | gen t/s |
|---|---|---|---|---|
| decide + emit tool call | 95 | 81 | 6.5 | 12.5 |
| grounded answer from result | 205 | 225 | 14.0 | 16.1 |
Verdict: Gemma 4 E2B QAT Q4_0 on gfx90c/Vulkan is genuinely usable as a local ops-agent at ~26 t/s raw decode (~12–16 t/s per agent turn), with reliable tool-call emission at temp 0.2.