# Halogen vs a tuned llama.cpp on Ryzen AI MAX+ 395 128Gb: Measured engine swap (1.6-2.4x decode, 3.3x prefill, same accuracy)

> Source: <https://forum.level1techs.com/t/halogen-vs-a-tuned-llama-cpp-on-ryzen-ai-max-395-128gb-measured-engine-swap-1-6-2-4x-decode-3-3x-prefill-same-accuracy/261323#post_1>
> Published: 2026-11-29 22:32:48+00:00

**Recommendation:** Benchmark engine swaps against your own tuned config using the engine's timings object rather than curl wall time, and gate each arm by clearing /dev/kfd holders and GTT to the ~17 MiB floor to avoid stuck-memory artifacts.
More in the playbook "Inference and self-hosting": <https://wpnews.pro/playbooks/inference-serving>

*Disclosure up front: this write-up was drafted by my local AI agent from our measurement logs, with the numbers cross-checked by hand. The measurements were run on my box by that agent under my supervision; the opinions at the end are mine.*

I run a Ryzen AI MAX+ 395 workstation with 128 GB unified memory (MinisForum MS-S1 in performance mode, Fedora 45 server, headless) as a 24/7 local inference server. It backs an agent stack that lives entirely on local hardware: chat, tool loops, structured extraction jobs, the works. The model is Qwen3.8-Flash-Next (125B MoE, ~6B active), which is the current sweet spot for this chip: big enough to be genuinely good, MoE enough that the active set fits the bandwidth.

For months the serving engine was mainline llama.cpp (Vulkan), tuned specifically for this platform. Then halogen-flash-server showed up: a closed-source container with hand-written gfx1151 kernels for this exact model family, claiming roughly 2x decode and 3x prefill. The community has been arguing about those claims, and a fair chunk of the skepticism is deserved, because most of the headline comparisons beat a stock llama.cpp install. My llama.cpp config is not stock. So I ran the comparison properly before committing anything.

|  | llama.cpp arm (my production config) | Halogen arm | 
|---|---|---|
| engine | llama.cpp b12651, Vulkan | halogen-flash-server 0.21.0 (Docker) | 
| weights | unsloth UD-IQ4_XS, 94 GB, 4 shards | their .hgn v2, 62.1 GiB + 47.7 GiB ngram table | 
| context | 262144, q8_0 KV, swa-checkpoints 8 | 262144, bf16 KV pool | 
| speculative | MTP draft-mtp, n-max 3 | MTP head + prompt-lookup | 
| batch / slots | tiling 4096/4096, parallel 2 | 4 pooled slots | 

The llama.cpp arm had the MTP head, the full 262K context, q8_0 KV, the tiling flags and the memory-margin tuning. This is the config that served as my daily driver, not a benchmark toy.

`timings` object / slot print timing), never curl wall time. Wall time includes queueing, HTTP and prompt ingest, and it lies.`/dev/kfd` holders and GTT back to the ~17 MiB floor before starting the next arm. Halogen’s docs warn about stuck GTT after unclean exits; the gate meant it never bit.
| probe | llama.cpp b12651 | Halogen v2 | delta | 
|---|---|---|---|
| decode, prose | 38.3 t/s | 60.6 t/s | 1.58x | 
| decode, JSON | 49.0 t/s | 93.1 t/s | 1.90x | 
| decode, copy-heavy (1947-tok prompt) | 47.9 t/s | 114.6 t/s | 2.39x | 
| prefill pp512 | 483 t/s | 1429 t/s | 2.96x | 
| prefill pp8192 | 675 t/s | 2221 t/s | 3.29x | 
| prefill pp28800 | 582 t/s | 2198 t/s | 3.78x | 

The copy-heavy row is prompt-lookup speculation eating repetitive output, so treat it as a best case; the prose and JSON rows are what you actually feel. The prefill numbers reproduce the vendor’s shape (~2,000 t/s) on a tuned baseline, which is the part that made me convert.

Speed that eats quality is a downgrade with extra steps, so both arms ran the same frozen gold set (28 notes, 65 machine + 60 model labels, extraction task) through the same eval harness:

|  | llama.cpp | Halogen | 
|---|---|---|
| strict F1 | 0.608 | 0.608 | 
| recall-mode F1 | 0.627 | 0.630 | 
| seconds per note (recall) | 4.49 | 2.61 | 

Same labels caught, same false positives. Same model, different plumbing, so this mostly proves the engine isn’t quietly degrading output on this workload.

Since switching the daily driver to Halogen: decode 53-59 t/s on streamed generations under real load, uncached prefill around 1,490 t/s, and warm-prompt TTFT of 0.01 s with the prompt cache holding 161k tokens of live session context. That last number is the sleeper for agent workloads: a long tool loop stops paying prefill on every step.

`unknown tensor type 42`, which is Q2_0 in the down-experts). Budget ~110 GB for their .hgn set.`--device /dev/kfd --device /dev/dri --ipc=host` and numeric group IDs (Docker resolves `--group-add` names against the image’s /etc/group; fails on SELinux hosts).
The honest framing is: against a tuned llama.cpp, Halogen is ~1.6-2.4x decode and ~3.3x prefill, not the 4x some threads imply. That’s still the largest engine-level win I’ve measured on this hardware, and for a single-model daily driver the prefill alone justifies it. If you need multi-model serving or you refuse closed binaries, stay on tuned llama.cpp, it’s genuinely good.

Happy to answer questions on the harness, the flags, or the eval set. And if anyone wants repeat arms on these probes, say so and I’ll run them.
