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

Qwen 4 on Olares One — Episode 2: from 271 to 520 t/s in one day, and an uncensored version

Eight releases of the Qwen4-35B-A3B app in one day: the move to anaelith, the n-gram table in RAM, the DFlash 2 drafter fixed and then made twice as light, the long-context slowdown traced and fixed in the engine, a long system prompt reused in 0.05 s, and an uncensored version built without downloading 114 GB. Plus the ideas that went nowhere.

Hi everyone!

In episode 1, Qwen4-35B-A3B ran on the Olares One with Basalt’s Qwen 4 pull request: 271 t/s in conversation, 342 on structured output, and a million tokens of context on the 24 GB card.

Nine hours later, the app was at 1.0.8. Code now comes out at 520 t/s, a long system prompt is reused in 0.05 s instead of 7.8 s, and an uncensored variant is on the market. I’ll go through the day in order, with the measurements, failed attempts included.

1.0.0: on the market, in Router

The first release of the app ran on Basalt as is, with my pack (aurel92/Qwen4-35B-A3B-Basalt). Like my other model apps, it goes through Model Console: Olares Router lists it, and Lares, DeepSeek Harness or any app on the Olares can call it without a key. Text, tool calls, images and video.

anaelith: the same speed as Basalt

anaelith is my Basalt fork, tuned for the One. I merged the Qwen 4 PR into it, built it on the One, and ran the bench against Basalt, same settings, two alternating passes each:

ConversationStructured outputProse
Basalt266-267334-340230-242
anaelith265-268349-369240-244

A tie in conversation. The few percent on structured output looked like a gain until a second bench showed the draft acceptance rate jumping between 75 and 84 % from one pass to the next, on both engines: noise. So on this model the fork isn’t faster by itself. Its use here is crash recovery: if the engine goes down mid-answer, it restarts and the answer carries on, with no error on the client side.

First gain: the n-gram table in RAM

The 20-billion n-gram table weighs 20 GB. By default the engine reads it from the SSD as it goes. With --ple-io ram, it loads it into system memory at startup (a few seconds):

ConversationStructured outputProse
Table on the SSD267-270325-350228-244
Table in RAM280345-351245-255

+4 to 7 %, for about 49 GB of RAM used by the engine, which fits on a One with 96 GB. That’s 1.0.1.

What didn’t work yet

The same day, I tried everything the engine offered:

Basalt fixes DFlash 2

In the afternoon, about forty Qwen 4 commits landed in Basalt. Among them, a bug: DFlash 2 was reading the wrong internal values from the model. It had been trained on the input of the layer after each layer it watches, and Basalt was giving it something else. Once it was fixed, I measured it again on real prompts, with 1,500-token answers in deterministic output:

PromptMTPDFlash 2, fixed
Space Invaders in one HTML file372470
A JSON array of 40 customers357496
An explanation in English (B-tree)302335
A pytest test file305-320330-342
A trip plan, in French251214

Huge on code and JSON, losing on French. The drafter guesses badly in languages it has seen little of. I made it the default (1.0.5), with --drafter mtp for those who mostly chat in French.

That took a new pack with the drafter inside. Re-uploading 46 GB to Hugging Face took one minute: its storage splits files into chunks and only receives the ones it doesn’t already have. One small discomfort: RadixArk’s drafter repository shows no license. The pack cites it as a source.

Where the drafter’s time goes

To go further, I had the engine log every verify window: its size, the tokens kept, the time spent. A window costs 6.3 ms as a base, plus 0.7 ms per token verified. The DFlash 2 drafter pass adds 2.35 ms to every window, against 0.7 to 1.1 ms for MTP. In French, where it keeps only 1.9 tokens per window, that cost is what makes it lose.

Of those 2.35 ms, the output head takes 0.88, because the drafter scores its candidates over the 248,000 tokens of the vocabulary. Its MLP layers take 0.68: their 395 million parameters are read in BF16 every time. Launching the kernels costs only 0.25 ms, so a CUDA graph, my first idea, wouldn’t have changed anything.

1.0.6: the drafter, twice as light

Two changes in anaelith:

The pass goes from 2.35 to 1.20 ms. Since the model verifies every proposed token, the answers don’t change: on five prompts, the text is identical to the character.

Prompt1.0.51.0.6MTP
Code (Space Invaders)460518353
JSON497542352
English prose338388303
A Rust module with made-up identifiers375425—
Trip plan in French215249251

French catches up with MTP: no more need to pick a drafter.

That same evening, Basalt made the same head lighter another way: a 2-bit copy of the whole head sorts the candidates, then only the best are scored exactly. Measured against mine, it ties within 1 %. I kept their version, to stay close to upstream, and added FP8 on top (+4 to 5 %).

The long-context mystery

After a 64,000-token prompt, the app dropped to 178 t/s. After 200,000, 171. I first blamed attention, which has to reread a huge context. The profile said something else: its indexer costs only 0.12 ms per window at 4K tokens, 0.50 ms at 200K.

The culprit is the “elastic” KV cache. It grows with the conversation by taking the place of a few experts, which leave VRAM. And the engine has three modes for its MoE layers:

The second mode was only set up if experts were missing at startup. On the One everything fits at first, so when the KV pushed experts out, the engine fell straight into the third mode: about 1.9 ms of waiting per window.

A first workaround, in 1.0.7: --expert-cache 10200 keeps 40 of the 10,240 experts in RAM from the start, which turns on the right mode from the beginning.

After a prompt of1.0.61.0.7
64,000 tokens178 t/s233 t/s
200,000 tokens (context set to 1M)161 t/s207 t/s
700,000 tokens118 t/s142 t/s

At a price: −2 to 3 % on short answers, and temperature-0 answers that no longer repeat exactly. The engine swaps experts all the time, and the CPU doesn’t round like the GPU.

The fix came in 1.0.8, in the engine: the “planned by the GPU” mode is now set up even when everything fits at startup, and it takes over as soon as an expert leaves VRAM. My first version crashed the engine right at the switch: the graph that finishes each window is captured once, and it deferred part of the work. The second one finishes everything at once in that case. It gives 221 t/s after 64K, 200 after 200K and 135 after 700K, and short answers get their speed and their repeatability back. I also tested it alternating long and short conversations, and with two 40K requests at once, without a single error.

0.05 seconds to reread 60,000 tokens

Another Basalt change merged in 1.0.8: a new conversation that starts with the same long system prompt as an earlier one reuses it instead of reading it again. Agents like DeepSeek Harness do that at every session. Through Router, with a 60,000-token system prompt, the first token arrives in 0.05 s instead of 7.8 s.

The ideas that went nowhere

I also tested or costed four ideas and dropped them:

An uncensored version, without downloading 114 GB

Around 11 pm, I was asked for OpenUncensored’s version. Their method: a “directional ablation” that removes a rank-2 refusal direction from 78 tensors. By their measure, refusals fall from 97 to 2 out of 100 requests, with no MMLU loss. They only publish BF16, 114 GB, and my One no longer had the room.

They also publish a 138 MB LoRA, which is the exact form of their edit. So I applied it straight to RadixArk’s NVFP4 checkpoint, 47 GB:

There was a trap: PEFT lays out the experts differently in the LoRA’s two matrices. Rows of A by expert, columns of B by rank. My first guess was wrong, as the correlation with the real weights showed: 0.06 for the wrong reading, 0.998 for the right one.

On 8 borderline requests, each asked 3 times (a question on Tiananmen, a violent scene for a novel, picking one’s own padlock, a dark joke, a phishing example for a training session…):

Stock Qwen4Uncensored version
Refusals8 / 240 / 24

On Chinese politics, where the stock model recites the official line or refuses, the uncensored version answers: it explains Tank Man, it writes the satire on Xi Jinping. Some official vocabulary remains on Xinjiang, and cautious figures on Tiananmen.

It’s a bit slower on code (435 t/s against 522): DFlash 2 was trained on the original model and guesses this one less well. The pack is on Hugging Face, and the “Anaelith Qwen4 35B Uncensored” app is in the market’s Uncensored category.

The day in numbers

Space Invaders through Olares Router, on the Olares One (1.0.0 wasn’t measured this way):

VersionWhat changesCode, deterministic output
1.0.2anaelith, table in RAM, upstream fixes377-380 t/s
1.0.5DFlash 2 fixed473 t/s
1.0.6Drafter in FP8, reduced head541-546 t/s
1.0.8Long context fixed in the engine, system prompt reused534-536 t/s

And at long context, from 161 to 200 t/s after 200,000 tokens.

On the market side, along the way, I tidied the store: eight categories, an Archive category for the 29 outdated apps, and a Discover page like the official source has. DeepSeek Harness now runs on Qwen 4, with its million tokens of context.

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