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

Qwen 4 on Olares One — Episode 3: the q4-speed branch, prompts read 70% faster with nothing lost on generation

A day on Basalt's q4-speed branch: prompts read 70% faster but generation slower, then the hunt for the millisecond lost on every window (int8 layers too heavy for a laptop's memory bandwidth, a drafter left in BF16, a long-context fix lost along the way). The result: version 1.0.9 of the app, generating as fast as 1.0.8 and 13% faster after 200K tokens.

Hi everyone!

In episode 2, the Qwen4-35B-A3B app went from 271 to 520 t/s in one day, on anaelith, my fork of Basalt tuned for the Olares One. Version 1.0.8 wrote code at 520 t/s and held 200 t/s after 200,000 tokens of context.

The next day, Basalt’s author (jesdga95) had pushed more than 80 commits to main and opened a whole branch for Qwen 4 speed, q4-speed. I wanted to know what it would do on the One. By the end of the day, 1.0.9 read prompts 70% faster and generated as fast as 1.0.8, but it took three fixes to get there. Here it is in order, with the measurements.

Update (December 5, 5 pm): version 1.0.9 did not start in the app. I had built it on the upstream branch alone, without the anaelith patches the app needs. Version 1.0.10 replaces it and does better: details at the end.

First, a lesson in method

The One is a laptop, and its RTX 5090M heats up. Run two benchmarks back to back and the GPU clock drops from 2.1 GHz to 1.6-1.8 GHz. My first try showed the new version 12% slower. It was just the second benchmark running on a hot card.

Since then, every comparison alternates the builds (old, new, new, old) with a 90-second pause between runs, and I look at the cost of one generation window in milliseconds as much as at tokens per second.

main: nothing to gain

First try: 1.0.8 plus the 85 commits on main (0b319831). The result was a tie. The cost of a window didn’t move (11.4 to 11.6 ms on structured output), upstream’s NVFP4 drafter matched my FP8 one, and the new k8v5 KV cache format was slower with long contexts (171 t/s after 200K against 188).

One detail cost me some time: at temperature 0, the generated texts had changed. One of upstream’s numerical fixes shifts the results slightly, so the Space Invaders program the model writes isn’t the same anymore, and the drafter guesses it a little less well. Space Invaders dropped from 525 to 464 t/s for that reason alone. No new app version.

q4-speed: reading +70%, writing −10%

The q4-speed branch (169 commits, then 187 later that day) changes a lot: the dense projections move to int8 with an int8 matrix product on the tensor cores, kernels taken from NInfer for reading the prompt, the experts on tensor cores during generation.

First obstacle: it needs a pack with an int8 copy of the dense layers. With my pack, the engine crashed as soon as it read a prompt (hc_attn_down.weight has no int8 copy). The converter can add that copy to an existing pack (--splice) from the original checkpoint: 4 minutes from RadixArk’s NVFP4 checkpoint.

The result, alternating with 1.0.8:

1.0.8q4-speed
Reading a 16K prompt8,650 t/s14,630 t/s
Conversation307 t/s272 t/s
Code (Space Invaders)525 t/s413 t/s
Chat in French249 t/s211 t/s

Reading got 70% faster, but writing lost 5 to 15%, and writing is what matters for chat and code. The branch also reserves 3.9 GiB of VRAM for 64 concurrent requests. On a 24 GB card that pushes experts out, so I measured with --max-running 1.

The Reddit patch

The same day, a post on r/LocalLLM announced +17% on Qwen 4 with a Blackwell patch (the blackwell-builder-lab repository by CallitaCrushes), built on Maxrio9’s fork. I compiled and measured it: +1.3% on structured output on the One, nothing elsewhere. Its gains come from 4 and 8 concurrent requests on a desktop 5090, and its prompt-reading trick needs 9.8 GB of free VRAM, which a 24 GB card running this model doesn’t have.

Hunting the millisecond

Basalt’s benchmark splits a window’s time in two: verification by the model, and the rest (the drafter and the CPU’s work). With q4-speed, both had grown:

ms per window1.0.8q4-speed
Verification6.67.2
The rest1.31.8

Verification, +0.6 ms. The dense layers in int8 weigh 8 bits per weight, against about 6.6 in Q6_K. They’re read in full on every window: 1.68 GiB instead of about 1.4. On the laptop’s 896 GB/s, half a desktop 5090, that costs around 0.35 ms. Int8 wins big when reading a prompt, where the tensor cores work on thousands of tokens at once, but not when writing.

So I built a hybrid pack. It keeps both copies (--dense-i8 both), and a 13-line patch adds an option, BASALT_I8_DECODE=0: reading the prompt uses the int8 copy, generation keeps Q6_K. Verification came back to the 1.0.8 level. Tokens per second didn’t move.

The rest, +0.4 ms. That was the drafter. In q4-speed, the engine runs the DFlash 2 drafter in whatever format the pack stores it (commit fdc96f62). The old option that rounded it at load time is gone. My pack stored the drafter in BF16, so q4-speed ran it in BF16.

The fix took ten minutes. The undo directory kept when I attached the drafter lets me take it out of the pack cleanly. I put it back with q4-speed’s converter, which rounds it on the way (NVFP4 for the big matrices, Q8_0 for the rest). The section goes from 0.8 to 0.43 GB, and the rest drops back to 1.3 ms.

With both fixes, a window costs exactly what it cost in 1.0.8, even 2% less on structured output, and reading keeps its +69%.

The full-disk interlude

Between two benchmarks, Olares refused to restart an app: “Insufficient disk space”. The data disk was at 94%, full of my test packs and a re-downloaded checkpoint. Olares’ code (validate.go) refuses a start when the used space plus what the app asks for goes past 90% of the disk, and it reads those numbers from Prometheus, a few minutes late. I deleted 133 GB of test files, waited for the metrics to catch up, and we were back.

one-079: catching up on long context

For the final build, I took the latest q4-speed, merged main (for two vision fixes), and added two open pull requests:

Long context then showed a gap: after 64K tokens, generation fell to 196 t/s, against 222 in 1.0.8. I knew that symptom, it’s the mystery from episode 2. My 1.0.8 fix (keeping ready the mode where the GPU plans the experts that left VRAM by itself) lived in my fork and didn’t exist in q4-speed. I ported it, with a single conflict to resolve:

Context set to 1M1.0.8one-079one-079 + fix
Generation after 64K222 t/s196220
Generation after 200K185 t/s190198

With the app’s exact arguments, it even reaches 227 t/s after 64K and 209 after 200K. The app accepts 64 concurrent requests, and q4-speed reserves 4.5 GiB of VRAM for them, so a few experts stay in RAM even with a short context. That’s where the −2% on short answers comes from. I kept that setting because DeepSeek Harness often sends several requests at once.

Version 1.0.9

1.0.81.0.9
Reading a 16K / 64K prompt8,760 / 8,430 t/s14,850 / 14,410 t/s
Generation, conversation / structured / prose307 / 630 / 259 t/s301 / 646 / 263 t/s
Eight code prompts, mean445 t/s436 t/s
Generation after 64K222 t/s227 t/s
Generation after 200K185 t/s209 t/s
Reading from 64K to 200K tokens27 s15 s

The −2% on code mostly comes from upstream’s numerical fixes, which change the text written: the previous day’s main already lost 3.4% on these same prompts.

The update needs a new 44.3 GiB pack, with the drafter rounded and the int8 copy (revision 15029be7). The upload to Hugging Face took only 2 minutes: Hugging Face’s chunk storage recognized almost all of the previous pack. The engine is the aamsellem/basalt:0.6.2-anaelith.15-cuda13 image, built from anaelith’s one-079 branch. The “Anaelith Qwen4 35B-A3B” app 1.0.9 is on the market.

1.0.10: 1.0.9 did not start

An hour after the release, the app refused to start: “—crash-resume is not an engine flag”. one-079 started straight from upstream’s q4-speed branch, with only the four patches I had picked onto it. It lacked anaelith’s other 68 commits, among them --crash-resume (the app’s launcher restarts a crashed engine and resumes the answer in progress) and several tool-call fixes DeepSeek Harness depends on. My measurements called basalt serve without the app’s launcher, so nothing flagged it.

Version 1.0.10 starts again from my fork: one-080 is one-077 with q4-speed and main merged in, plus the 1.0.9 patches. Only four files conflicted, all around the drafter’s weights, and I kept q4-speed’s version since the pack now stores the drafter rounded. The pack is the 1.0.9 one, so nothing to download again. With our patches the drafts are longer and 1.0.10 beats 1.0.8 everywhere:

1.0.81.0.10
Prompt read, 16K / 64K8,760 / 8,430 t/s14,820 / 14,200 t/s
Decode, conversation / structured / prose307 / 630 / 259 t/s333 / 646 / 274 t/s
Eight code prompts (app settings)445 t/s453 t/s
After 64K / 200K tokens222 / 185 t/s215 / 185 t/s

Lesson noted: every anaelith release is built by merging upstream into the fork’s previous branch, and tested with the app’s exact command and a tool call before it goes on the market.

What went nowhere

Next in the saga

Enjoy!


Disclosure — All 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 that started 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