Jake's Garage
← All projects
Electronics

Local AI Server, Part 2: Engines and a Real Coding Test

This is a follow up to my first AI server post. The hardware hasn't changed. What changed is the software: a new main model, three different inference engines (the programs that actually run the model), and a real coding benchmark to find out whether the faster ones give worse answers.

The Minisforum MS-S1 MAX mini workstation with its diamond-mesh front panel
Same box, very different software.

The new main model

My main model is now Qwen3.8 Flash-Next. It's a mixture of experts (MoE) model with 125B parameters in total, but only about 6B of them are active for each token. That's why it's fast on this box: the memory has to hold all 125B, but each token only has to read a small slice of them.

I'm running the Unsloth UD-Q4_K_XL quant (a compressed version of the weights) plus an MTP file. MTP stands for multi-token prediction. It guesses a few tokens ahead and the main model checks all the guesses in a single pass, so right guesses come almost free.

The context window is 262,144 tokens. That mattered more than I expected. My coding agents used to keep stopping to compact their history, and now they mostly don't.

Same model, three engines

I tried the same model on three engines. llama.cpp is the one I used in part 1. Gufo is open source. Halogen is free but closed source, and it uses its own converted copy of the weights rather than my GGUF file.

I gave each engine the same two prompts: one asking it to write code, and one asking it to summarize a 17,000 token source file. The numbers are tokens per second. "Reading" is how fast it chews through the prompt, and "writing" is how fast it generates the answer.

EngineWriting codeReading 17k promptWriting after 17k
llama.cpp (Vulkan)4743132
Gufo 0.36741,93251
Halogen on the same file651,695n/a
Halogen on its own v2 weights992,31971

Gufo writes about 57% faster than llama.cpp on the same file, and it reads long prompts 4.5 times faster. The reading speed is the part that matters most for coding agents, because they keep feeding the model big chunks of code.

Halogen is only the fastest on its own weights. On my file it comes in below Gufo, which its developers say is expected.

Is faster also worse?

Halogen's own weights aren't the same file I use everywhere else, so a speed test isn't enough. I needed to know whether the answers got worse.

For that I used Aider Polyglot. The model has to edit code to solve programming exercises, and real unit tests decide whether it passed. If it fails, it gets one retry with the test errors in front of it. I ran the Python and Rust exercises, 64 in total, with thinking off.

Someone on the Halogen Discord suggested using Qwen's recommended sampling settings, so I ran that. Then I ran it a third time with one setting changed.

RunFirst tryAfter retrySeconds per exercise
Gufo, temperature 048.4%84.4%54
Gufo, Qwen settings39.1%75.0%76
Gufo, Qwen settings, no penalty48.4%79.7%58
Halogen, temperature 046.9%75.0%43
Halogen, Qwen settings37.5%75.0%53
Halogen, Qwen settings, no penalty46.9%81.2%49

The setting that cost 9 points

Qwen's recommended settings include a presence penalty of 1.5. That pushes the model away from words it has already used, which is great for chat because it stops rambling and repeating itself.

Code is different. Code repeats on purpose: variable names, keywords, and in this benchmark the edit markers the model has to reproduce exactly. With the penalty on, both engines dropped about 9 points on the first try, and Gufo also got longer and slower. With the penalty set back to 0, both bounced back.

If you run a coding agent on a local Qwen model, check that the presence penalty is 0.

I also checked a claim I'd seen, that Gufo quietly adds its own penalty when thinking is off. It doesn't. I asked it to write the same word 40 times with the penalty at 0, at temperature 0 and at 0.7, and it wrote it 40 times every time.

Why I stayed on Gufo

With the penalty fixed, the two engines are basically tied. A difference of a few exercises out of 64 is run to run noise, not a real gap. Halogen is 15 to 20% faster per exercise.

Gufo stays for daily use anyway. It's open source, it runs the same model file I already use, and it's wired into my switching script and my systemd service. I'll retest if Halogen ships higher precision weights.

What went wrong this time

I froze the whole server once. I started Gufo in a terminal session and then closed the session, but the container kept running. Then I started llama.cpp, and both of them loaded a big model into the same memory. SSH stopped answering. Now the switch script stops both engines and waits for the GPU memory to be free, and the services are set up so that starting one stops the other.

The second problem was slower to notice. My overnight coding agent runs were bottlenecked by my Chromebook's CPU, which was running the tools and builds, not by the model. I moved the agent onto the server under its own user, with a memory limit and no admin rights.

What's next

A thinking mode run of the same test, overnight.

I'm also watching for Qwen4. Qwen4 Max is API only, but AMD posted kernel work for a smaller Qwen4 35B with about 3B active parameters. That would fit in this box many times over and should be very fast once the engines support it.