tandem.cpp on AMD: we ported it, but it didn’t win
We ported tandem.cpp to an RX 9070 XT: its compute matched the original in a limited test, but it didn't beat what we already had. Figures and findings.
tandem.cpp promises a big speed-up for large MoE models on a single card, but it only runs on NVIDIA. We ported it to an AMD RX 9070 XT with 16 GB on November 6 and 7, 2026. Its compute matched the original in a limited test, but on this machine it didn't beat what we were already using. The port is experimental.
- It builds on AMD, and its compute matched the original in a limited test. The port is 47 lines added and 10 removed across 5 files.
- It missed the target. We were aiming for close to 60 tok/s sustained. The best short run gave 53.43 tok/s, and the average with pinned memory was 45.45.
- Strata is still our choice for Flash Next on this card, although there's no head-to-head comparison.
- We found no other AMD port in the project's forks or issues.
- We're sharing it on GitHub as experimental, for anyone who wants to try it on their own hardware.
What tandem.cpp is
tandem.cpp, by ewhacc, is a patch on top of llama.cpp under the MIT license. It isn't an engine or a fork. It keeps the model's experts in RAM and uses free VRAM as a cache for the most used ones. The missing ones are split between CPU compute and uploads to the GPU. According to its README, it has only been tested with CUDA on Linux.
The author's figures, not ours: on an i5-12400F with an RTX 4090, Qwen3.8 Flash Next IQ3_S with MTP gives 97.3 tok/s, against 29.8 for llama.cpp and 103.6 for Strata in exact mode. Strata's default mode, which skips rarely used experts, gives 127.1.
A Code Unpacked video presented it on November 6: This llama.cpp Fork Just Made Qwen 3.3× Faster. Its author says they didn't run the tests, and warns that the 3.3× is against llama.cpp's default split, that the patch isn't merged into llama.cpp and that AMD wasn't ready yet.
What we did
We used Swift 1.5 Flash Next GSQ-RCO abliterated IQ3_S, in the GGUF build by slider-meister-pub, based on ukisai's Swift1.5-Qwen3.8-Flash-Next (Swift Open License 1.0), with ewhacc's MTP head (Qwen Community License 1.0). The card is an RX 9070 XT with 16 GB, on ROCm 7.2.4.
The first attempt to build for AMD failed with 12 errors. The port replaces timing and wait functions that only exist on NVIDIA, adds four equivalents to the HIP compatibility layer and adjusts two instructions that HIP requires to be written differently.
On top of that, tandem.cpp looks for the card under the name "CUDA", and under HIP it's called "ROCm". That silently turned off two optimizations: pinning the experts in memory and the embeddings table on the GPU.
Does the compute match?
We compared the port on the RX 9070 XT against the original tandem.cpp on an RTX 3060: same text, 60 positions, no MTP and temperature 0.
| Measure | Port on AMD | README reference |
|---|---|---|
| Same top token | 55 of 60 (91.7%) | 95.5% |
| Mean KL divergence | 0.00890 | 0.0093 |
| Max KL divergence | 0.09783 | No data |
There's no sign of error, but the test is limited: it's 60 positions, it doesn't cover MTP or multi-token batches, and it was done before the port's latest changes, which don't touch the compute.
Speed
All are short runs of 3,000 tokens, with MTP at 3 drafts, a 32,768 context and the same prompt.
| Group | Runs | Average, tok/s | Range |
|---|---|---|---|
| Pinned memory | 5 | 45.45 | 34.96 to 53.43 |
| Control, unpinned | 4 | 34.85 | 28.73 to 40.62 |
Pinning memory improved speed by about 30%. These are few runs and they vary a lot, so it's a rough estimate. One of the five pinned runs, the 51.58 tok/s one, was done with detailed logging, which can affect speed.
| Other variants, one run each | Generation, tok/s |
|---|---|
| Pinned, skipping experts and with q8/q4 context | 48.63 |
| Unpinned, skipping experts and with q8/q4 context | 44.03 |
| Pinned with "doorbell" | 44.91 |
| Pinned with "doorbell", skipping experts and with q8/q4 context | 27.23 |
| Embeddings table copied into RAM, unpinned | 9.78 |
Skipping experts is an approximate mode, and we didn't evaluate its quality. Both "doorbell" runs were done with detailed logging, which can affect speed.
Compare with care: Swift on Strata gave 66.26 tok/s sustained over our 49-task battery, and 73.43 on one programming task. These aren't the same task, length or context as the runs above, so they're a reference rather than a direct comparison. We also ran that programming task with the port, but with a 32,768 context the model filled it reasoning and never got to answer.
What we learned
- On AMD, copying to the GPU from unpinned memory blocks the thread. In a minimal test, queuing a 128 KiB copy took 7.5 µs unpinned and 0.8 to 0.9 µs with pinned memory. In the server, planning dropped from 47-54% of the time to 2-6%.
- Registering file-mapped memory with HIP hung the driver for many minutes. The process got stuck, and other system tools stalled waiting on it. It exited about 50 seconds after being force-killed, with no reboot. The port avoids that path on ROCm.
- The bottleneck is now the cache and the GPU wait. With a 5.83 GiB cache for 47.96 GiB of experts, hits run around 60%, and the GPU wait reached 35-71% of the time. It remains to separate how much is compute and how much is synchronization.
What isn't validated
- Multi-token batches, which MTP uses.
- The programming task with a valid verdict, and the full battery.
- Sustained and reading speed with pinned memory, and large contexts.
- The cause of the variation between pinned runs.
- Other AMD cards.
The port
The port is experimental. We built it to run tests in our lab and, after those tests, we dropped that path: on our machine it didn't beat Strata. If you want to try it on your own hardware, it's at itlab-cl/tandem.cpp-amd, under the MIT license like ewhacc's tandem.cpp, and based on llama.cpp. We haven't validated it for real use.
Frequently asked questions
Does tandem.cpp work on AMD? The original doesn't build for AMD. Our port does, on an RX 9070 XT, and its compute matched the original in a limited test.
Is it worth using instead of Strata? On this machine, no. The best short run gave 53.43 tok/s, below what Strata sustains over the battery, although the tests aren't equivalent.
Why does the author get so much more? We didn't measure it. There are known differences between the setups: that RTX 4090 has 24 GB, with more VRAM for the expert cache; it uses a different CPU, an i5-12400F; and it runs on CUDA, where the patch was tested.
Are you going to keep going? No. After the tests we dropped this path. For anyone who wants to continue, the lead is to separate, within the GPU wait, how much is compute and how much is synchronization.
Sources
- ewhacc, tandem.cpp, commit `e1acb88`, MIT license.
- ewhacc, MTP head qwen38-mtp-outq4_K-expsq4_K, Qwen Community License 1.0.
- llama.cpp, the base of tandem.cpp, MIT license.
- Strata.
- slider-meister-pub, Swift 1.5 Qwen3.8 Flash Next GSQ-RCO abliterated IQ3_S GGUF.
- ukisai, Swift1.5-Qwen3.8-Flash-Next, base model, Swift Open License 1.0.
- Code Unpacked, "This llama.cpp Fork Just Made Qwen 3.3× Faster" (November 6, 2026).
Keep reading
- llama.cpp b12191 vs tandem.cpp: expert cache
- Unsloth and Avalon IQ3_KS on the ITLab Bench
- Avalon and Strata on 16 GB: our experience
Updated on November 8, 2026: we compared this port with llama.cpp's official expert cache on the same card; we cover it in llama.cpp b12191 vs tandem.cpp: expert cache.
Contact
If your organization is considering local AI, ITLab can help you size the hardware and test models and engines on your real cases. Contact us.
Do you need someone to take care of your technology?
Tell us what you need to organize, protect or solve. The first conversation has no cost: we assess whether our model fits you and what the next steps would be.
Let's talk about your business