A 262,144-token context window on three V100s: long prompts read at half speed until the RAM copy of the experts grew
Raising Strata's context limit from 65,536 to 262,144 tokens on three Tesla V100s slowed a 40,456-token cold read from 24.9 s to about 43 s. The engine's own start-up log showed the cause: about four in ten of the expert slots it borrows for prompt processing had no copy in system RAM, and it streamed them from the model file. Raising the RAM budget for experts from 16 to 24 GiB brought the same read to 21 s. A newer engine build then kept every expert on the GPUs and generated faster.
Setup
- Model: Qwen3.8-Flash-Next, Unsloth UD-Q4_K_XL, 5.0 bpw, 111 GB file, 177 billion parameters.
- Server: Dell R740, 2 × Xeon Gold 6132 (28 cores), 3 × Tesla V100 32 GB (96 GB of VRAM), PCIe 3.0, 144 GB of RAM.
- Engines: Strata engine 0.1.57, then engine 0.1.64 from Strata 0.2.18. We built both from source.
- Settings held constant: four request slots, 16-bit KV cache, 32,768 KV cells per layer in VRAM with the rest in 2.00 GiB of pinned RAM, draft model on.
- Settings changed: the context limit (
--max-context) and the RAM budget for experts the GPU cache does not hold (--resident-budget-gib).
262,144 tokens is the model's trained maximum.
Method
Each configuration had one cold start. The test prompts were the same in every configuration:
- Two documents of about 40,450 tokens and one of 96,559 tokens, each with 20 made-up codes we planted in it. We asked the model to return all 20. Each read was cold, and we reused nothing from the cache.
- Two 1,200-token generations for speed, the second reusing the first's input.
- We read each of 45 short prompts for a single token with its top 20 probabilities, to compare output between engines.
Results: reading long prompts
| Engine | Context limit | RAM budget | 40,456 and 40,452 tokens | 96,559 tokens | Experts on the GPUs |
|---|---|---|---|---|---|
| 0.1.57 | 65,536 | 16 GiB | 24.9 s (1,622 tok/s), one read | not run, over the limit | not kept |
| 0.1.57 | 262,144 | 16 GiB | 42.1 to 43.6 s (929 to 961 tok/s), three reads | 88.5 s (1,091 tok/s) | 88% |
| 0.1.57 | 262,144 | 24 GiB | 21.0 and 21.2 s (1,904 and 1,927 tok/s) | 39.2 s (2,461 tok/s) | 88% |
| 0.1.64 | 262,144 | 24 GiB | 20.6 and 19.2 s (1,960 and 2,111 tok/s) | 45.0 s (2,144 tok/s) | 100% |
All three documents came back with 20 of 20 codes right on both engines at 262,144 with the 24 GiB budget.
Where the time went at 16 GiB
At 262,144 tokens with the 16 GiB budget, engine 0.1.57 printed this at start-up:
WARNING: 1639 of the 4151 borrowed slots have no RAM copy: their experts are streamed from the model file during every chunk
With 24 GiB the warning did not appear, and the 40,456-token read took half as long. Engine 0.1.57 reported 88% of the experts resident on the GPUs in both cases, so the RAM budget did not change what the cards held. It changed where the rest came from.
We did not keep the start-up lines of the 65,536-token run, so we cannot say from the log how many experts the cards held at the smaller window.
Results: the newer engine
Engine 0.1.64 reported 100% of the experts resident on the GPUs with the same settings. Its RAM copy had 0.14 GiB of experts to hold, against 8.69 GiB on engine 0.1.57.
| Measure | Engine 0.1.57 | Engine 0.1.64 |
|---|---|---|
| Generation, 1,200 tokens, four runs | 82.9 to 88.9 tok/s | 90.0 to 94.8 tok/s |
| Reading 5 new tokens after a cached prompt | 318 to 473 ms | 60 to 214 ms |
| VRAM in use after the tests, per card | 31,616 / 31,578 / 31,862 MiB | 31,208 / 30,394 / 31,558 MiB |
The 96,559-token read was slower on the newer engine: 45.0 s against 39.2 s. Each is a single read.
Output agreement
We compared each engine with a reference run: engine 0.1.64 with its fast path switched off (--short-read 1024). We used the top-20 first-token probabilities on 45 prompts, restricted to tokens both runs list and renormalised.
| Run against the reference | Same first token | Mean KL | Median KL |
|---|---|---|---|
| Engine 0.1.57 | 39 of 45 | 0.034 | 0.015 |
| Engine 0.1.64 | 43 of 45 | 0.023 | 0.014 |
The newer engine is not further from the reference than the older one. The reference is the newer engine's own exact path, which favours it. The prompts end mid-word, which makes first-token distributions flat and the differences larger than on ordinary prompts.
Limits
- One cold start per configuration, and one to three reads per figure. There is no run-to-run spread.
- The 65,536-token baseline is a single read we took on the server before the trial began.
- On engine 0.1.57 with the 24 GiB budget, the engine warned that half of one slice of the RAM copy landed on the wrong NUMA node. Reading speed was as shown.
- Recall of planted codes is a check that the model reads long prompts at all. It is not an accuracy benchmark.
- Nothing here measures prompts longer than 96,559 tokens. The 262,144 limit was set, not filled.
Open questions
- Reading speed and recall between 100,000 and 262,144 tokens.
- Why the 96,559-token read was slower on the newer engine.
- Whether the NUMA placement warning costs speed when it appears.