Repository navigation
QEngine 1.7.0
A release with a new model, Qwen4-35B-A3B (one 24 GB card or two, with or without GPU P2P), faster Flash-Next decoding of several conversations at once, a Flash-Next fix for FLASH_COMM=ce, stricter checks of 27B checkpoints at load, an import tool for AutoRound / GPTQ / compressed-tensors 27B checkpoints, and activation steering on DeepSeek-V4.1-Flash, GLM-5.3-Flash and Inkling-2-Mini; everything from 1.6.2 is in it (1.6.3 was never published; its changes are part of 1.7.0). latest, vision and the main branch move here.
docker pull ghcr.io/bpx03/qengine:latest # = 1.7.0, text only
docker pull ghcr.io/bpx03/qengine:vision # = 1.7.0-vision, with the image encoderFrom source: git fetch --tags && git checkout v1.7.0, then rebuild.
New model: Qwen4-35B-A3B
- Mixture of experts, 35B parameters, about 3B active per token. Runs on one 24 GB card or two cards (tensor parallel decode; P2P not required). Context 262K by default.
- Two checkpoints: A (dense layers INT8, next-token KL 0.088 against BF16, the default) and B (dense layers INT4, KL 0.131, faster decode). Download: A, B.
- D3, two-card prefill for long prompts (on by default on two cards): prompts with at least 7,168 uncached tokens are prefilled by both cards at once, exactly, then handed to TP2 decode. A 40K prompt arriving while two other conversations decode: first token after 2.29 s instead of 6.29 s; ~91K: 5.42 s instead of 10.10 s. Costs: a smaller KV pool (about 900K instead of 1.63M tokens per card) and slower decode of the others while a long prompt is prefilled (decode streams run at high priority to keep their gaps short).
FLASH_PP_CP=0turns it off. - MTP drafts (2 per step) and prompt lookup, also when several conversations decode at once.
- Images with
--vision 1(off by default): the vision weights wait in host RAM and use the card only while an image is encoded. --replicas 2(opt-in): one copy per card, for many parallel conversations.
| 2× RTX 3090, checkpoint A / B | single stream narrative / code tok/s | 4 / 8 / 16 conversations tok/s | prefill 10K / 90K TTFT |
|---|---|---|---|
| 2 cards | 405 / 491 · B: 435 / 519 | 861 / 1,099 / 1,560 · B: 918 / 1,230 / 1,603 | 0.54-0.62 s / 4.71-5.20 s (D3) |
| 1 card | 301 / 355 · B: 339 / 395 | 547 / 783 / – · B: 681 / 857 / – | 0.95 s / 9.33 s |
Details: docs/models/qwen4-35b-a3b.md.
Faster
Qwen3.8-Flash-Next: several conversations at once
- Conversation slots that hold no conversation lend their recurrent-state memory to the expert cache, so fewer expert weights are read from host RAM while fewer conversations run than there are slots. The output is unchanged.
FLASH_SS_LEND=0turns it off. - Decode steps of 17 to 32 rows with at least two conversations split the router and the DeltaNet a/b projections over more blocks.
FLASH_ROUTER_KS=1andFLASH_DNAB_KS=1turn them off. - Together, on 3 cards with 8 sequences decoding at once (engine benchmark, short prompts, MTP drafts): 25.6 -> 23.6 ms per decode step against 1.6.2 (same-day pairs while the changes were merged), about 8 % more tokens per second; 4 sequences 17.5 -> 16.5 ms. One conversation alone: 9.49 -> 9.31 ms.
Fixes
Several conversations without drafts (--mtp-k 0)
- Without drafts, the server stepped every conversation on its own, so several conversations together were no faster than one after the other. The batched step now gets each conversation's token and position at every step and runs as one batch again: Qwen4-35B-A3B on one card, 4 conversations 156 -> 481 tok/s, 8 conversations 157 -> 665 tok/s. The default (drafts on) is unchanged. Flash-Next shares the fix: on 3 cards, 4 conversations 139 -> 446 tok/s (its default output is unchanged).
FLASH_K0_SINGLE=1restores the old per-conversation steps.
Qwen3.8-Flash-Next: FLASH_COMM=ce (#50, #51)
- With
FLASH_COMM=ce(all-reduces over the copy engines), long prompts that use block selection ran another attention kernel than on the other paths, so the output of long prompts differed.FLASH_QPF_CEis now on by default:FLASH_COMM=cegives the same output as P2P, at the same prefill speed.FLASH_QPF_CE=0restores the old behaviour.
Qwen3.8-27B: checkpoint checks at load
- Before copying any weights the loader now checks the dtype, shape and byte size of every
weight_packed/weight_scaletensor and stops with the tensor's name, dtype and shape when they do not match the INT4 / INT8 layout it reads (for example an NVFP4 pack). The start-up gate checks the same. - A checkpoint header that the start-up check cannot read (a tensor entry without
dtype,shapeordata_offsets, a null shape or entry) now stops the start with the tensor's name. Before, the check was skipped and the server started anyway.
New
Qwen3.8-27B: importing quantized checkpoints
tools/import_checkpoint.pyconverts AutoRound, GPTQ and compressed-tensors W4A16 exports of Qwen3.8-27B (fine-tunes and other quantizations) into a QEngine checkpoint without re-quantizing; it refuses layouts it cannot convert exactly. See docs/models/qwen3.8-27b.md.
Activation steering on DeepSeek-V4.1-Flash, GLM-5.3-Flash and Inkling-2-Mini
- The project mode of activation steering (your own vectors through
QE_STEER/QE_STEER_DIR, per request or as the server default) now works on these three models, as on Qwen3.8-27B and Flash-Next. A request without steering gives the same tokens as before, and cached prompts and conversations are keyed by the steering selection. No vector is included for these models. See docs/advanced.md.
Changes you may notice
FLASH_COMM=cenow gives the same output as the other paths on long prompts (FLASH_QPF_CE=0for the old one).- A 27B checkpoint whose weight tensors have another dtype or shape now stops the start with the tensor's name instead of loading.
Output is unchanged where nothing above says otherwise: Qwen3.8-27B and single-conversation Flash-Next give the same tokens as 1.6.2, and so do DeepSeek-V4.1-Flash, GLM-5.3-Flash and Inkling-2-Mini without steering. Flash-Next batched decoding of several conversations adds up its router and DeltaNet projections in another order, so its replies can differ from 1.6.2 in the last digits of the logits, as between two runs at different batch sizes. The README numbers are unchanged except the Flash-Next batched decode line, which states its build and date.