Qwen3.8-Flash-Next on vLLM, on trogdor: the best stack of the 2026-11-29 bake-off
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-30 14:07:28 -05:00
docker-compose.yml 8-bit KV cache by default: the shared pool grows from 221,184 to 362,421 tokens 2026-11-30 14:07:28 -05:00
README.md 8-bit KV cache by default: the shared pool grows from 221,184 to 362,421 tokens 2026-11-30 14:07:28 -05:00

Qwen3.8-Flash-Next on vLLM

The best setup found for Qwen3.8-Flash-Next on trogdor's two RTX A6000s, in the bake-off of 2026-11-29. It is a Portainer git stack, qwen38-flash-next-vllm, on trogdor (endpoint 39).

It uses port 8090 and both A6000s, like every model stack on trogdor. Stop the running model stack before starting this one.

Item Value
Engine vLLM 0.34.0, stock image
Model files Intel/Qwen3.8-Flash-Next-W4A16-AutoRound, 181 GB, in /mnt/models
Name clients ask for qwen3.8-flash-next
Window 196,608 tokens, with the 16-bit KV cache
Requests at once 6
Vision on, up to 64 images in a conversation
Card memory about 44.7 GB on each card; the lookup table (about 95 GiB) is in host RAM

What was measured

All on 2026-11-29, on the same test: one stream, six streams at once, and the time to the first token on a cold prompt of about 16,000 tokens. vLLM figures are the middle of three runs.

Setup One stream Six streams Cold 16k prompt
llama.cpp, UD-IQ4_XS, image built for the old cards 60 tokens/s 56 11.8 s
llama.cpp b12845 built for the A6000s 83 69 9.0 s
A patched vLLM for 24 GB cards (DominikBucko's runtime), every expert on the cards 92 87 6.5 s
This stack 108 367 3.0 s
This stack with the 8-bit KV cache and the full 262,144 window 104 355 3.0 s
This stack with 2 draft tokens 105 366 3.0 s
This stack with 4 draft tokens 101 349 3.1 s
This stack without drafts 68 292 3.0 s
This stack without expert-parallel 47 96 6.5 s

The single-stream figure moves by 10 to 20% from run to run, because it depends on how many drafts are accepted. The six-stream figure and the prompt time are steady.

Quality was judged with the pelican test (/Users/cmoriarty/repos/pelican-bench): one OpenCode prompt, a small game in one file, scored by eye. With this stack's settings and vision on, the model finished in 10.5 minutes and scored 94 (Claude's score), the best of the bake-off. With the 8-bit KV cache it scored 86 in 8.4 minutes. One try each.

OpenCode reuses the prompt cache with this server: 92% of prompt tokens came from the cache during a try.

The stack itself (Portainer stack 151) was started from Portainer's API on 2026-11-29 and checked: healthy after about 5 minutes, 105.8 tokens/s for one stream and 339 across six (middle of three runs), a 196,608-token window reported by the server, a KV cache of 221,184 tokens, and a real screenshot read correctly.

Not used, and why

  • llama.cpp. Slower, and it serves one request at a time. The owner uses llama.cpp only for models too big for the cards.
  • The patched vLLM runtime (albucino/Qwen3.8-Flash-Next-W4A16-FP8PLE). Slower than stock vLLM here, one request at a time, and based on a vLLM from August 2026.
  • Bigger prefill chunks (--max-num-batched-tokens 8192). Runs out of card memory at start.
  • NVFP4 builds, the DFlash2 draft model, SGLang. They need newer cards or are not served by vLLM for this model (read on Hugging Face and GitHub, 2026-11-29; not tried).

Main memory: about 157 GiB while it runs (measured 2026-11-30)

Flash-Next keeps a large lookup table (its "n-gram embedding") in the server's main memory, not on the cards. vLLM's log calls this EngramConfig(cpu_offload=True). The table is 20,000,000 rows of 2,560 numbers at 2 bytes each, 102.4 GB, the size of the file model-00016-of-00017.safetensors. So the stack takes about 157 GiB of trogdor's 376 GiB for as long as it runs, and gives it back when it stops. Grafana's "RAM used" rises by that much the moment the stack starts. The other four model stacks do not do this.

The two workers do not each hold a copy. vLLM divides the table between them (its settings file calls this "TP-sharded"), so each holds half, 47.7 GiB. Each worker's block of memory is nevertheless exactly 64.0 GiB. The likely reason, not confirmed in the code: the table is allocated as "pinned" memory, and PyTorch rounds pinned allocations up to the next power of two. That would be about 32 GiB of rounding in all.

There is nothing to share (vLLM 0.34.0's config/engram.py, read 2026-11-30):

Setting What it does Use here
dp_shared_memory Lets several whole copies of the model on one machine share one table Does not apply: this stack runs one copy across two cards. vLLM refuses the setting unless there are several copies
disk_offload Leaves the table in the file and reads the needed rows at each step A supported mode for this model family that would free the memory. Not tried: it changes how every token's rows are fetched, so speed would have to be measured
use_thp Backs the table with larger memory pages A speed option, not a saving

Left as it is: trogdor has about 200 GiB free with everything running.

The shared pool, and the 8-bit cache (2026-11-30)

The window, 196,608 tokens, is the most one request can hold. All requests running at the same moment share one working cache, and that pool is what limits how many large sessions and subagents can run together.

Cache Pool Full windows that fit
16-bit (FLASH_KV=auto), until 2026-11-30 221,184 tokens 1.12
8-bit (FLASH_KV=fp8), the default since 362,421 tokens 1.84

With the 16-bit cache, one OpenCode session with two subagents in parallel used up to 96.9% of the pool, and vLLM pushed a request out for lack of room four times in an afternoon (vllm:num_preemptions_total). A request pushed out is not lost: it is started again when room returns, which shows as a subagent that stalls.

The 8-bit cache keeps the model's working memory of the conversation at half the precision. Whether that costs quality is not settled: one pelican try each on 2026-11-29 scored 94 with 16-bit and 86 with 8-bit. To go back, set the stack variable FLASH_KV to auto and redeploy.

Not tried: giving vLLM more of each card (--gpu-memory-utilization above 0.93), or fewer draft tokens; both would enlarge the pool further.