Hey everyone,
I've been working on an RTX 4090-focused fork of NInfer, mainly targeting long-context inference, local coding agents, and native Windows support.
NInfer is already an impressive inference engine, but I wanted to see how much performance could be extracted from Ada Lovelace without upgrading to a 5090.
Here are some results from my recent benchmark runs.
## Test setup
- NVIDIA RTX 4090 – 24 GB VRAM
- AMD Ryzen 9 9950X3D
- 64 GB DDR5 RAM
- Windows 11
- Native SM89 / CUDA 13.4
- Huihui Qwen3.8-27B GSQ-RCO IQ3_S Vision
- DFlash2 speculative decoding
- RK4V4 KV cache
- NInfer RTX 4090 v0.1.4
## Long-context DFlash2 benchmarks
All values are decode tokens per second.
| Draft tokens | 64K context | 128K context | 176K context |
|---|---:|---:|---:|
| K5 | 242.75 | 206.39 | 214.87 |
| K7 | **272.74** | **240.60** | **263.93** |
| K9 | 247.57 | 202.86 | 241.25 |
| K11 | 258.70 | 215.03 | 228.06 |
| K15 | 242.20 | 189.58 | 229.13 |
Interestingly, K15 performed best in the separate 32K sweep, reaching 313.16 tok/s, but K7 consistently performed better at longer contexts.
At 176K context, K7 improved decode throughput by approximately 22.8% over K5.
These are controlled engine benchmarks using a fixed corpus, 512 measured decode tokens and two runs per configuration.
## N-gram speculation for coding workloads
I also tested N-gram speculation on copy-heavy C++ refactoring tasks with approximately 21K input tokens.
| Metric | N-gram OFF | N-gram 15 |
|---|---:|---:|
| Decode tok/s | 256.68 | **568.08** |
| Average wall time | 14.83s | **9.16s** |
| Exact outputs | 4/6 | 4/6 |
The outputs were identical between both configurations.
Obviously, 568 tok/s is not general-purpose generation speed, but for copy-heavy code editing, the improvement is pretty interesting.
## Long-context prefix caching
Another interesting result at approximately 175K input tokens:
- Cold request: 72.68 seconds
- Repeated request: 0.441 seconds
- Continued request: 0.399 seconds
- Reused prompt tokens: 175,103
This is particularly useful for local coding agents that repeatedly send large conversation histories.
These are warm-prefix results, not cold inference throughput.
## Concurrent prefill
With a short request arriving while a 64K request was being processed:
- Concurrent prefill disabled: 21.28s TTFT
- Concurrent prefill enabled: 1.16s TTFT
Overall completion time for the request pair remained approximately the same.
## Other features
- Native Ada Lovelace SM89 CUDA builds
- Portable Windows binaries without local CUDA compilation
- OpenAI and Anthropic-compatible APIs
- DFlash2 and MTP speculative decoding
- Quantized KV cache
- Hybrid prefix caching
- Built-in browser monitoring dashboard
- Live GPU utilization, VRAM, temperature and power monitoring
- Draft acceptance and token throughput monitoring
- Experimental CUDA Graph optimizations
- Model-specific launch profiles
## Real-world serving
Across 1,831 completed requests with DFlash2 K5:
- Median decode: 146.6 tok/s
- P90 decode: 215.5 tok/s
- Median long-prompt prefill: 2,345 tok/s
The controlled benchmark results are significantly higher than these real-world serving numbers, so I wanted to include both.
I'm still experimenting with longer contexts, speculative decoding configurations, CUDA Graphs and coding-agent reliability.
The benchmark campaign includes 143 completed measurements, with raw numerical results and reproduction scripts available in the repository. Long-context retrieval accuracy and broader coding quality still need further validation.
Would be interested to see what other RTX 4090 users are getting with NInfer, llama.cpp or ExLlama under comparable conditions.
Fork: https://github.com/spk-c/ninfer-all-rtx4090
Benchmark report: https://github.com/spk-c/ninfer-all-rtx4090/blob/master/docs/performance/rtx4090-v014-long-context-2026-11-26.md
Coding benchmarks: https://github.com/spk-c/ninfer-all-rtx4090/blob/master/docs/performance/rtx4090-v014-coding-2026-11-26.md
Full credit to the upstream NInfer developers and contributors who made this possible.