Full 262K context on a mismatched dual-GPU desktop
How a 27B model went from 9.7 to 80 tokens per second near full context, what failed, and how each result was measured.
Summary. This is a record of tuning large local models on one desktop with two very different GPUs. The target was the full native window of 262,144 tokens, with speed measured near full rather than at the start of a session. Decode for Qwen3.8 27B at 225K tokens rose from 9.7 to about 80 tokens per second on the main GPU, and to about 60 with both GPUs on a larger, more accurate quant. The largest gains came from kernel coverage, memory placement and session handling. Most of the ideas aimed at raw parallel speed failed. The two-GPU gain that did work came from sending less data over the link, not from sending it faster.
The models and the results
| Model | Setup | Session start, decode / prefill | Near full (225K), decode / prefill |
|---|---|---|---|
| Bonsai 2 27B Abliterated v2 | PQ2_0 + trained draft head, 5070 Ti, images on the 3050 | 109.8 / 2019 → 122.9 / 2279 | 63.2 / 853 → 87.7 / 1615 |
| Huihui Qwen3.8 27B (uncensored) | GSQ-RCO IQ3_S, auto two-GPU | 57.6 / 1662 → 99.2 / 2072 | 9.7 / 624 → 61.6 decode |
| Qwen3.8 27B Turbo Brilliance (official weights plus prompt modes) | GSQ-RCO IQ3_S, auto two-GPU | 57.6 / 1662 → 104.9 / 2073 | 9.7 / 624 → 60.0 / 1107 |
| Qwen3.8 27B TURBO Cold Fusion (uncensored fine-tune) | Custom IQ3_S, auto two-GPU | 57.6 / 1662 → 99.2 / 2097 | 9.7 / 624 → 57.6 decode |
All four run the full 262,144-token window. For the Qwen rows, "before" is the setup this project started from: a 13.3 GB Qwen3.8 27B fine-tune with KV streamed to host RAM. For Bonsai, the start-of-session "before" is the best earlier Bonsai card, and the near-full "before" is the first measurement of the same build.


1. Hardware and constraints
| Part | Detail |
|---|---|
| Main GPU | RTX 5070 Ti 16 GB, Blackwell, 70 SMs, PCIe 4.0 x16, ~896 GB/s memory |
| Second GPU | RTX 3050 8 GB, Ampere, 20 SMs, PCIe 3.0 x4 through the chipset and a riser |
| Link | ~3 GB/s between GPUs, staged through host memory, no peer-to-peer |
| Host | Ryzen 5 5600X, 64 GB DDR4-3200, 850 W supply |
The rules were simple: never shrink the window, keep one best configuration per model, and make the second GPU earn its place. A 16 GB card is tight here. At 4-bit KV, 262K tokens need about 4.6 GB, so only about 10.4 GB remains for weights.
2. Method
Each test ran on a fresh server, with a fixed prompt and a fixed output length.
- Speed: a 225K-token prompt, then 450 greedy tokens.
- Correctness: a planted secret code must be recalled from deep in the context, and greedy output is compared byte for byte where the change should be exact.
- Accuracy: KL divergence and same-top-token rate against a Q8_0 reference, over 36 chunks of 1,024 tokens of prose and code.
- Qualification: story speed, a tool call, recall at long context and the output limit.
- Decode: time per verify step whenever output text changes. Raw tokens per second can mislead (section 6).
3. How it progressed
| Setup at 225K tokens | Decode tok/s | Prefill tok/s | 225K prompt |
|---|---|---|---|
| Starting point: KV streamed to host RAM, one GPU | 9.7 | 624 | 411 s |
| First two-GPU split, 11 layers on the 3050 | 42.0 | 584 | 396 s |
| Qwen3.8 27B IQ3_S auto, 4 layers on the 3050 | 60.0 | 1107 | 174 s* |
| Qwen3.8 27B IQ3_XXS, main GPU only | 80.3 | 1509 | 154 s |
| Bonsai 2 27B, main GPU, images on the 3050 | 87.7 | 1615 | 144 s |
* Uses the fast prefill step from section 4.5, so most of that prompt is read on one GPU. IQ3_XXS was fastest near full, and IQ3_S won on accuracy and on using both cards.
4. What worked
4.1 Separate what is read always from what is read sometimes
Weights are read on every token. KV is read only as far as it has filled. So attention and KV belong on the slow GPU, and everything else stays on the fast one. Moving whole layers cost more: four full layers gave 44.3 decode, while four attention-and-KV moves gave 48.5.
4.2 An INT8 kernel gated by a comment
The fast INT8 prefill kernel in the feveromo fork only ran on Blackwell, marked as "only tested" there. Changing the gate let it run on Ampere with no other change. A 225K prompt fell from 642 s to 396 s, with byte-identical greedy output.
Later the same kernel was ported into the PrismML fork for Bonsai 2 27B, since both models share one attention shape. Prefill at 223K rose from 1,133 to 1,610 tok/s, 42%. Same-top-token rate against F16 attention was 99.28%, against 99.19% for the old path.
4.3 Choosing the quant by measurement
| Official weights | Size | KLD vs Q8_0 | Same top token |
|---|---|---|---|
| GSQ-RCO IQ3_S | 12.12 GB | 0.0481 | 92.77% |
| GSQ-RCO IQ3_XXS | 10.44 GB | 0.0874 | 90.40% |
| ByteShape IQ3_S | 11.04 GB | 0.0916 | 90.22% |
| ByteShape IQ3_XS | 10.35 GB | 0.1215 | 88.85% |
IQ3_XXS was the first quant that fit the full window on one card, and it nearly doubled near-full decode. IQ3_S is about 1.8 times closer to the reference but needs the second GPU past ~188K tokens. It's the deployed choice for that accuracy and for using both cards.
4.4 Draft tuning differs by model
Speculative decoding needs tuning per model and per mode. On Bonsai 2 27B at 223K, draft lengths of 5, 3, 2 and 1 gave 50.2, 63.2, 70.3 and 78.4 decode. On Qwen3.8 27B, adaptive drafting with a reduced vocabulary won on one GPU, and fixed length 2 won on two. Limiting the draft head's KV to the last 16K tokens freed 0.37 GB and raised Qwen prefill by 5%. Every draft is still verified by the full model.

4.5 Long sessions
Agents care more about re-reads than about peak speed. With 8 context checkpoints and a 16 GB RAM cache, returning to a main conversation after a sub-agent went from 77.6 s to 2.7 s in a simulated session.
The automatic switch between one and two GPUs needed three fixes:

- State transfer. A slot restored in a new process has no checkpoints, so any tail mismatch forced a full re-read. Reading the new prompt on the faster one-GPU engine first, then switching, cut the crossing turn from 202 s to 59 s.
- Small requests. A title or sub-agent request used to drop the session back to one GPU and lose it. Going down now waits for 30 idle minutes. At about 236K, a return from a sub-agent takes 7.6 s.
- Rollback. Saving checkpoints beside the slot file lets a later prune re-read only the tokens after the edit: about 70K tokens in 91 s, with 129K kept.
4.6 Send only what the other GPU needs
The largest two-GPU result came from a suggestion to send only what changes, rather than everything on every step. Timers in the scheduler replaced the earlier hop-count estimate. A 512-token prompt batch at 223K took 509 ms, and 91 ms of that, 18%, was copying between devices.
- The attention mask is a formula. In a single linear conversation the mask only says that a token can see earlier positions. It was still built on the CPU and copied as 226 MB per batch. The INT8 kernel now generates it from the batch's start position, so the copy fell from 44 ms to 0.2 ms.
- One extra crossing per layer. Each attention layer on the 3050 sent back both its residual and a normalized copy. Running the residual add and norm on the 5070 Ti means only the attention output returns. That cut hidden-state copies from 47 ms to 32 ms per batch.

Two-GPU prefill near full rose from 974 to 1,107 tok/s, and output stayed byte-identical in a 34K comparison. Decode didn't move, because verify steps spend only about 4% of their time on transfers. Bonsai gained about 2% from the same mask change.
5. What failed
| Idea | Result | Why |
|---|---|---|
| Layers on the 3050 moved to the end of the model | 973 vs 975 prefill | The wait moved with them |
| Pipeline parallelism, forced on | 993 prefill at best, +2% | A full sync before each batch had cancelled it, and interleaved layers still can't overlap |
| Output head on the 3050 | 53 decode near full, 59 at session start | The draft head reads it on every step, over the slow link |
| Tuned verify kernel on the 3050 | No change in ms per step | 3050 memory bandwidth is the limit |
| Fused norm kernel at width 5120 on Bonsai | 19.3 ms per step on and off | Already at the memory limit |
| Larger logical batches | Flat prefill, lower decode | Per-batch cost wasn't the bottleneck |
| Draft model instead of MTP | +1-3% decode, -17-25% prefill, +1.4 GB | Low acceptance on fine-tunes |
| 3050 at +200/+2500 | Output changed at depth | Silent memory errors, caught by the byte-identical check |
6. Measurement lessons
Raw tok/s lied. Unlocking one verify kernel appeared to add 12% decode, repeatably. Output text had shifted slightly, and that run accepted more drafts. Time per verify step was unchanged at 32.3 ms. The same trap made one quant look 20% faster.
Byte-identical output catches what recall tests miss. It rejected a memory overclock that looked stable.
Check that two files really differ. One community quant release had tensors identical to the official quant, with only a new prompt template.
Estimates failed often. Several gains predicted from code reading came to nothing once measured. Three blocks stacked on the same effect, and removing them one at a time showed no gain until the last.
A hop-count estimate was badly wrong. It put transfers at 0.5% of two-GPU time. Measurement showed 18% during prefill.
Reliability also counts as a result. The main GPU dropped off the bus twice at +250/+1500, each time under sustained load, about 9 and 12 hours into testing. Soft reboots after those drops hung and needed a physical power cycle. The core offset is now +150. A chipset watchdog was added as a safety net, but it hasn't been shown to reset this board: the distribution blocks its driver at boot, and the driver stops the timer when a reboot begins.
7. Limits
Near-full decode now looks bound by memory bandwidth. Bonsai's 19.3 ms per step matches another 5070 Ti user's figure of about 19.4 ms. With layer splitting, the 3050's memory sets the two-GPU step at about 32 ms against 27 ms on one card. True parallel attention would need tensor parallelism or a KV split by position, and neither was shown to help on this link. The one-GPU phase and the session handling are where this hardware pays off, and the second card's most reliable contributions are extra KV capacity and images in 3 s instead of 32 s.