Aaron Munguia
← All posts
· 9 min read AI Infrastructure

Hermes AI Runtime v1: Vulkan, ROCm, and the 30B MoE Breakthrough on a 32 GB AMD APU

I built llama.cpp from source on a 32 GB AMD Ryzen AI 9 mini pc and got the first functioning accelerated LLM runtime on the Radeon 890M. Then I moved to ROCm, found llama.cpp's unified-memory path, and discovered that a 30B Mixture-of-Experts model beat dense 27B models by 8x — the answer was never the GPU.

AIllama.cppAMDVulkanROCmLocal AI

This is the first chapter of the Hermes AI Runtime series.

I have been building a personal AI lab around a machine I call Hermes, not the Hermes Agent, I will talk about that later.

My objective isn’t simply to run a chatbot locally. I want Hermes to become an AI development and inference node: a machine capable of serving local models, supporting agents, running experiments, and eventually becoming part of a larger personal AI infrastructure.

This chapter is about the first runtime: getting Vulkan working on an integrated GPU, then moving to ROCm/HIP to find llama.cpp’s unified-memory path — and discovering why a 30B Mixture-of-Experts model outperformed dense 27B models by 8x on a shared-memory GPU.

The starting point

Hermes is a Minisforum AI X1 Pro with an AMD Ryzen AI 9 HX 470: 12 cores, 24 threads, Radeon 890M integrated graphics, 32 GB of system RAM, and a 2 TB NVMe. It runs Fedora KDE 44.

The important detail is the integrated GPU.

There isn’t a large independent pool of GPU VRAM. CPU and GPU ultimately share system memory. That made the memory architecture one of the central constraints of the experiment.

For inference I chose llama.cpp, built from source. The benchmark series used commit ece963f.

Building it myself proved useful because I wanted independent CPU, Vulkan, and HIP configurations and explicit control over the gfx1150 GPU target.

Getting Vulkan working

I started with Mesa RADV and compiled llama.cpp with Vulkan enabled:

cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DGGML_VULKAN=ON

llama.cpp correctly detected the Radeon 890M and reported UMA plus KHR cooperative-matrix support.

That gave Hermes its first functioning accelerated LLM runtime on Linux.

I then created a simple model ladder using Q4_K_M GGUF files:

ModelGGUFpp512tg128
Qwen3-4B2.32 GiB672.1715.18
Qwen3-8B4.68 GiB368.798.35
Qwen3-14B8.38 GiB176.624.61

As the dense model grew, generation speed fell sharply.

That was the first clue that memory bandwidth — not simply compute — would define the limits of the APU.

Full Vulkan offload also consistently beat the corresponding -ngl 0 tests. Qwen3-4B went from 12.04 to 15.18 tok/s; 8B from 6.62 to 8.35; and 14B from 3.94 to 4.61.

The Vulkan path was working. The question was whether it could scale to the models I actually wanted to run.

Then I tried Qwen3-30B-A3B.

Hitting the 30B wall

Qwen3-30B-A3B is a Mixture-of-Experts model with 30.53B total parameters but only roughly 3B active parameters. Its Q4_K_M file is 17.28 GiB.

The first full Vulkan attempt failed:

radv/amdgpu: Not enough memory for command submission.

Although the machine physically had 32 GB of RAM, AMDGPU exposed only 2 GiB as VRAM and roughly 14.5 GiB as GTT.

This was an important distinction:

Shared physical memory does not automatically mean all system memory is GPU-addressable.

I increased the AMDGPU GTT allocation with:

sudo grubby --update-kernel=ALL --args="amdgpu.gttsize=20480"

After reboot, GTT was 20 GiB and llama.cpp could see roughly 22 GiB through Vulkan.

On paper that looked sufficient.

In practice, the large-model Vulkan path still wasn’t healthy. System memory consumption climbed, CPU utilization remained high, and GPU busy percentage stayed around 1–2%. Some runs could sit there for tens of minutes.

Increasing addressable memory had removed one constraint, but it had not solved the execution path.

A benchmarking trap: -ngl 0

I initially used -ngl 0 as if it meant “CPU-only.”

For a Vulkan-enabled binary, that assumption was too simplistic. The backend still initialized Vulkan, and one large-model attempt eventually terminated through a Vulkan queue path with vk::DeviceLostError.

So I created a dedicated CPU build.

That gave me a much cleaner control experiment.

Qwen3-30B-A3B on 12 CPU threads achieved:

pp512: 130.41 tok/s
tg128: 16.51 tok/s

That was surprisingly good for something called a “30B model.”

The explanation was architecture: it was MoE, not dense.

That observation became central in the rest of this chapter.

Moving to ROCm/HIP

The next question was whether AMD’s compute stack could handle this APU differently.

ROCm detected the Radeon 890M as gfx1150. Fedora’s ROCm 7.1 packages provided HIP, the ROCm compiler stack, and the necessary runtime. Building llama.cpp’s HIP backend also required development libraries such as hipBLAS and rocBLAS.

The HIP build was:

cmake -B build-hip -G Ninja -DCMAKE_BUILD_TYPE=Release \
  -DGGML_HIP=ON -DCMAKE_HIP_ARCHITECTURES=gfx1150

Eventually llama.cpp reported the Radeon 890M as a ROCm device with wave size 32.

Now I could run the same models through both backends.

Vulkan vs ROCm: measure, don’t assume

I expected ROCm to immediately beat Vulkan.

It didn’t.

ModelVulkan tg128ROCm tg128
Qwen3-4B15.1814.60
Qwen3-8B8.358.07
Qwen3-14B4.614.47

For these workloads, Vulkan was roughly 3–4% faster in token generation, with an even larger advantage in prompt processing for the smaller models.

That gave me one of the most reusable lessons from the project:

Don’t choose an AI backend because it should be faster. Benchmark the actual model on the actual hardware.

ROCm wasn’t going to replace Vulkan universally.

But ROCm ended up solving a different problem.

The unified-memory breakthrough

ROCm reported approximately 14.85 GiB of VRAM for the Radeon 890M, while the Qwen3-30B-A3B GGUF was 17.28 GiB.

A full -ngl 999 load failed.

Partial offload worked. With 24 GPU layers and direct I/O, Qwen3-30B-A3B reached:

pp512: 248.15 tok/s
tg128: 13.50 tok/s

Useful, but generation was still slower than the 16.51 tok/s CPU baseline from the Vulkan section.

Then I found llama.cpp’s unified-memory code path:

GGML_CUDA_ENABLE_UNIFIED_MEMORY

Despite the CUDA-oriented name, the HIP implementation shares this infrastructure.

I tried:

GGML_CUDA_ENABLE_UNIFIED_MEMORY=1 ./build-hip/bin/llama-bench \
  -m Qwen3-30B-A3B-Q4_K_M.gguf --load-mode dio -ngl 999

It worked.

The result was:

pp512: 320.91 tok/s
tg128: 18.22 tok/s

This was the breakthrough of the whole chapter.

A model larger than the nominal ROCm VRAM allocation was now running through the APU’s shared-memory architecture, and it was faster than the CPU baseline.

Then I tested dense 27–30B models

Once the large-model path worked, I added Qwen3.6-27B-MTP, Qwen3.8-27B, and Muse Glimmer 30B.

Their behavior was dramatically different:

ModelParamspp512tg128
Qwen3.6-27B27.32B78.662.26
Qwen3.8-27B27.32B80.692.27
Muse Glimmer 30B27.85B93.202.46
Qwen3-30B-A3B30.53B total320.9118.22

This is probably the most useful result of the entire experiment.

A model with more total parameters was roughly 7–8 times faster at token generation.

The reason is that total parameter count is a poor proxy for MoE inference cost. What matters includes active parameters, memory traffic per token, memory bandwidth, kernels, quantization, and offload strategy.

Qwen3-30B-A3B activates only a small portion of its expert weights for a token. The dense models must continually move far more model data.

On an APU sharing DDR memory, that difference is enormous.

Qwen3.6 vs Qwen3.8: finding the ceiling

Qwen3.6 and Qwen3.8 were especially interesting:

Qwen3.6-27B: pp512 78.66 / tg128 2.26
Qwen3.8-27B: pp512 80.69 / tg128 2.27

Qwen3.8 improved prompt processing by about 2.6%.

Generation improved by only about 0.4%.

That is a strong clue that I had reached a hardware bottleneck. Architectural changes could move the compute-heavy prompt-processing number, while autoregressive generation remained pinned at essentially the same rate.

The dense ~27B ceiling is therefore much more about the memory subsystem than the exact model generation.

The final leaderboard

ModelArchitectureBest backendtg128
Qwen3-4BDenseVulkan15.18
Qwen3-8BDenseVulkan8.35
Qwen3-14BDenseVulkan4.61
Qwen3-30B-A3BMoEROCm + UMA18.22
Qwen3.6-27BDenseROCm + UMA2.26
Qwen3.8-27BDenseROCm + UMA2.27
Muse Glimmer 30BDenseROCm + UMA2.46

The counterintuitive result is my favorite:

The fastest token generator in this benchmark is the 30B model.

Architecture matters.

What didn’t work — and why that matters

The dead ends were as useful as the successful runs.

Assuming all 32 GB were automatically available to the iGPU: they weren’t. GTT and backend memory management mattered.

Increasing GTT and expecting everything to work: it changed the address space but didn’t make the Vulkan execution path efficient.

Assuming -ngl 0 was a pure CPU test: it wasn’t necessarily, so I created a CPU-only build.

Assuming ROCm would always beat Vulkan: the actual small-model benchmarks said otherwise.

Trying full HIP offload before unified memory: the model exceeded the nominal ROCm memory pool.

Using total parameters as a speed predictor: the MoE result showed why active parameters matter much more.

These are precisely the kinds of details that disappear when local AI is reduced to a simple “can it run a 30B model?” question.

Thermals weren’t the bottleneck

Representative readings during successful ROCm runs put the GPU around 45–53°C, CPU Tctl around 49–60°C, and NVMe around 28–36°C.

The RAM SPD sensor occasionally crossed its configured high threshold near 55°C, which is worth monitoring during sustained workloads, but thermals were not what limited these experiments.

Memory was.

What I learned

I no longer think Hermes should have one universal inference configuration.

The benchmarks suggest runtime profiles.

For 4B–14B models, Vulkan is currently the best measured path.

For large shared-memory models, ROCm/HIP plus llama.cpp unified memory and direct I/O is the useful path.

A dedicated CPU build remains valuable as a fallback and diagnostic control.

And model architecture should influence routing just as much as model size.

For example, small models can handle extraction, classification, and routing, while Qwen3-30B-A3B is currently a much better interactive large-model candidate than the tested dense 27–30B models.

This is exactly the kind of distinction that becomes useful when building agents.

The next question

The dense ~27B models were pinned at 2.26–2.46 tok/s on the APU. The hypothesis was clear: dedicated VRAM should fix this, because the bottleneck was shared-memory bandwidth.

There is a major hardware change coming: Hermes will receive an NVIDIA GeForce RTX 3090 Ti with 24 GB of dedicated VRAM.

That makes the current results more valuable, not less.

I now have a clean shared-memory APU baseline. When the discrete GPU is installed, I can rerun the same model suite and directly measure what dedicated GPU memory changes — especially for the dense 27–30B models that so clearly exposed the current memory-bandwidth ceiling.

I won’t treat that as a minor optimization of this chapter.

It deserves its own benchmark generation.

For now: Hermes AI Runtime v1 is complete.

And the most useful result wasn’t 18.22 tokens per second.

It was understanding why the machine produces that number.