Skip to content

QEngine 1.5.0

Choose a tag to compare

@bpx03 bpx03 released this 20 Nov 18:29
· 1 commit to main since this release

QEngine 1.5.0

This is the new stable release: latest, vision and the main branch move here from 1.3.6. QEngine now runs five models in one server: next to Qwen3.8-27B and Qwen3.8-Flash-Next there are three new ones, as previews: DeepSeek-V4.1-Flash, GLM-5.3-Flash and gpt-oss-120B. The 27B and Flash-Next get their first token much sooner when many agents are in flight, and the Flash-Next hand-off stalls under host-memory pressure are fixed.

docker pull ghcr.io/bpx03/qengine:latest   # = 1.5.0, text only
docker pull ghcr.io/bpx03/qengine:vision   # = 1.5.0-vision, with the image encoder

From source: git fetch --tags && git checkout v1.5.0, then rebuild (src/dsv4/build.sh and src/gptoss/build.sh build the DeepSeek and gpt-oss engines; the GLM engine comes with the normal CMake build).

Measured on my machine (3x RTX 3090, 24 GB, PCIe 4.0 x16, P2P), server at its defaults, club-3090 benchmark tools, November 19, 2026:

output tok/s unless noted Qwen3.8-27B Qwen3.8-Flash-Next DeepSeek-V4.1-Flash GLM-5.3-Flash gpt-oss-120B
single-stream decode, narrative / code 275 / 524 310 / 452 88 / 120 110 / 92 301 / 301
prefill, 10K-token prompt: tok/s, time to first token 6,188, 1.60 s 8,254, 1.23 s 4,217, 2.35 s 2,920, 3.42 s 13,280, 0.74 s
prefill, 90K-token prompt: tok/s, time to first token 4,994, 18.0 s 8,390, 10.5 s 4,895, 17.8 s 3,572, 25.4 s 5,055, 17.6 s
total output, 1 / 4 / 8 / 16 streams at once 312 / 575 / 848 / 999 300 / 642 / 880 / 1,061 70 / 73 / 78 / 78 72 / 55 / 50 / 44 306 / 594 / 731 / 835
quality against a reference KL 0.0154 vs BF16, top-1 95.3 % KL 0.114 vs BF16, top-1 89.6 % NLL 1.635 on my test texts KL 0.59 vs the official FP8 model KL 0.118 vs fp32, top-1 86.9 %
club-3090 8-pack, thinking off / on (of 150) 114 / 128 120 / 125 122 / 133 121 / 133 110 / 116 (effort low / medium)

DeepSeek-V4.1-Flash and GLM-5.3-Flash decode one conversation at a time and give the streams turns, so their total output stays at about one stream's. For 16 streams the servers that hold 8 conversations by default were started with 16.

Three new models (previews)

All three run in the same server, API and Docker image as the two Qwen models: OpenAI and Anthropic APIs, tool calls, tool_choice, structured output, reasoning with reasoning_effort and a thinking budget, a host-RAM archive of idle conversations, qetop and the dashboard. What each model supports is in the README's feature matrix.

DeepSeek-V4.1-Flash, run from the Maya-S GGUF files on Hugging Face as they are (no conversion), on three 24 GB cards (RTX 3000 / 4000 series) plus about 170 GB of host RAM, with the DSpark draft model:

  • 262,144 tokens of context by default; with P2P between every pair of cards short chats run as fast as at 32K, because the long-context memory is lent by the expert pool only while a long prompt needs it.
  • 88 / 120 tok/s single-stream (narrative / code), a 90K-token prompt in 17.8 s, a 233K-token prompt in 56 s with decode at 91 tok/s after it.
  • Up to 8 requests in service, served in turns with exact switches; agents that share a system prompt compute it once (8 agents with a shared 7K-token prompt: 98 tok/s total).
  • Works without P2P (the cards exchange through pinned host memory; decode on my cards 99.8 / 97.9 / 69.7 tok/s on three prompts against 104.0 / 105.5 / 76.3 with P2P).
  • Model files: hf download peasantsmith/DeepSeek-V4.1-Flash-1017-Maya-GGUF --revision c33d87b8 --include "Maya-S/*" "dspark/*" --local-dir models/DeepSeek-V4.1-Flash-1017-GGUF (about 348 GB).

GLM-5.3-Flash, run from my INT4 quant on three 24 GB cards plus about 192 GB of host RAM: the experts used most often sit in VRAM, the full set in pinned host RAM, and a CPU expert lane runs next to the cards.

  • The GLM engine runs only from the QEngine checkpoint bpx03/GLM-5.3-Flash-INT4-QEngine (my GPTQ INT4 experts and KDA layers in QEngine's own layout, about 186 GB). Other GLM-5.3-Flash quants, GGUF files and the original weights do not load.

    hf download bpx03/GLM-5.3-Flash-INT4-QEngine --local-dir models/GLM-5.3-Flash-INT4-QEngine
    server/run.sh 8080 --model models/GLM-5.3-Flash-INT4-QEngine
  • 262,144 tokens of context, MTP drafts, logprobs, up to 8 conversations at once by exact time slicing.

  • 110 / 92 tok/s single-stream, a 90K-token prompt in 25.4 s, decode at 100K tokens of context 94.9 tok/s; a 253K-token prompt with a needle passed while 4 more requests ran and another program took 80 GB of host RAM.

gpt-oss-120B, run from OpenAI's official checkpoint as it is (MXFP4 experts, bf16 dense weights), all in VRAM on three RTX 3090-class cards (compute capability 8.6):

  • 131,072 tokens of context, up to 8 conversations decoded together (the same tokens as each one alone), lookup drafts for greedy replies, presence / frequency penalties on the GPU.
  • 301 tok/s single-stream, 835 tok/s total with 16 streams, a 10K-token prompt in 0.74 s, a 90K-token prompt in 17.6 s.
  • GPU P2P is not needed: without it the cards exchange through pinned host memory with the same output bit for bit (decode on my cards 321 against 337 tok/s for one conversation, 952 against 1,013 for eight).
  • Model files: hf download openai/gpt-oss-120b --revision b5c939de --exclude "original/*" "metal/*" --local-dir models/gpt-oss-120b (about 65 GB).

27B: the first token comes much sooner with many agents at once

The time split between prefill and running replies now follows the queue: short prompts are prefilled back to back and running replies keep at least 10 % of the time (--prefill-share-min; 0.5 gives the old split). Beyond the 16 decode seats a request gets its first token on one of two seats kept for prompts and its reply waits parked in host memory until a seat frees (--park), resumed exactly where it stopped. When a prompt-end state is saved, the same conversation's older ones go first (QE_SNAP_DEMOTE), so a waiting turn no longer loses its own state. The prompt-cache state store holds up to 8 states per slot within 8 % of host RAM and is pinned at start, before the first request (QE_ARCHIVE_WAIT_S; with 16 slots on a 256 GB host about 19 GB).

Agent replay on 2 cards, closed loop, 128-token replies, median time to first token / total output, against 1.3.6:

agents in flight 16 32 64
1.3.6 4.5 s / 231 tok/s 25.0 s / 159 73.0 s / 111
1.5.0 defaults 1.04 s / 243 0.48 s / 359 1.0 s / 285 (after a 90 s warm-up)

With the defaults no agent's prompt had to be computed again. QE_MAX_SEQS=32 (opt-in) seats 32 conversations on 2 and 3 cards, with a smaller KV pool (2 cards: 417,792 tokens instead of 623,616).

Flash-Next

  • The first token comes much sooner with several agents at once. Every prompt keeps the state at its own end, so an agent's next turn resumes there even when the client sends back another text for the reply; on 3 cards the time split follows the queue as on the 27B, and beyond the 16 decode seats replies park in host memory. Median time to the first token at 1 / 4 / 16 / 32 agents: 0.16 / 0.44 / 1.91 / 3.93 s in 1.3.6, 0.13 / 0.25 / 0.37 / 2.83 s now; at 32 / 64 agents with parking 0.26 / 0.75 s.
  • No more stops at a slot hand-off when the host is short of memory (#32, #25). Log lines go through a writer thread (QE_LOG_ASYNC), and the archive's memory is pinned in the background only while the engine is idle, 1 GB at a time, pausing when a registration is slow. Thanks to cristianflorett, dgaglioni and gbinka for the reports and measurements behind the Flash-Next hand-off fix (#32, #25).

Both Qwen models give memory back under host pressure

A background thread watches the kernel's memory-pressure and swap-in counters next to MemAvailable; under pressure the engine stops growing, frees archive memory, shrinks the archive, drops pinned prompts and, last (Flash-Next), moves the n-gram table to the page cache, one logged stage at a time, and returns slowly once the host stays calm (QE_MEMP=0 turns it off). With 179 GB taken by another program on my machine, Flash-Next went down to the last stage and served every request, with the same greedy text.

For every model

  • Streamed replies send a keep-alive after 10 s without an event (QE_SSE_KEEPALIVE), so proxies and clients with a read timeout keep a stream whose request waits for its turn.
  • At start the server logs one [settings] line for every flag or environment variable that is set but does nothing for the loaded model.
  • A top-level enable_thinking in a request is read too (#31).

27B and Flash-Next single-stream decode, prefill and quality are the same as in 1.3.6 within the run-to-run spread (same benchmark, 1.3.6: 27B 281 / 507 tok/s, prefill 6,133 / 4,997 tok/s; Flash-Next 306 / 449 tok/s, prefill 8,207 / 8,394 tok/s; short 27B replies on 3 cards 474 / 264 / 401 tok/s then, 475 / 265 / 403 now).

Known limits and how to work around them

what you may see why what to do
27B greedy text changes at a near-tie after an upgrade or with a fresh container the 27B times its GEMM kernels once per installation and keeps the choice in ~/.cache/qengine; a fresh tune can pick another kernel where two are equally fast, which rounds differently greedy output is reproducible within one installation; keep the qengine-cache volume to keep the tune
a reply that reuses a cached prefix differs from a fresh run at a near-tie prefill is not split-invariant: the reused part was computed in a call of another size cache_prompt: false forces a full prefill when you compare runs
DeepSeek-V4.1-Flash and GLM-5.3-Flash total speed does not grow with more streams they decode one conversation at a time and give requests turns many parallel agents run best on gpt-oss-120B or the Qwen models
DeepSeek-V4.1-Flash greedy text differs between runs the experts in VRAM change as the model runs; GPU and CPU paths round differently --tier-reset gives the same text for a repeated request
GLM-5.3-Flash does not start from another quant the engine reads only the QEngine checkpoint layout download bpx03/GLM-5.3-Flash-INT4-QEngine
gpt-oss-120B on cards other than the RTX 3090 class the fast output head was certified on 3090s only; 8.9 cards run the full head, others are refused sm_86 cards

What I tested

On 3x RTX 3090, from clean builds of this release's code:

check result
greedy output against the references (Flash-Next 2 and 3 cards, batched, first start; 27B identity set with DFlash2) identical to 1.3.6
262K-token stress with images (Flash-Next 3 and 2 cards, 27B 2 cards) pass, no errors, no graph fallbacks
VRAM taken by another process mid-run (27B, Flash-Next, gpt-oss), host RAM taken mid-run (Flash-Next, gpt-oss 16 / 32 / 48 GB; DeepSeek; GLM 80 GB during a 253K prompt) the engines shrink and keep serving; no failed request, no OOM kill
Flash-Next hand-offs with another program holding 178 GB of host RAM 577 replies, 368 hand-offs, 0 failed, no collective timeout, same greedy text before and after
decay over a long agent soak (club-3090 #1928 shape, Flash-Next) 0.98 / 0.97 of the fresh speed
conversation cases (side tasks, forks, two sessions, a new request that needs room) pass under the plain LRU rule
DeepSeek-V4.1-Flash: needles at 64K / 128K / 256K, turns reused, give-back, hogs pass
GLM-5.3-Flash: 8-agent tool-calling soak (400 requests), 150 prefills of 2K-64K tokens, 262K stress under a RAM hog 0 failed, no error lines
gpt-oss-120B: 131K-class needle with 8 slots busy, 2,000-request mixed soak, start with less VRAM pass, 0 failed requests; a smaller pool with a WARNING when VRAM is short
club-3090 8-pack, one run per model the table above (earlier releases published the mean of three runs; from 1.5 on it is a single run, because running it for all models takes a long time)
KL / NLL the quality row above; Flash-Next the same as 1.3.6 to every digit
27B on 3 cards with an empty cache, on one card drafter downloaded and checked, loaded; correct answers
Docker images 1.5.0 / 1.5.0-vision: 27B (empty cache volume), Flash-Next, both with images; DeepSeek-V4.1-Flash first start with an empty cache volume; gpt-oss-120B all start and answer correctly, 0 error lines; DeepSeek ready in 49 s