Unlocking 128GB on Strix Halo: Two Days of Debugging, One Line of Grub
16 Mar 2026Everything it took to get a 120B model running fully on-device, from broken kernel params to 1 million token context windows, on an AMD Ryzen AI Max+ 395.
There is something humbling about working in this space right now. The moment you get something running, the moment you lean back and feel good about yourself and think “okay, I actually have this working,” something new shows up and makes it clear that you never had it fully working at all. The ground keeps moving. A config that was correct last week has a better version this week. A model that seemed impossible to load on your hardware turns out to be a kernel parameter away from working fine.
I have learned to stop stressing about being wrong. Not because being wrong does not matter, but because in a field moving this fast, being wrong is just part of the process. The people building in this space who are learning the most are the ones who stay curious about their own mistakes instead of embarrassed by them. Every wrong assumption is just a question you had not asked yet.
This post is a record of two days of being wrong in interesting ways, and what came out the other side.
Where We Started
The hardware was never the problem. The MS-S1 MAX with 128GB of unified RAM is genuinely capable of running enormous models locally. That was the whole point of buying it. The problem was that none of the software knew it.
When I first tried to load a 120B model, llama.cpp reported this:
ggml_cuda_init: found 1 ROCm devices (Total VRAM: 63713 MiB)
63GB. Half the physical memory on the machine. And when a model load attempt needed 78GB, the result was predictable:
cudaMalloc failed: out of memory
This started a two-day investigation into why ROCm was only seeing half the memory, and what it would take to fix it.
The First Suspect: The Build
The initial theory was that GGML_HIP_UMA was not compiled into the image. This flag tells llama.cpp to use unified memory allocation rather than treating the GPU as a discrete device with a fixed VRAM ceiling. Without it, the allocator caps out at whatever the driver reports as device memory, which on Strix Halo defaults to roughly half the physical RAM.
I had the flag in my Dockerfile CMake step:
cmake -S . -B build -G Ninja \
-DGGML_HIP=ON \
-DGGML_HIP_UMA=ON \
-DAMDGPU_TARGETS=gfx1151 \
-DCMAKE_BUILD_TYPE=Release
And I confirmed it was baked in:
docker run --rm registry.beringbullet.com/llama/llama-rocm:latest \
grep -r "HIP_UMA" /usr/local/
# Result:
/usr/local/lib64/cmake/ggml/ggml-config.cmake:set(GGML_HIP_UMA "ON")
The compile flag was there. But the VRAM ceiling was still 63GB. Which meant the problem was not the build at all.
The Real Problem: The Kernel Was Being Ignored
After ruling out the build, I started looking at the host. The Strix Halo GPU uses a memory architecture called GTT (Graphics Translation Table) to make system RAM accessible to the GPU. Without explicit kernel parameters, the amdgpu driver allocates a default GTT pool that is nowhere near the full 128GB.
I had set grub parameters, but they were wrong. Specifically:
# What I had (wrong):
amdttm.pages_limit=32505856
amd_iommu=pt
# What actually works:
ttm.pages_limit=32505856
iommu=pt
The amd prefix on both parameters caused the kernel to silently ignore them. amdttm is not a real kernel parameter. Neither is amd_iommu in that form. The kernel just skips unknown parameters without complaint, which is why nothing crashed and nothing told me it was wrong.
The correct /etc/default/grub line:
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/root rhgb quiet ttm.pages_limit=32505856 amdgpu.gttsize=126976 iommu=pt"
After regenerating the grub config and rebooting:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo reboot
The logs showed this:
ggml_cuda_init: found 1 ROCm devices (Total VRAM: 126976 MiB)
Device 0: Radeon 8060S Graphics, gfx1151 (0x1151), VRAM: 126976 MiB
That was the moment. 124GB visible to the GPU. The kernel had been ignoring both parameters the entire time, and the fix was removing two incorrect prefixes.
The mmap Trap: Why the Model Took 90 Minutes to Not Load
With 126GB visible and the correct build running, I attempted to load the Nemotron 120B model. The logs showed the layers offloading correctly, but then the process went into a D state (uninterruptible I/O sleep) and sat there. After 90 minutes, I started investigating.
The I/O counter told the story:
read_bytes: 109240320
104MB read from a 78GB model. The process was not actually reading the file. It had memory-mapped it instead.
By default, llama.cpp uses mmap to load models. This maps the file into address space lazily and pages it in on demand as the GPU accesses it. On discrete hardware this is fine. On unified memory with Strix Halo, every page fault has to go through the unified memory subsystem, which handles millions of individual faults for a 78GB file extremely slowly. The process was not stalled. It was working correctly. It was just going to take hours.
The fix was one flag:
--no-mmap
This tells llama.cpp to read the entire model file into RAM eagerly at startup. The load takes a few minutes instead of seconds, but once it is done the model is fully resident in memory and inference starts immediately with no stalls.
After adding --no-mmap, the Nemotron 120B loaded in under 5 minutes and started generating immediately.
Testing the Context Window: How Far Can It Go?
Nemotron is a hybrid Mamba/SSM and sparse attention model. Most of its 88 layers are SSM layers with fixed-size state regardless of context length. Only 8 layers use a KV cache. This means context scaling is nearly free in terms of memory.
Testing confirmed it:
# At 524,288 context:
llama_kv_cache: ROCm0 KV buffer size = 4096.00 MiB
# At 1,048,576 context (full 1M):
llama_kv_cache: ROCm0 KV buffer size = 8192.00 MiB
Doubling the context window from 512k to 1M tokens cost 4GB of KV cache. With 78GB for the model weights and 8GB for the KV cache at full 1M context, the total is well within the 124GB available. The model loaded successfully at its native training context of 1,048,576 tokens.
Benchmark Results: Three Models Compared
Once the stack was stable, I ran inference tests on three models to get a real picture of performance across different architectures.
| Model | Size | Prompt (t/s) | Generation (t/s) | Notes |
|---|---|---|---|---|
| gpt-oss-120b Q5_K_M | 58GB | ~417 | 53 t/s | Standard dense transformer, 131k context limit |
| Nemotron 120B Q4_K_M | 78GB | ~200 | 16 t/s | Hybrid SSM/MoE, native 1M context, recurrent memory forces full re-processing each turn |
| Qwen3-Coder-Next Q5_K_M | 54GB | 593 | 42 t/s | Fastest all-around, 262k context, strong cache reuse on repeat turns |
For comparison, community benchmarks on the same hardware show gpt-oss-120b at around 14 to 15 t/s generation. Getting 53 t/s on the same model is a meaningful improvement, likely due to the combination of the updated build, correct kernel parameters, and GGML_HIP_UMA compiled in properly.
The Qwen3-Coder-Next numbers are particularly good for a coding agent. On the second turn of a conversation, prompt processing dropped to 48ms for 4 tokens thanks to KV cache reuse. The effective latency for follow-up messages is nearly instant.
The Router: Letting the Stack Self-Manage
All three models run through a single llama.cpp server in router mode. When a request comes in for a model that is not loaded, the router spawns a child server, loads the model, proxies the request, and evicts the previous model via LRU when it needs to make room.
This means the stack can serve any model in the directory without manual swapping. The logs show the whole lifecycle:
srv ensure_model: model name=Nemotron... is not loaded, loading...
srv unload_lru: models_max limit reached, removing LRU name=gpt-oss...
srv unload: unloading model instance name=gpt-oss...
srv load: spawning server instance with name=Nemotron...
Clean handoffs, no crashes, no manual intervention. The agents in Openclaw just request the model they need by name and the router handles everything else.
What the BIOS Actually Does (and Does Not Do)
One thing worth documenting for anyone else on this hardware: the BIOS UMA setting and the kernel parameters are separate levers that do different things.
The BIOS has a setting called UMA Mode. On this machine it is set to UMA_SPECIFIED with a 1GB framebuffer. This tells the firmware to reserve a minimum fixed allocation for display output and let the rest of RAM be available to the OS and GPU dynamically. Setting this correctly is necessary but not sufficient.
The kernel parameters are what actually tell the amdgpu driver how large a GTT pool to allocate from system RAM. Without amdgpu.gttsize=126976, the driver defaults to a much smaller pool regardless of what the BIOS says. And without ttm.pages_limit, the TTM memory manager caps how many pages it will track, which also limits total accessible memory.
All three things have to be right: BIOS UMA mode, GTT size parameter, and TTM page limit. Missing any one of them leaves memory on the table.
Where Things Stand Now
The stack is running correctly. Current state:
- 126GB visible to ROCm, all models load fully on GPU
- llama.cpp build 8362, rebuilt automatically on each pipeline run
- Router mode serving 17 models on demand with LRU eviction
- Nemotron 120B running at 1M context natively
- gpt-oss-120b and Qwen3-Coder-Next both performing well above community baseline
- Openclaw agents routing to the correct model per request
The performance numbers are real, consistent, and on hardware that fits on a desk. No cloud, no subscription, no data leaving the building.
Final Thought: The Compound Effect of Small Fixes
Looking back at two days of work, there was no single dramatic fix. It was a sequence of small corrections that compounded:
- Remove two wrong prefixes from kernel parameters
- Add one flag to the model load command
- Verify the compile flag actually made it into the binary
Each fix was simple in isolation. But none of them was obvious until I had eliminated everything else. The debugging process was the work. The fixes were just the result of it.
If you are running a Strix Halo machine and llama.cpp is only seeing 63GB, the answer is probably two words in your grub config. Change amdttm to ttm and amd_iommu to iommu, regenerate the config, and reboot. That is it.
Running on an MS-S1 MAX · AMD Ryzen AI Max+ 395 · 128GB unified memory · ROCm 7.2 · llama.cpp build 8362 · Openclaw · All local, all mine.