cd /news/ai-infrastructure/qwen4-on-a-2014-xeon-reaches-104-tok… · home › topics › ai-infrastructure › article
[ARTICLE · art-182493] src=pub.towardsai.net ↗ pub= topic=ai-infrastructure verified=true sentiment=↑ positive

Qwen4 on a 2014 Xeon Reaches 104 Tokens per Second: Strata Against llama.cpp

Strata version 0.2.26, released 4 December, ran Qwen4-35B-A3B at 104 tokens per second on a single RTX 4070 in a 2014 Xeon X99 workstation, versus 46.5 tokens per second for llama.cpp release b12974 on the same card and model file, according to the author's own measurements. With an RTX 4070 and RTX 3060 paired, Strata read a 248,000-token prompt in 93 seconds and then generated at 75 tokens per second, while llama.cpp took 4 minutes 49 seconds on the same prompt and wrote at 21 tokens per second. The gap comes from Strata's expert cache, which keeps the most-used of Qwen4's 256 experts per layer in VRAM and runs the rest on the CPU, and its 8-bit context cache streamed from pinned system RAM beyond 20,480 positions per layer.

recommendation

For large MoE models on small GPUs, cache the most-used experts in VRAM and stream an 8-bit KV cache from pinned RAM past 20,480 positions; the author measured 104 vs 46.5 tokens per second against llama.cpp.

more in playbook: Inference and self-hosting
by read11 min views1 publishedDec 5, 2026

This article was written with the help of Claude (Anthropic), from my notes, ideas and measurements; I reviewed and edited the text. Every measurement was run on my own machines.

On my 2014 Xeon, a single RTX 4070 runs Qwen4–35B-A3B at 104 tokens per second with Strata. With llama.cpp, the same card and the same file make 46.5. With both cards in the machine, an RTX 4070 and an RTX 3060, Strata reads a 248,000-token prompt in 93 seconds and then keeps writing at 75 tokens per second; llama.cpp, squeezed to fit 256K of context into the same 24 GB of VRAM, took 4 minutes 49 seconds for the same prompt and then wrote at 21.

This article is part of a series about running language models on hardware nobody wants any more. In the first, a 2013 X79 workstation with two used Titan Xp cards ran a 125-billion-parameter model at 38 tokens per second. In the second, two PCs shared it over gigabit Ethernet. In the third, the X99 board of this article ran it next to two Mac Studios. In the fourth, a €250 Titan Xp from 2017 ran Inkling 2 Mini against an RTX 4070. In the fifth, I tested Qwen4–35B-A3B with llama.cpp on three PCs the day it came out.

That article ended with two engines that had Qwen4 support in pull requests but not in a release. One of them, Strata, shipped it on 4 December in version 0.2.26. The next morning I ran it on the X99 with the same test series as the llama.cpp numbers of the day before, plus a set of long-context tests on both engines.

Strata is an inference engine for large mixture-of-experts models on small cards. In a mixture-of-experts model, each token goes through only a few of the experts in each layer: Qwen4–35B-A3B has 256 experts per layer and uses 8 of them, plus a shared one, per token. Strata keeps an expert cache in VRAM, fills it with the experts that are used most, and leaves the rest in system RAM, where the CPU runs them. llama.cpp has a coarser control: -ncmoe N moves all the experts of the first N layers to the CPU.

The second difference is the context cache. Only 10 of Qwen4’s 40 layers keep one (2 key-value heads of 256 values each). Strata stores it as 8-bit integers and, beyond 20,480 positions per layer, streams it from pinned system RAM. llama.cpp keeps the whole cache on the cards, so every position of context competes with the experts for the same 24 GB.

It is the machine of the third article: €179 for the board with the CPU, €100 for 128 GB of used server RAM.

The llama.cpp numbers are from that fifth article: release b12974 built with CUDA 12.9, 32K of context, all the experts on the two cards, or -ncmoe 24 on one card. The Strata numbers are new, with the same model file, ggml-org's Q4_K_M, and the same scripts:

Strata ran with the settings of its Qwen4 recipe: 8-bit context cache, --spec 2, and the expert cache sized automatically. On two cards I ran it at 256K of context, the setting I now use for chat, and on one card at 64K. The vision encoder was loaded on the CPU in every Strata run; llama.cpp ran text-only. Thinking was off for both engines.

Two differences are part of the comparison rather than hidden in it:

On two cards with every expert in VRAM, Strata is 14% faster. On one card it is 2.2 times as fast on the RTX 4070 and 1.9 times on the RTX 3060.

How much of it is drafting? I ran Strata again with suffix drafting off (--suffix-draft 0 --lookup-max-t 0; the engine logged 0 drafts) and drafting is worth only 3-6%: Without any drafting, Strata on the RTX 4070 alone makes 98.3 tokens per second, 2.1 times llama.cpp: the gain on one card comes from the expert cache, not from drafting. On two cards the order changes when llama.cpp gets Qwen4’s own multi-token-prediction (MTP) head, a small extra layer that guesses the next tokens for the full model to verify: in the fifth article, llama.cpp with the MTP head drafting two tokens made 91.9 tokens per second at 20K of context, above Strata’s 88.7. At 32K the MTP head no longer fit on the two cards.

The energy follows. On the RTX 4070 alone, Strata draws more power, 306 W of combined CPU, DRAM and GPU power against 210 W for llama.cpp, because the card works instead of waiting for the CPU, but it produces more than twice the tokens: 2.9 joules per token against 4.5.

With Strata, the RTX 4070 alone is faster than the RTX 4070 and the RTX 3060 together. The comparison holds at the same context and without drafting: at 64K with drafting off, 98.3 tokens per second on the 4070 alone against 86.5 on both cards.

On two cards, Strata splits the layers: 0–20 on the 4070, 21–39 on the 3060. Each token goes through both cards in turn, so its time is the time spent on the 4070, plus the time spent on the 3060, plus the hand-off between them. The expert caches then hold 99.9% of the experts the model asks for, but half of every token runs on the RTX 3060, which has 360 GB/s of memory bandwidth against the 4070’s 504.

On the RTX 4070 alone, the cache holds 7.3 GB of experts and finds 90.9% of the ones the model asks for. The other 9% run on the CPU, which reads them from DDR3. In this test, with short prompts, a 90.9% hit rate was enough for that to cost less than giving half of the layers to the RTX 3060.

The second card earns its place when the goal is context rather than speed: it holds half of the layers and of the context cache, and the pair is the setup I ran to 248K and 504K tokens. I did not run the long-context tests on the RTX 4070 alone.

Both engines found the password every time. With all the experts on the two cards, llama.cpp reads the 17.7K-token prompt 10% faster. With one card, Strata reads it 3.6 to 5.9 times as fast. I did not profile where that comes from; Strata’s log describes a “streamed ring” that brings the experts missing from the card’s cache over while a prompt is read.

Qwen4’s native context is 1,048,576 tokens. On 24 GB of VRAM, the question is how much of it you can use, and how the engine behaves when the context is full.

For each engine and size I used the fastest setting I found that starts and survives the test: a short generation with the context empty, then one prompt of Italian log lines with a sentence hidden halfway (the “needle”), a question about it, and a 400-token answer in the same conversation, with the long prompt still in the context. Every run found the needle. At 64K the test asked only for the needle, an 8-token answer, so there is no “after it” number there.

llama.cpp at 64K with the vision encoder loaded already has to move the experts of 4 layers to the CPU; that is why it makes 63–64 tokens per second here and 78 in the speed test, which ran text-only at 32K. Every step up in context costs it more experts on the CPU, and at 128K the RTX 3060 runs out of memory first: -ncmoe frees only the first card, so I had to move layers to the 4070 with -ts as well. At 256K the cache only fits in 8 bits, and llama.cpp's 8-bit cache slows down generation as it fills: 33 tokens per second after 121K tokens at 128K, against 50 with the 16-bit cache. A 1M cache would take 20 GB in 16 bits, more than the model leaves free on the cards. llama.cpp can also keep the cache in system RAM with --no-kv-offload; I did not try it, so whether that reaches 1M on this machine, and at what speed, is an open question.

Strata’s speed barely moves with the context size: 93–95 tokens per second at 64K, 92.5 at 256K and 87 at 1M, with the context empty. These come from one to three 400-token stories, not from the six-prompt median of the speed test, which is why they sit slightly above its 88.7; the six prompts of that test ranged from 87.2 to 93.1.

With the context full, Strata slows down less than llama.cpp: 75 tokens per second after 248K tokens, 64 after 504K. Suffix drafting played no part in these numbers. The prompts are repetitive log lines, which could feed a drafter that copies from the context, but the answers were free stories, and the engine logged 0 drafts in the answers after the long prompts at 256K and 1M (with the context empty, at most 3 accepted drafts per story).

How does the cache keep up? With --kv-resident 20480, each of the 10 attention layers keeps 20,480 cache positions in VRAM and the whole cache in pinned RAM: 1.3 GB at 256K, 5.2 GB at 1M. Qwen4's sparse attention does not read every position for every token: an indexer picks 2,048 compressed positions to attend to. During the 400-token answer after the 504K prompt, the engine counted 1,145,105 cache-block reads, of which 84% were in VRAM and the rest, 718 MB, came from RAM over PCIe.

I did not run a full 1M-token prompt. At 2,220 tokens per second it would take about 8 minutes; Strata’s own documentation reports a needle found in a 1,035,830-token prompt on three V100 cards.

A faster engine is only useful if the answers stay the same. Strata reads the same 4-bit weights, but with its own kernels and an 8-bit context cache, so I ran the private coding test of the earlier articles: twelve Python exercises with unit tests, up to 3,000 tokens per answer, temperature 0.2, thinking off. Here the test does not measure how good Qwen4 is at coding; it checks whether the two engines give the same model the same results.

After the two rounds of the speed series, Strata was five answers behind: 59 of 72 against 64. With 24 answers per configuration at temperature 0.2, that gap can be chance, so I ran four more rounds on both engines, on the same three configurations.

Over 216 answers per engine the difference is three, about 1.4 percentage points, on twelve exercises asked over and over. What the failures say about the model matters more than 86% against 87%: with each engine, 24 of the failures come from the same two exercises, the expression calculator (14 times with llama.cpp, 16 with Strata) and the wildcard matcher (10 and 8). The rest are the date calculator (3 and 5) and the Roman numerals (1 and 2). The 18/24 that Strata scored on the RTX 3060 in the series was followed by 43/48 in the four extra rounds, exactly what llama.cpp scored on the same card.

The time is the other half of the result: Strata needed 81% of llama.cpp’s time on the two cards, 43% on the RTX 4070 alone and 54% on the RTX 3060.

Strata can use Qwen4’s MTP head too, but its converter wants the 8-bit head published by Unsloth, and I had only the 4-bit head from ggml-org: the converter stopped with “gate experts are 12, not Q8_0”. So the Strata numbers here use suffix drafting at most, while llama.cpp’s best two-card number uses the MTP head. Strata with the MTP head is the next test, together with Basalt, the other engine of the last article: its Qwen4 package needs Basalt 0.7.0, which is not out yet.

Strata’s app and setup script can install Qwen4 by themselves. I did it by hand, following the recipe in Strata’s docs/QWEN4_35B.md, for two reasons: the setup script of earlier versions moved model files of my other Strata installations, which serve my chat, and an RTX 2080 Ti user had already reported running this exact file, ggml-org's Q4_K_M, with the same recipe.

The conversion took about a minute on the Xeon. The release notes list the Linux NVIDIA packages “as shipped” under “not run on a card yet”, and say that pictures were tested only on a Mac. On this X99, the package ran on Ada and Ampere cards without a problem, and the vision reader on the CPU described my test image correctly: the number 47, a red circle, a blue square and a green triangle.

Strata needs more of the machine than llama.cpp. It starts in 24–33 seconds instead of 6, and it keeps 40–52 GB of RAM busy: the expert arena, the 13 GB n-gram table locked in memory, and at 1M the pinned context cache. llama.cpp maps the file and leaves it to the page cache. On a machine with 128 GB of RAM that is no problem; on a 32 GB desktop it would be.

So on my X99 the choice depends on the job. For the highest speed I measured on short prompts, the RTX 4070 alone. For long context, the pair: it read 248K tokens in a minute and a half and kept generating at 75 tokens per second, which is why Qwen4 at 256K, or 1M when I need it, is now one of the engines of the chat on this machine.

Qwen4 on a 2014 Xeon Reaches 104 Tokens per Second: Strata Against llama.cpp was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.

── more in #ai-infrastructure 4 stories · sorted by recency
── more on @strata 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/qwen4-on-a-2014-xeon…] indexed:0 read:11min 2026-12-05 · —