r/LocalLLaMA • • Aug 21 '26

Discussion Qwen3.8-27B: 3x long-context decode speed (BF16, lossless)

Goal: speed up decode at long context while staying lossless (BF16 weights + BF16 KV)

Setup: RTX PRO 6000 Max Q on Ubuntu

Result: DFlash2 + XQA, at 192K context, the decode speed has been increased from 18 tok/s to 58 tok/s, compared against Flash2 + plain FA2

If anyone has better lossless configs for long-context decode, please share.

2 Upvotes

12 comments sorted by

2

u/AdSafe4047 Aug 21 '26

what is xqa?

2

u/stargate425 Aug 21 '26

decode attention kernel from tensorrt-llm, ships in flashinfer.

2

u/Makers7886 Aug 21 '26

I don't run MTP or DFlash (because vLLM prefix cache misses/latency issue with it) but when I run bf16 all the way I'm at max context and high 40's low 50's t/s and I believe 1400ish prefill. Which is similar to what I would get with qwen3.5/6. However last few days I've been running INT8 W8A16 (im on 3090s) and 4x3090s = 860k kv cache pool and with yarn factor 3.24 running single user at 850k. Passed 5/5 needle tests at deep context but have only reached 380k in a coding session so far (without issue).

1

u/stargate425 Aug 21 '26

the prefix cache thing isn't spec decode, its the mamba page forcing a ~800 token block either way (784 no spec, 832 with dflash). what's your INT8 do at 400K actual fill?

1

u/Makers7886 Aug 22 '26

I need to dive into it as I pretty much shelved spec decoding waiting for things to get ironed out. 400k drops to 1000t/s and at 700k drops to 740t/s for prefill. Decode 56t/s 60k then slows down to 35t/s 400k, and 25t/s 700k.

1

u/Ray3DX Aug 21 '26

This is really impressive! That RTX PRO 6000 is a beast.
I spent the day min-maxxing my RTX 5090 and landed on this:
UD_Q5_K_XL variant, 164K Context window, q_8 KV Cache, MTP on = 110 Tok/Sec
UD_Q5_K_XL variant, 256K Context window, q_8 KV Cache, MTP off= 64Tok/Sec
using Unsloth Studio Desktop.

1

u/stargate425 Aug 21 '26

did you really fill your context at say 128k? or is it just context window size? If your context is already at 128K, MTP can barely help as its accuracy and speed drop drastically as context grows.

1

u/Ray3DX Aug 21 '26

I have tried maxxing out the context length by giving it multiple fluid Sim tasks, didn't slow down by much. Lowest I noticed was 72-78.
It's why I have 2 configs saved which I can switch. If really need extra context window, I switch to 256K no MTP.

3

u/MattOnePointO Aug 21 '26

Not all hero’s wear capes.

3

u/timtamsoup Aug 21 '26

can you provide your recipe?

1

u/Astezelexx Aug 21 '26

We cannot afford such setup lol

1

u/FaustAg Aug 22 '26

hey i'm going to post my custom setup soon, but I took the tensor layout of unsloths q4 quant and followed the datatypes and maybe a tri quant nvfp4 / mxfp6 / mxfp8 of heretics's version of qwen 3.8. then I did some benchmarks and found mxfp6 faster than nvfp4 so I then re-derived the nvfp4 parts as mxfp6 as well. I have a pretty hacky setup to be able to use this, but I'll try and get both the model and code posted soon. I get a lot more than 58 toks/s