tandem.cpp
by ewhacc · Runtime · Text & code
A set of patches for llama.cpp that runs mixture-of-experts models bigger than your graphics memory or RAM by streaming experts from SSD.
Developer reports large speedups over llama.cpp; independent tests have found none so far
Latest · Nov 23MIT-licensed llama.cpp patch set (v0.5.0) running any llama.cpp-supported MoE model larger than VRAM or RAM, single user, Linux only
Who says what
Early daysewhacc, its developer
Reports 14.2 vs 7.4 tok/s on DeepSeek Flash 4.1 with an RTX 5070 Ti and 33.1 vs 11.5 on an RTX 5090. By Nov 23 his claim narrowed to up to 15% faster when the model exceeds RAM and about 2x when it just misses, and his own runs show Strata faster once the model fits in RAM.
IT Lab, who tested it, and Агенты Романа (Roman's Agents), who reviewed the claims
IT Lab found no advantage from the AMD build on a Qwen model, and an earlier build reportedly ran 6 tok/s vs 6.86 for stock llama.cpp on an i5-12400. Агенты Романа (Roman's Agents) notes the published comparison never says llama.cpp's own expert cache was enabled.
What would settle it. An outside test against current llama.cpp with its expert cache tuned, on the same NVIDIA system.
Seen running on
| Machine | Speed | How | Seen by |
|---|---|---|---|
| 5 runs on 16 GB | |||
| 74.3 tok/s | IQ3_S | ||
| 52.4 tok/s | IQ3_S | ||
| 9.4 tok/s | |||
| 14.2 tok/s | |||
| 3 runs on 32 GB | |||
| 190.5 tok/s | IQ3_S | ||
| 60.7 tok/s | |||
| 33.1 tok/s | |||
Evidence
- Nov 23Repo had 125 stars and 21 forks; tested on RTX 5090, 5070 Ti, 4090, 6000 Ada and PRO 6000 Blackwell; AMD HIP build tested on one RX 7900 XTXMaker's claimewhaccvia
r/LocalLLaMA - Nov 23Claims up to 15% faster decoding when the model is bigger than RAM, and about 2x faster when it just misses fitting in RAMMaker's claimewhaccvia
r/LocalLLaMA - Nov 23Qwen3.8 IQ3_S + MTP with 32 GB RAM on RTX 5070 Ti: 52.4 tok/s decode versus Strata's 30.2–35.4Hands-on testewhaccvia
r/LocalLLaMA - Nov 23Qwen3.8 IQ3_S + MTP with 128 GB RAM on RTX 5090: 190.5 tok/s versus Strata's 201.1; Strata faster when model fits in RAMHands-on testewhaccvia
r/LocalLLaMA - Nov 23Qwen3.8 IQ3_S + MTP with 64 GB RAM on RTX 5070 Ti: 74.3 tok/s versus Strata's 87.5Hands-on testewhaccvia
r/LocalLLaMA
Show all 18
- Nov 23DeepSeek-V4.1 Maya-XS on RTX 5090 with 128 GB RAM: 60.7 tok/s versus Maya's 39.6 (56.4 with DSpark)Hands-on testewhaccvia
r/LocalLLaMA - Nov 23DeepSeek-V4.1 Maya-S on RTX 5070 Ti with 64 GB RAM: 9.4 tok/s versus Maya's 6.0 (6.1 with DSpark)Hands-on testewhaccvia
r/LocalLLaMA - Nov 23Quality measured by KL divergence: same Qwen3.8 IQ3_S file gives 0.0259 on tandem.cpp versus 0.0260 on Strata, so output quality is unchangedMaker's claimewhaccvia
r/LocalLLaMA - Nov 18Developer reports 14.2 tok/s on DeepSeek Flash 4.1 on an RTX 5070 Ti with 64 GB RAM and fast SSD, versus 7.4 for stock llama.cpp (Oct 28 build)Maker's claimewhaccvia
Агенты Романа (Roman's Agents) - Nov 18First token arrived after about 6 seconds with tandem.cpp versus about 14 seconds with stock llama.cpp; a repeat tandem.cpp run gave 13.3 tok/sMaker's claimewhaccvia
Агенты Романа (Roman's Agents) - Nov 18On an RTX 5090 with 128 GB RAM tandem.cpp reached 33.1 tok/s versus 11.5 for stock llama.cpp, nearly three times fasterMaker's claimewhaccvia
Агенты Романа (Roman's Agents) - Nov 18On a 40-problem math sample all configurations solved 39 or 40 problems; too small to prove quality is preserved, but no obvious breakageMaker's claimewhaccvia
Агенты Романа (Roman's Agents) - Nov 18An earlier Nov 1 build on an Intel Core i5-12400 with a model about 3x RAM size ran at 6 tok/s versus 6.86 for stock llama.cppReported
Агенты Романа (Roman's Agents) - Nov 18IT Lab's independent test of the AMD adaptation on a Qwen-family model found no advantage over their previous setupHands-on testIT Labvia
Агенты Романа (Roman's Agents) - Nov 18A newer version adds a Store mode that combines VRAM and pinned RAM as cache and reads missing experts straight from SSD in parallel with compute; it postdates the 14.2 tok/s testsReported
Агенты Романа (Roman's Agents) - Nov 18Described version runs only on Linux, is aimed mainly at NVIDIA and assumes a single user; with expert cache on, greedy decoding can differ between runsReported
Агенты Романа (Roman's Agents) - Nov 18Splits cache misses between CPU and GPU based on measured system performance, an idea partly borrowed from Strata; the exact formula is not publishedReported
Агенты Романа (Roman's Agents) - Nov 18Video notes the published tandem.cpp comparison does not say llama.cpp's expert cache was enabled, and no test pits tandem.cpp against current llama.cpp with both mechanisms tuned on the same systemHands-on test
Агенты Романа (Roman's Agents)