This is a llama.cpp laboratory for one machine class: AMD Strix Halo (Ryzen AI MAX+ 395, 128 GB unified memory) — the owl above is Strix Lean, this lab's mascot. The headline is the qwen4exp line — Qwen3.8-Flash-Next, the 180B-class hybrid mixing gated-deltanet linear attention, 4-stream low-rank hyper-connections and a 51B-parameter PLE n-gram table. Our ROCmFP4 quant of it is 98.5 GiB and, with --ple-disk, runs on the same 128 GB machine with ~36 GB of RAM to spare: the PLE table is never loaded — its blocks are read on demand straight from the GGUF on disk, the output stays char-identical, and warm token generation costs ~3%.
Around that model runs a small production stack, every piece of it measured on this hardware: one llama-server holding two speculative drafters — the target's built-in MTP (multi-token prediction) layer and an external DFlash2 block-diffusion drafter — with routing that picks the drafter that fits each request; vision input working together with MTP speculation; a reasoning budget with a warn window at 75% instead of a hard cliff; and, behind all of it, the full ROCmFP4-STRIX_LEAN quantization pipeline (imatrix → quantize → sanitize → publish).
We are an unofficial community lab, not a vendor. We publish the measurements, the scripts and the patches — and the NO-GOs with the same care as the wins.
Everything here is a thin layer on top of ggml-org/llama.cpp and charlie12345's ROCmFPX fork — see the Credits at the end.
Full transparency:
docs/experiments/.Each line below is one measured claim; nothing is merged or projected.
--ple-disk, ~36 GB of RAM stays free (see intro); output is char-identical, warm tg (token generation) costs ~3%.--cache-disk-persist keeps an antirez-ds4-inspired prompt-cache library on disk across restarts: a 107k-token context restores in 1.57 s — end-to-end 14.3 s vs the measured 920 s cold re-prefill (64×) — deterministically. With the MTP drafter the restore needs a token-exact boundary: raw verbatim replays restore, chat-template history replays silently do not. In production since 2026-09-01.--mmproj plus the MTP drafter in one server; draft acceptance measured on a vision request: 98.3% cumulative.docs/guide/, raw notes and data in docs/experiments/.The quants listed under Model weights load on ggml-org/llama.cpp builds only where upstream supports
their tensor types — several of the features below exist only in our lab build.
Arriving from a model card: that "our lab build" recommendation is this repo —
build it from rocmfpx/ or the Vulkan
Dockerfile, then try the feature with
the model it was measured on. Full flag recipes (secondary flags, defaults,
commands) live in the Feature guide below.
| Feature | Flag | What it buys | Try it with | Docs |
|---|---|---|---|---|
| PLE disk-offload | --ple-disk | ~36 GB RAM back, char-identical output | Qwen3.8-Flash-Next | guide |
| Persistent prompt cache | --cache-disk-persist | restarts stop costing a re-prefill (64× measured) | any model | guide |
| Per-request dual-drafter routing | --spec-type draft-mtp,draft-dflash | +19% agentic (measured on the 27B), prose unchanged | Qwen3.8-27B | replication guide |
| External MTP drafter | -md <mtp.gguf> | +108/127% deterministic decode | Qwen3.8-Flash-Next | note |
| Reasoning-budget warn window | --reasoning-budget | budgets converge instead of exhausting | any model | note |
| qwen4exp arch + vision×MTP | — | the whole Flash-Next family, vision and drafter together | Qwen3.8-Flash-Next | note |
| Graph reuse + dense decode | — | plain tg512 +18.6% HIP / +32.5% Vulkan, identical outputs | Qwen3.8-Flash-Next | note |
| Boundary save guard | — | partial-reject final rounds stop costing a full re-prefill (0 skipped saves over 479 resets) | any model with a drafter | note |
This lab's measurements, scripts and write-ups are a human + AI collaboration. The AI collaborator did real engineering work — porting, instrumentation, gate design, prose — under human direction and human review. If that collaborator must be cited by name, it is GLM by z.ai — under that name only, never any other.
Production-proven for us (our daily-driver agent server):
--ple-disk) — on a real always-on agent server since 2026-08-31; rolling back is a matter of turning the flag off.--cache-disk-persist) — on the same server since 2026-09-01; a restart now restores served context from the on-disk library instead of re-prefilling it.Experimental or closed:
docs/experiments/README.md — narrative index over every experiment note and its raw data.docs/guide/qwen38-27b.md — canonical end-to-end replication guide: BF16 GGUF → imatrix → ROCmFP4-STRIX_LEAN quant → sanitized GGUF → dual-drafter server.docs/guide/qwen38-flash-next-ple-disk.md — running Qwen3.8-Flash-Next on 128 GB: the PLE disk-offload flags, cache budget and measured cost.docs/guide/qwen38-flash-next-prompt-cache-disk.md — the persistent prompt cache: flags, the verbatim-replay requirement, monitoring and rollback.PATCHES.md — index of every patch series in patches/, with upstream status.docs/experiments/qwen38-flash-next-runtime.md.No weights live in this repo — our quants are on Hugging Face under their own licenses:
| Model | HF repo | Notes |
|---|---|---|
| Qwen3.8-Flash-Next (qwen4exp) | pugant/Qwen3.8-Flash-Next-Q4_0_ROCMFP4_STRIX_LEAN-GGUF | 180B-class hybrid (6B active + 51B PLE), 98.5 GiB — the flagship; pairs with the external MTP drafter; --ple-disk fits it in 128 GB |
| Qwen3.8-27B (dense) | pugant/Qwen3.8-27B-MTP-Q4_0_ROCMFP4_STRIX_LEAN | 13.8 GiB — the lab's canonical model, MTP layer included |
| Qwen3.8-27B imatrix | pugant/Qwen3.8-27B-imatrix | the importance matrix behind the preset above |
| Qwen3.8-27B Q3_0 | pugant/Qwen3.8-27B-MTP-Q3_0_ROCMFPX | documented NO-GO quant — not a true 3-bit on this hybrid arch (4.44/5.72 effective bpw, no byte savings), tg (token generation) costs 15.6% on the base preset, 31.7% on the agent-tuned preset |
| grug-35b-v2 | pugant/grug-35b-v2-ROCmFP4-STRIX_LEAN | MoE 35B-A3B, reasoning/tool-call fine-tune |
| Ornith-1.0-35B | pugant/Ornith-1.0-35B-ROCmFP4-STRIX_LEAN | MoE 35B-A3B, multimodal |
| Ornith-1.5-35B | pugant/Ornith-1.5-35B-ROCmFP4-STRIX_LEAN | MoE 35B-A3B, multimodal — MTP head degraded by the fine-tune (pos-2 acceptance ~0.07): speculative decoding not recommended |
| Nemotron-3.5-Lightning-30B-A3B | pugant/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-ROCmFP4-STRIX_LEAN | Mamba-hybrid MoE |
| Qwen3.6-35B-A3B | pugant/Qwen3.6-35B-A3B-MTP-Q6_0_ROCMFPX | MoE 35B-A3B at Q6_0 |
Most community Strix Halo GGUFs run unmodified; support beyond llama.cpp upstream (niche quant types, hybrid architectures) depends on the fork — the ROCmFP4-STRIX_LEAN preset itself was born in that community.
The engine ships as source, not binaries: the full buildable fork tree is rocmfpx/. Fastest path is the local-source Vulkan Dockerfile (companion files come from kyuz0's toolboxes, $TB = your checkout of them):
mkdir -p /tmp/vkctx/src
git archive HEAD rocmfpx | tar -x --strip-components=1 -C /tmp/vkctx/src # the fork source, no clone needed
cp "$TB"/toolboxes/{llama-grammar.patch,gguf-vram-estimator.py} /tmp/vkctx/ # required by the image
cp docker/Dockerfile.vulkan-rocmfpx-local /tmp/vkctx/Dockerfile
docker build -t docker-llm-service:vulkan-fork /tmp/vkctx
For ROCm/HIP use docker/Dockerfile.rocm-7.2.4-rocmfpx (builds from a remote branch). Remember: HIP containers need /dev/kfd and /dev/dri — without /dev/kfd, ROCm init fails silently and the server falls back to CPU.
--spec-type draft-mtp,draft-dflash plus --spec-draft-model <dflash.gguf>, --spec-draft-n-max 7, --spec-draft-p-min 0.75; requests carrying tools are routed to DFlash2, the rest to MTP, with a per-request "spec_drafter" override. Full recipe in the replication guide (docs/guide/qwen38-27b.md).--ple-disk keeps the PLE n-gram table on disk (--ple-cache-mib N sets the block-cache budget, default 4096); guide with the measured cost: docs/guide/qwen38-flash-next-ple-disk.md.--cache-disk <dir> plus --cache-disk-persist (--cache-disk-persist-mib budget, default 16384) keeps the prompt-cache library across restarts; guide with the token-exact boundary caveat: docs/guide/qwen38-flash-next-prompt-cache-disk.md.--reasoning-budget N server-wide or thinking_budget_tokens per request; at 75% of the budget a mid-conversation message nudges the model to converge, and the forced end fires only if it ignores it.Minimal smoke test (image from the Build section above, LEAN model from Model weights):
docker run -d --name owl --network host --device /dev/dri --group-add render \
-v ~/llmodels:/llmodels:ro --entrypoint llama-server docker-llm-service:vulkan-fork \
-m /llmodels/Qwen3.8-Flash-Next-Q4_0_ROCMFP4_STRIX_LEAN.gguf \
-ngl 999 --jinja -c 16384 --no-mmap --ple-disk --metrics --port 1234
curl http://localhost:1234/v1/chat/completions -H 'Content-Type: application/json' \
-d '{"messages":[{"role":"user","content":"Who is Strix Lean?"}]}'
This lab adds a thin layer on top of giants' work.
Q4_0_ROCMFP4_STRIX_LEAN preset, the HIP kernels and the GGUF extensions live. Most of the code this lab builds upon — and merges upstream (PRs #67–#82, ours among them) — is their work.amd-strix-halo-toolboxes / docker-llm-service containers this lab builds and runs on.--ple-disk), and his ds4_kvstore — the cross-restart on-disk library
with hit-decay eviction (6 h half-life) and little-endian sidecar records — which our
persistent prompt cache (--cache-disk-persist) is modeled on.If we forgot anyone: it is an omission, not intentional — open an issue and we will credit you.
12 commits
C++
56.1%
C
13.3%
Python
8.6%
Cuda
5.9%
TypeScript
2.8%
HTML
2.4%
Shell
1.9%
Svelte
1.9%
Metal
1.4%
GLSL
1.3%
Jinja
1.2%
This is a llama.cpp laboratory for one machine class: AMD Strix Halo (Ryzen AI MAX+ 395, 128 GB unified memory) — the owl above is Strix Lean, this lab's mascot. The headline is the qwen4exp line — Qwen3.8-Flash-Next, the 180B-class hybrid mixing gated-deltanet linear attention, 4-stream low-rank hyper-connections and a 51B-parameter PLE n-gram table. Our ROCmFP4 quant of it is 98.5 GiB and, with --ple-disk, runs on the same 128 GB machine with ~36 GB of RAM to spare: the PLE table is never loaded — its blocks are read on demand straight from the GGUF on disk, the output stays char-identical, and warm token generation costs ~3%.
Around that model runs a small production stack, every piece of it measured on this hardware: one llama-server holding two speculative drafters — the target's built-in MTP (multi-token prediction) layer and an external DFlash2 block-diffusion drafter — with routing that picks the drafter that fits each request; vision input working together with MTP speculation; a reasoning budget with a warn window at 75% instead of a hard cliff; and, behind all of it, the full ROCmFP4-STRIX_LEAN quantization pipeline (imatrix → quantize → sanitize → publish).
We are an unofficial community lab, not a vendor. We publish the measurements, the scripts and the patches — and the NO-GOs with the same care as the wins.
Everything here is a thin layer on top of ggml-org/llama.cpp and charlie12345's ROCmFPX fork — see the Credits at the end.
Full transparency:
docs/experiments/.Each line below is one measured claim; nothing is merged or projected.
--ple-disk, ~36 GB of RAM stays free (see intro); output is char-identical, warm tg (token generation) costs ~3%.--cache-disk-persist keeps an antirez-ds4-inspired prompt-cache library on disk across restarts: a 107k-token context restores in 1.57 s — end-to-end 14.3 s vs the measured 920 s cold re-prefill (64×) — deterministically. With the MTP drafter the restore needs a token-exact boundary: raw verbatim replays restore, chat-template history replays silently do not. In production since 2026-09-01.--mmproj plus the MTP drafter in one server; draft acceptance measured on a vision request: 98.3% cumulative.docs/guide/, raw notes and data in docs/experiments/.The quants listed under Model weights load on ggml-org/llama.cpp builds only where upstream supports
their tensor types — several of the features below exist only in our lab build.
Arriving from a model card: that "our lab build" recommendation is this repo —
build it from rocmfpx/ or the Vulkan
Dockerfile, then try the feature with
the model it was measured on. Full flag recipes (secondary flags, defaults,
commands) live in the Feature guide below.
| Feature | Flag | What it buys | Try it with | Docs |
|---|---|---|---|---|
| PLE disk-offload | --ple-disk | ~36 GB RAM back, char-identical output | Qwen3.8-Flash-Next | guide |
| Persistent prompt cache | --cache-disk-persist | restarts stop costing a re-prefill (64× measured) | any model | guide |
| Per-request dual-drafter routing | --spec-type draft-mtp,draft-dflash | +19% agentic (measured on the 27B), prose unchanged | Qwen3.8-27B | replication guide |
| External MTP drafter | -md <mtp.gguf> | +108/127% deterministic decode | Qwen3.8-Flash-Next | note |
| Reasoning-budget warn window | --reasoning-budget | budgets converge instead of exhausting | any model | note |
| qwen4exp arch + vision×MTP | — | the whole Flash-Next family, vision and drafter together | Qwen3.8-Flash-Next | note |
| Graph reuse + dense decode | — | plain tg512 +18.6% HIP / +32.5% Vulkan, identical outputs | Qwen3.8-Flash-Next | note |
| Boundary save guard | — | partial-reject final rounds stop costing a full re-prefill (0 skipped saves over 479 resets) | any model with a drafter | note |
This lab's measurements, scripts and write-ups are a human + AI collaboration. The AI collaborator did real engineering work — porting, instrumentation, gate design, prose — under human direction and human review. If that collaborator must be cited by name, it is GLM by z.ai — under that name only, never any other.
Production-proven for us (our daily-driver agent server):
--ple-disk) — on a real always-on agent server since 2026-08-31; rolling back is a matter of turning the flag off.--cache-disk-persist) — on the same server since 2026-09-01; a restart now restores served context from the on-disk library instead of re-prefilling it.Experimental or closed:
docs/experiments/README.md — narrative index over every experiment note and its raw data.docs/guide/qwen38-27b.md — canonical end-to-end replication guide: BF16 GGUF → imatrix → ROCmFP4-STRIX_LEAN quant → sanitized GGUF → dual-drafter server.docs/guide/qwen38-flash-next-ple-disk.md — running Qwen3.8-Flash-Next on 128 GB: the PLE disk-offload flags, cache budget and measured cost.docs/guide/qwen38-flash-next-prompt-cache-disk.md — the persistent prompt cache: flags, the verbatim-replay requirement, monitoring and rollback.PATCHES.md — index of every patch series in patches/, with upstream status.docs/experiments/qwen38-flash-next-runtime.md.No weights live in this repo — our quants are on Hugging Face under their own licenses:
| Model | HF repo | Notes |
|---|---|---|
| Qwen3.8-Flash-Next (qwen4exp) | pugant/Qwen3.8-Flash-Next-Q4_0_ROCMFP4_STRIX_LEAN-GGUF | 180B-class hybrid (6B active + 51B PLE), 98.5 GiB — the flagship; pairs with the external MTP drafter; --ple-disk fits it in 128 GB |
| Qwen3.8-27B (dense) | pugant/Qwen3.8-27B-MTP-Q4_0_ROCMFP4_STRIX_LEAN | 13.8 GiB — the lab's canonical model, MTP layer included |
| Qwen3.8-27B imatrix | pugant/Qwen3.8-27B-imatrix | the importance matrix behind the preset above |
| Qwen3.8-27B Q3_0 | pugant/Qwen3.8-27B-MTP-Q3_0_ROCMFPX | documented NO-GO quant — not a true 3-bit on this hybrid arch (4.44/5.72 effective bpw, no byte savings), tg (token generation) costs 15.6% on the base preset, 31.7% on the agent-tuned preset |
| grug-35b-v2 | pugant/grug-35b-v2-ROCmFP4-STRIX_LEAN | MoE 35B-A3B, reasoning/tool-call fine-tune |
| Ornith-1.0-35B | pugant/Ornith-1.0-35B-ROCmFP4-STRIX_LEAN | MoE 35B-A3B, multimodal |
| Ornith-1.5-35B | pugant/Ornith-1.5-35B-ROCmFP4-STRIX_LEAN | MoE 35B-A3B, multimodal — MTP head degraded by the fine-tune (pos-2 acceptance ~0.07): speculative decoding not recommended |
| Nemotron-3.5-Lightning-30B-A3B | pugant/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-ROCmFP4-STRIX_LEAN | Mamba-hybrid MoE |
| Qwen3.6-35B-A3B | pugant/Qwen3.6-35B-A3B-MTP-Q6_0_ROCMFPX | MoE 35B-A3B at Q6_0 |
Most community Strix Halo GGUFs run unmodified; support beyond llama.cpp upstream (niche quant types, hybrid architectures) depends on the fork — the ROCmFP4-STRIX_LEAN preset itself was born in that community.
The engine ships as source, not binaries: the full buildable fork tree is rocmfpx/. Fastest path is the local-source Vulkan Dockerfile (companion files come from kyuz0's toolboxes, $TB = your checkout of them):
mkdir -p /tmp/vkctx/src
git archive HEAD rocmfpx | tar -x --strip-components=1 -C /tmp/vkctx/src # the fork source, no clone needed
cp "$TB"/toolboxes/{llama-grammar.patch,gguf-vram-estimator.py} /tmp/vkctx/ # required by the image
cp docker/Dockerfile.vulkan-rocmfpx-local /tmp/vkctx/Dockerfile
docker build -t docker-llm-service:vulkan-fork /tmp/vkctx
For ROCm/HIP use docker/Dockerfile.rocm-7.2.4-rocmfpx (builds from a remote branch). Remember: HIP containers need /dev/kfd and /dev/dri — without /dev/kfd, ROCm init fails silently and the server falls back to CPU.
--spec-type draft-mtp,draft-dflash plus --spec-draft-model <dflash.gguf>, --spec-draft-n-max 7, --spec-draft-p-min 0.75; requests carrying tools are routed to DFlash2, the rest to MTP, with a per-request "spec_drafter" override. Full recipe in the replication guide (docs/guide/qwen38-27b.md).--ple-disk keeps the PLE n-gram table on disk (--ple-cache-mib N sets the block-cache budget, default 4096); guide with the measured cost: docs/guide/qwen38-flash-next-ple-disk.md.--cache-disk <dir> plus --cache-disk-persist (--cache-disk-persist-mib budget, default 16384) keeps the prompt-cache library across restarts; guide with the token-exact boundary caveat: docs/guide/qwen38-flash-next-prompt-cache-disk.md.--reasoning-budget N server-wide or thinking_budget_tokens per request; at 75% of the budget a mid-conversation message nudges the model to converge, and the forced end fires only if it ignores it.Minimal smoke test (image from the Build section above, LEAN model from Model weights):
docker run -d --name owl --network host --device /dev/dri --group-add render \
-v ~/llmodels:/llmodels:ro --entrypoint llama-server docker-llm-service:vulkan-fork \
-m /llmodels/Qwen3.8-Flash-Next-Q4_0_ROCMFP4_STRIX_LEAN.gguf \
-ngl 999 --jinja -c 16384 --no-mmap --ple-disk --metrics --port 1234
curl http://localhost:1234/v1/chat/completions -H 'Content-Type: application/json' \
-d '{"messages":[{"role":"user","content":"Who is Strix Lean?"}]}'
This lab adds a thin layer on top of giants' work.
Q4_0_ROCMFP4_STRIX_LEAN preset, the HIP kernels and the GGUF extensions live. Most of the code this lab builds upon — and merges upstream (PRs #67–#82, ours among them) — is their work.amd-strix-halo-toolboxes / docker-llm-service containers this lab builds and runs on.--ple-disk), and his ds4_kvstore — the cross-restart on-disk library
with hit-decay eviction (6 h half-life) and little-endian sidecar records — which our
persistent prompt cache (--cache-disk-persist) is modeled on.If we forgot anyone: it is an omission, not intentional — open an issue and we will credit you.
12 commits
C++
56.1%
C
13.3%
Python
8.6%
Cuda
5.9%
TypeScript
2.8%
HTML
2.4%
Shell
1.9%
Svelte
1.9%
Metal
1.4%
GLSL
1.3%
Jinja
1.2%