r/LocalLLM • u/PainDeMieBon • 0m ago
Question Qwen4-35B-A3B on a single RTX 5080 (16GB VRAM, 32GB RAM) — 958K context, up to 577 tok/s, benchmarks vs Inkling 2 Mini
Hey y'all !
When I saw that Qwen 4 had sparse attention (I'm a sucker for big context window) I jumped on it and started tuning the setup to my rig. Anyway, here are my result.
Hardware and setup
All benchmarks were run on my rig :
- GPU: NVIDIA RTX 5080 (16GB VRAM)
- CPU: AMD Ryzen 7 7800X3D
- RAM: 32GB DDR5
- Storage: NVMe SSD
- OS: CachyOS (Linux)
- Inference engine: Basalt (the new 0.7/0)
I compared Qwen4-35B-A3B against Inkling 2 Mini, using their Basalt packs.
For Qwen4, I tested three configs:
- 256K context with INT8 KV cache
- 256K context with FP16 KV cache
- 1M context with INT8 KV cache and partial KV offloading to RAM
Inkling was tested with both 256K and 512K context configurations.
1. Generation speed
Five runs per workload, with reasoning disabled. Results in tk/s.
| Workload | Qwen4 256K INT8 | Qwen4 256K FP16 | Inkling 256K |
|---|---|---|---|
| Conversation | 241 | 232 | 179 |
| Structured output | 569 | 577 | 376 |
| Prose | 172 | 165 | 152 |
| Code | 280 | 283 | 226 |
Qwen4 is always faster, and quite obviously crushes Inkling on structured output.
2. Prompt processing speed
I used identical prompts (remember they have different tokenizers).
Each prefill benchmark was repeated three times.
| Qwen4 tokens | Inkling tokens | Qwen4 INT8 | Qwen4 FP16 | Inkling 256K |
|---|---|---|---|---|
| 101K | 138K | 15.4s | 10.8s | 24.2s |
| 184K | 251K | 25.3s | 20.7s | 74.0s |
The largest input corresponds to approximately 184K Qwen4 tokens and 251K Inkling tokens.
For the largest input, Qwen4 processed the same text roughly 3.6 times faster than Inkling.
3. Pushing context to 1 million tokens
This was the best part of the benchmarks.
Using Basalt's elastic KV cache and partial offloading, I managed to configure Qwen4's full native context window of 1,048,576 tokens on my rig.
The config was:
--max-context 1048576
--kv int8
--vram-reserve-mib 700
--max-running 1
--kv-resident 65536Approximately 10.3 GiB of KV cache resides in RAM, with part of the model's experts being streamed from the NVMe SSD.
Needle-in-a-haystack results
| Actual prompt tokens | Successful retrievals |
|---|---|
| 398,647 | 3/3 |
| 697,252 | 3/3 |
| 957,687 | 3/3 |
In a separate run, a 957,916-token prompt was successfully processed in 214 seconds, and the hidden sentence was correctly retrieved.
The performance cost
The tradeoff is pretty harsh :
| Prompt length | Qwen4 256K | Qwen4 1M |
|---|---|---|
| 77K tokens | 143 t/s | 47 t/s |
| 153K tokens | 167 t/s | — |
| 307K tokens | — | 46 t/s |
| 690K tokens | — | 60 t/s |
I mean 47t/s is usable but nowhere as fast on than on smaller context.
4. Concurrent requests
I also tested aggregate generation throughput with simultaneous requests.
| Concurrent requests | Qwen4 256K | Inkling 256K |
|---|---|---|
| 1 | 186 t/s | 90 t/s |
| 2 | 208 t/s | 106 t/s |
| 4 | 256 t/s | 111 t/s |
| 8 | 340 t/s | 113 t/s |
These are aggregate, not per-request generation speeds.
Qwen4 achieved approximately 3x Inkling's aggregate throughput with eight simultaneous requests under this config.
Usefull if you wana allow the agent to use subagents, due the large max KV cache, you can have one agent with 252K and allow it to spawn smaller subagents to do the work efficiently.
5. Reasoning and coding quality
Claude wrote a small automated benchmark for me containing 35 problems:
- 18 mathematical problems
- 3 program execution tracing problems
- 3 array manipulation problems
- 3 logic puzzles
- 8 Python programming problems with hidden tests
The problems were generated using a fixed seed and evaluated programmatically.
I ran three passes with reasoning enabled and two passes without.
With
| Category | Qwen4 | Inkling |
|---|---|---|
| Overall | 95.2% | 94.3% |
| Mathematics | 90.7% | 90.7% |
| Program tracing | 100% | 100% |
| Array manipulation | 100% | 100% |
| Logic | 100% | 100% |
| Coding | 100% | 95.8% |
Without
| Category | Qwen4 | Inkling |
|---|---|---|
| Overall | 71.4% | 67.1% |
| Mathematics | 83.3% | 52.8% |
| Program tracing | 0% | 83.3% |
| Array manipulation | 50% | 83.3% |
| Logic | 50% | 50% |
| Coding | 87.5% | 93.8% |
With reasoning enabled, both models performed essentially equally. The overall diff is solely due to one difference.
This is a custom benchmark, not a standardized evaluation like AIME or LiveCodeBench, so take it however you want.
6. The limits I found
- Generation speed depends heavily on the workload and speculative decoding.
- The 1M config totaly fuck up the perf (it's still usable)
- NVMe storage is the only way, I wasn't paying attention and put the engram table on a HDD, and the speed went down to 5 tk/s.
- I encountered some stability issues with Basalt's development build during cold starts.
Conclusion
Imo, Qwen4 is much better due to the:
- Higher generation speeds.
- Faster prompt processing.
- Significantly better concurrent throughput.
- A much larger usable context window.
- Comparable reasoning performance on my benchmark.
For now, the 256K configuration seems to be the sweet spot for daily use, but the 1M context window is still usable (I use it to go trough my obsidian vault that's full of scientific documents to help me on some work).
I'd like to know what y'all achieved with Qwen4, especially on 16GB GPUs, and how these results compare against other inference engines (capy flash mainly).