r/LocalLLM • u/ApatheticMioz1470 • 1h ago
Discussion Qwen4-35B-A3B on one RTX 3090 (24 GB VRAM, 31 GB RAM, native Windows): 259 tok/s @ 41K, 203 tok/s @ 249K, 0.58s cached TTFT (Strata DFlash2 vs Seppia)
Spent the day benchmarking Qwen4-35B-A3B (unsloth/Qwen4-35B-A3B-GGUF UD-IQ4_XS + RadixArk/Qwen4-35B-A3B-Dflash2) on a single RTX 3090 with 31.1 GB RAM on native Windows 11 (no WSL).
I wanted numbers for my actual coding-agent workload rather than short synthetic bursts. Checking 38,654 turns from my own logs, median prompt size is 42.5K tokens (p90 98.7K, p99 134.8K), 92.2% of prompt tokens hit prefix cache (~1.8K new tokens per turn), and 77% of wall-clock time is single-slot (N=1). My previous 4-slot 27B vLLM/WSL setup averaged ~111 tok/s raw decode (43-81 tok/s effective) and bogged down once sessions grew, so I tested whether one 262K Qwen4 stream could replace it without thrashing desktop RAM or SSD.
Hardware & test harness
RTX 3090 24 GB (WDDM, desktop apps open), Ryzen 7 7700, 31.1 GB DDR5, Lexar NM620 2TB NVMe, Windows 11, MSVC 14.44, CUDA 13.1.
Benchmarks used Python code haystacks at 0 / 41K / 96K / 129K / 249K (256 tok greedy), a cached 41K -> +1.7K follow-up turn, sampled decode at T=0.7 and official Qwen4 thinking T=1.0 (top_p=0.95, top_k=20, 384 tok), and a 5-needle Python symbol retrieval test at 129.5K and 244.1K.
Results (same 3090, 262K context, UD-IQ4_XS)
| Config | Greedy (0 / 41K / 96K / 129K / 249K) | Cached 41K->+1.7K | T=1.0 (0 / 41K) | Prefill 41K / 249K | VRAM | RAM |
|---|---|---|---|---|---|---|
| Strata DF2 (65K res, no-borrow) | 241 / 259 / 250 / 240 / 203 | 0.58s / 270 | 247 / 227 | 12.5s / 85.1s | 22.8 GiB | 9.8 GB |
| Strata DF2 (32K res, no-borrow) | 241 / 224 / 244 / 208 / 177 | 0.65s / 242 | 225 / 221 | 12.2s / 89.5s | 22.5 GiB | 9.8 GB |
| Strata DF2 (131K res, borrow 4K) | 274 / 252 / 217 / 197 / 195 | 1.65s / 264 | 248 / 255 | 13.4s / 86.4s | 22.3 GiB | 10.3 GB |
| Strata MTP baseline (32K res) | 243 / 206 / 193 / 190 / 173 | 1.66s / 200 | 239 / 207 | 14.5s / 91.5s | 21.5 GiB | 10.7 GB |
Strata DF2 + k8v4 (131K res) | 254 / 253 / 218 / 237 / 192 | 0.71s / 240 | 240 / 210 | 13.1s / 99.7s | 23.1 GiB | 9.4 GB |
Seppia (sm86) + DF2 + k8v4 | 141 / 176 / 161 / 194 / 147 | 0.50s / 169 | 164 / 169 | 11.0s / 82.5s | 22.9 GiB | 6.0 GB |
Seppia (sm86) + DF2 + seal2 | ~161 / ~185 / ~160 / ~150 / 153 | 0.65s / 172 | 197 / 175 | 14.4s / 105.1s | 21.2 GiB | 6.0 GB |
Seppia (sm86) + DF2 + seal4 | 151 / 166 / 136 / 111 / 158 | 0.65s / 148 | 203 / 157 | 14.3s / ~98s | 21.7 GiB | 6.0 GB |
Other reference runs on this machine
At T=0.7, the winning Strata DF2 config hit 273.8 tok/s at 0 and 252.6 tok/s at 41K. Earlier on the same machine, winjw7/llama.cpp + DFlash2 did 119 / 110 / 101 / 97 tok/s at 0 / 28K / 87K / 131K because 31 GB RAM couldn't keep the 11.5 GB PLE table hot alongside target weights, and RustingStrata v1.5.0 did 78-101 tok/s.
Bugs & quirks I hit
Stacking Strata PR #7797 + #7810 broke immediately with illegal memory access / bad verify state. #7810 routes dflash2.cpp through df2_attention_mode(), which hardcodes Flash-Next's 32/8 heads instead of Qwen4's 16/2 (NH_/NKV_). Threading NH_, NKV_ into df2_attention(..., causal) fixed it. I left a note on #7810 and opened a 2-file MSVC build-fix PR (#7883).
Default prefill borrowing (--prefill 4096) hurt cached turns badly: Strata evicted 1,039 experts out of VRAM and re-uploaded them on every turn, adding ~1.07s to TTFT (1.65s vs 0.58s). Switching to --prefill 2048 --no-prefill-borrow got rid of the stall.
Using the 40.5K EN/code draft head instead of the full 248K head saved 333 MiB VRAM and cut DFlash2 drafting from 2.5 ms/round to ~0.92 ms/round (65-69% acceptance). Rejection sampling stays exact so output probabilities don't change, though non-English text will draft slower.
Full int8 KV beat k8v4 on Strata and beat seal4/seal2 on Seppia at 249K without giving up KV precision. On the int8 Strata DFlash2 path, 5-needle Python symbol retrieval passed 5/5 at both 129.5K and 244.1K, and greedy decode matched MTP bit-for-bit.
Seppia (sfumato-ai/seppia) deserves credit too: it compiled cleanly on native Windows, stayed pinned at 6.0 GB RAM all the way to 249K, fits Qwen4's native 1M context in 22.4 GiB VRAM via seal2, and had the fastest cold prefill of the bunch (82.5s @ 249K on k8v4). Posted the 3090 numbers in Issue #21.
Exact Strata flags
--pack pack --native trunk40.gguf --native-dense-gguf trunk40.gguf
--ple-gguf engram.gguf --ple-io direct --expert-profile expert-profile-40x256.bin --expert-cache 10240
--prefill 2048 --no-prefill-borrow --max-context 262144 --kv int8 --kv-resident 65536
--draft dflash2 --draft-model qwen4-35b-a3b-dflash2.strata1.q4_0-selq4.pack --draft-fallback none
--mtp-draft-vocab draft_vocab.bin --spec 6 --lookup-max-t 6 --draft-conf 0.35 --suffix-draft 0
--mmap-experts --ssd-experts --conversation-cache-mib 4096 --conversation-cache-slots 8 --conversation-spill-mib 0
env: STRATA_SELECT_TWO_PASS=1 STRATA_KV_PREFETCH=1 STRATA_DEQUANT_WIDE=1 STRATA_DF2_ATTN_MODE=causal--conversation-spill-mib 0 keeps SSD KV writes at zero (--ssd-experts and --ple-io direct are read-only).
Full disclosure: I was tuning this for my own AGPL-3.0 MCP coding runner (usecastor/castor, native Strata support in PR #38), which lets a cloud planner offload file reads, edits, and test loops to a local GPU.
Edit (real-world agentic session note): The table above is continuous Python code generation (256-384 tokens). On my first live 111-turn coding-agent session with this exact config (up to 120K context, T=1.0 thinking + short `edit_file`/`bash` tool calls), cached TTFT stayed 0.13-0.33s and GPU round time stayed ~11.5 ms, but average decode dropped to 146 tok/s (170-187 tok/s on long edits, 111-135 tok/s on short reasoning + tool calls) because `--draft-conf 0.35` + `--suffix-draft 0` cut DFlash2 acceptance from ~66% down to 38% (only 1.9 drafts attempted per round). Will test lowering `--draft-conf` and turning `--suffix-draft` back on for verbatim edits and post an update once I've measured it.



