logoalt Hacker News

Qe – Qwen3.8-Flash-Next wrote its own inference engine, 2x llama.cpp

22 points • by haschka • today at 2:41 PM • 5 comments • view on HN

Comments

omucuarcu • today at 8:39 PM

I use Qwen 3.6 - 35B for my investing work; i run a 27-point checklist to analyze companies. Some of the checks are mechanical but most require judgment. Qwen 3.6 is the closest quality i get to Sonnet 5.5; and it's close enough to rely on. On the other hand, i've tested both Qwen 3.8 and Qwen 4.0 (this one, today), and they tend to be less reliable, their results are all over the place. And of course, slower, so I have to stick with 3.6 for my purposes.

Root_Access • today at 7:51 PM

When you start from the bottom and build only what you need these are the types of results you should expect every time.

Go to Root!

haschka • today at 2:41 PM

qe is a CPU-only inference engine for one model, Qwen3.8-Flash-Next, tuned for one machine: an Intel Core Ultra 7 265 with 128 GB of DDR5 and no GPU.

How it started: I used Qwen3.8-Flash-Next, running locally, to write an inference engine for itself. It got far enough to beat llama.cpp on my box. Then I worked on it with Claude, measuring and refining, with one goal: the fastest inference engine for this particular machine.

It's not a fork of llama.cpp and doesn't wrap ggml. The GGUF reader, quantized kernels, MoE router, attention indexer, draft head, vision tower and the OpenAI-compatible HTTP server are all in the tree, in plain C17. It links only libpthread, libm and libdl.

Numbers on my machine, same checkpoint, never resident at the same time as llama.cpp:

Numbers on my machine, same checkpoint, never resident at the same time as llama.cpp:

- Prompt ingestion: 87–93 tok/s vs 51 tok/s (1.7–1.8x) - Generation (greedy): 15.3–15.6 tok/s vs 7.65 tok/s (2.0x), still 14.5 tok/s at 128k context - Image encode (640x480): 1.0 s vs 2.1 s

Most of the speed comes from fitting the code to the hardware, not from clever generic kernels.

- The chip has 8 P-cores and 12 E-cores. Splitting work into equal slices meant a third of every decode step was threads waiting at a barrier for the slowest E-core. Handing out rows from an atomic cursor took generation from 10.9 to 15.6 tok/s. - AVX-512 is fused off on this die, so it's AVX2 + AVX-VNNI (vpdpbssd), with int8 activations reused across output rows. - At load time it requantizes the dense matrices to IQ4_NL and the Q6_K output head to Q8_0, because this CPU reads Q6_K slowly. The Q8_0 copy is 30% bigger and still faster.

➕ show 2 replies
t9tokenbudget • today at 3:17 PM

[dead]