Skip to content
/ airelien.dev
Go back
Aurélien AMSELLEM

Lucebox on Olares One — Episode 9: the PR that promised +57% and delivered +0.2%

Last night Lucebox crossed 88.5 t/s on Olares One and became the new champion. This morning PR #94 reports +57% on RTX 4090. If it scales, we hit 120 t/s. Spoiler: 88.7 t/s. Full DDTree sweep, three hypotheses, the honest lesson on upstream benches that don't reproduce.

Hi there.

Last night Lucebox crossed 88.5 t/s on my Olares One and became the new champion on this hardware, 0.5 t/s ahead of my vLLM Turbo. A narrow win, but an honest one. I closed the laptop happy. Then this morning, over coffee, I see this on the Lucebox-hub repo:

PR #94 — Support Qwen3.6-27B-DFlash draft (SWA layers) — 106 t/s on RTX 4090

106 tokens per second, on Ada Lovelace (RTX 4090). With a DDTree budget sweep showing +57% over the mismatched 3.5 drafter (from 67.4 to 106.1 t/s).

If that carries over linearly to my RTX 5090M Laptop, a consumer Blackwell chip (which has more bandwidth overall), we should hit 120-130 t/s on Olares. I’m expecting a nice gain tonight.

I’ll give you the result right away: 88.7 t/s, +0.2 over yesterday, within measurement noise. The rest of this post is how I looked for the reason.

Quick recap for newcomers

Lucebox (episode 1) is sandropuppo’s llama.cpp fork that does DFlash speculative decoding with custom CUDA kernels. The idea: a small model, the drafter, guesses several tokens ahead, and the big model checks them all in one pass and keeps the ones it agrees with. Lucebox adds DDTree, which turns the drafter’s proposals into a tree of candidates. The DDTree budget is how many candidate tokens from that tree the big model checks per pass: the bigger it is, the better the odds of keeping tokens, but the more each check costs.

The “mismatched 3.5 drafter” we’ve used since the start was trained on Qwen3.5, while we’re running Qwen3.6. It works, but with a middling acceptance rate (the share of guessed tokens the big model keeps). PR #94 finally publishes a drafter trained for Qwen3.6, plus Sliding Window Attention (SWA: some layers only look at the most recent tokens instead of the whole text), which should speed things up further.

On paper, that’s exactly the upgrade I was missing.

What the PR promises

Three changes:

  1. A drafter matched to Qwen3.6 instead of the 3.5 one: four SWA layers and one full-attention layer, instead of five full-attention layers. Layer types are read from the config.json sitting next to the safetensors.

  2. The SWA mask is wired through qwen3_dflash_graph.cpp via ggml_flash_attn_ext.

  3. The build flag DFLASH27B_ENABLE_BSA=ON turns on Block-Sparse-Attention (the PFlash path, but also useful for the drafter).

To find the right budget, the PR author ran a sweep: run the same bench again and again, changing only one parameter across a range of values, to see where the best setting is. Here’s their RTX 4090 sweep (budget on the left, generation speed on the right):

budget=6:   93.9 t/s
budget=10: 106.1 t/s ← sweet spot
budget=14:  96.5
budget=18: 102.7
budget=22: 103.5

The best setting is 10. That makes sense: a lower budget means less parallel checking, so fewer chunks to process, which suits cards with limited memory bandwidth.

The morning: the build

I rebuild a v1.6.0 image off this branch:

RUN git clone --depth 1 --branch feat/dflash-qwen36-swa-draft \
    --recurse-submodules \
    https://github.com/Quitetall/lucebox-hub /src/lucebox

RUN cmake -B build -S . \
    -DCMAKE_BUILD_TYPE=Release \
    -DGGML_CUDA=ON -DGGML_CUDA_NO_VMM=ON \
    -DCMAKE_CUDA_ARCHITECTURES="120" \
    -DDFLASH27B_ENABLE_BSA=ON \
    -DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath-link,/usr/local/cuda/lib64/stubs" \
    -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-rpath-link,/usr/local/cuda/lib64/stubs" \
    && cmake --build build --target test_dflash test_flashprefill_kernels -j$(nproc)

100 minutes of cross-compiling on OrbStack. The v1.6.0 image is 5.39 GB, against 4.17 GB for v1.4.0: the extra 1.2 GB are the BSA kernels.

First bench, default config

The chart’s default config (inherited from v1.4.4): --cache-type-k tq3_0 --cache-type-v tq3_0 --budget 22. In other words, a KV cache compressed with TQ3_0 (about 3.5 bits per value) and a DDTree budget of 22.

Run 1: 87.45 t/s
Run 2: 89.22 t/s
Run 3: 88.09 t/s

88.25 t/s on average. Same as yesterday (88.5), within noise.

My first reaction: so PR #94 does nothing? I check that it’s actually active. grep "SWA layers" source/safetensors_draft.cpp finds the function. cat /models/draft/config.json shows layer_types: [sliding × 4, full × 1], sliding_window: 2048, exactly what the PR expects. The relevant code runs.

But the diagnostic log [draft] SWA layers: 4/5 (window=2048) doesn’t show up in the test_dflash output. Either the code runs silently, or the log goes to stderr, which we don’t capture in kubectl logs.

My conclusion at this point: the PR is probably active, but with no visible gain here.

Noon: the PR’s official config

PR #94 documents a specific setup for the 106 t/s:

DFLASH27B_KV_K=q4_0 DFLASH27B_KV_V=q4_0 DFLASH27B_FA_WINDOW=0 \
  python scripts/run.py --budget 10 --max-ctx 4096 ...

Three differences from my config:

I patch with kubectl patch deployment (faster than shipping a new chart version) and run a full sweep: 6, 10, 14, 18, 22, 26, 30. Seven boots × 5 min + 30 s of bench, so ~40 min. I let it run while I do other things.

The afternoon: the full sweep

In this table, Status says whether the server held up (a 503 error means the daemon died and the server stopped answering), and the brackets give the min and max across runs:

BudgetStatust/s avg
6crash 503 on first request—
10crash 503—
14crash 503—
18OK84.8 [83.5-85.9]
22OK ← peak88.7 [87.5-89.4]
26OK then drop76.7 [75.5-77.5]
301 run OK then crash 50368.3 → unstable

The curve is dome-shaped, peaking at 22.

+0.2 t/s over my v1.4.4 baseline (88.5). Within measurement noise.

Three possible explanations

1. The Qwen3.6 SWA drafter doesn’t shine on short prompts

My Space Invaders prompt (I ask the model to write a Space Invaders game in HTML) is ~25 tokens. The drafter’s SWA optimizations (window=2048) only make a difference when the sequence the drafter sees is longer than the window. At 25 tokens, the drafter sees everything, like a normal full-attention layer.

The PR #94 RTX 4090 sweep probably used bench_he.py, which runs HumanEval, a benchmark where the model completes Python functions. The prompts there are longer, which fits the cases where SWA actually saves time.

To check, I’d need to retest with an 8K-16K token prompt. But the Space Invaders bench has been my standard since the start, and it’s representative of normal chat use.

2. The best setting depends on the GPU architecture

PR #94 on an RTX 4090 (Ada, sm_89): best budget 10, max 106 t/s. My Olares One, RTX 5090M (Blackwell, sm_120): best budget 22, max 88.7 t/s.

That’s a radical difference. And a higher budget means a wider batch to check, so more bandwidth consumed. On the mobile 5090M sm_120 we have 75% of a 4090’s bandwidth but only half the SMs (the GPU’s compute units), so the range where the verification batch fits without crashing is different.

The more likely hypothesis: with a q4_0 KV cache, memory per token is denser. With a low budget (6, 10, 14) there’s too much fragmentation and the daemon runs out of memory on the first request (503). Budget 22 is the point where there’s enough memory for the verification batch without crashing. From 26 up, the cost of verification takes over and speed drops.

That fits with my budgets 6, 10 and 14 crashing with a 503 while the PR’s RTX 4090 handles them. The desktop 4090 has more free VRAM once the model and drafter are loaded, probably because it doesn’t have HAMi vGPU on top.

3. PR #94 may not be finished

PR #94 is still open (May 4), not merged yet. If my test doesn’t reproduce the 106 t/s, it may simply be that the branch isn’t in its final state. Sandropuppo might have commits locally that he hasn’t pushed yet.

Worth watching. If the PR gets merged with a fix that changes things on sm_120, I’ll rebuild.

Where the day ends up

Plateau at ~88 t/s on Qwen3.6-27B / RTX 5090M / 24GB. Three different stacks land within 0.5 t/s of each other. The table gives each stack’s average generation speed on the same bench:

Stackt/s avg
vLLM Turbo (Genesis + TurboQuant K8V4 + MTP n=3)88.0
Lucebox v1.4.4 (tq3_0 KV + DDTree 22)88.5
Lucebox v1.6.0 (PR #94 + q4_0 KV + DDTree 22)88.7
buun-llama-cpp DFlash + Q8_0 drafter80
llama.cpp standard (no spec)33-36

To get past 90 t/s, I’ll have to wait for one of these upstream efforts:

None of these is usable today. 88 t/s is our practical cap on this hardware in late Q2 2026.

Lesson from this episode

Upstream benchmarks don’t all reproduce on every piece of hardware. PR #94 on a 24GB desktop RTX 4090 gives +57%. On a 24GB mobile Blackwell RTX 5090M, +0.2%. Same VRAM, same model, same quantization: the difference in GPU architecture and memory setup is enough to invalidate the claim.

Publishing negative results is as useful as publishing positive ones. Someone will read PR #94, see the announced 106 t/s and try to reproduce it on their 5090. This post saves them a 2-hour build and tells them where to look.

Next steps

That’s it! If anyone on a 5090M or another 24GB consumer Blackwell card reproduces these numbers, or finds the unlock I’m missing, I want to know how.


Disclosure — All the benchmarks in this post run on my own Olares One. If the content was useful and you’re considering one, ordering through this referral link gets you $300 off ($4,699 instead of $4,999), stackable with the $300 Black Friday discount starting November 17: $600 off in total ($4,399). I’m mentioning this out of transparency — and yes, incidentally, it helps keep the blog alive (hosting, domain, and the time I spend writing here).

Share this post on:

Comments