{"slug": "ninfer-rtx-4090-native-cuda-llm-inference-on-windows-up-to-326-tok-s-with-qwen", "title": "NInfer RTX 4090 – Native CUDA LLM inference on Windows, up to 326 tok/s with Qwen 27B and DFlash2 in short benchmarks", "summary": "An independent maintainer released NInfer-all v0.1.4, a stable, GPU-tested Windows build of native C++/CUDA 13.4 LLM inference optimized for the RTX 4090's SM89 architecture, reporting up to 326.41 tok/s decoding Qwen 27B with DFlash2 K7 speculative decoding on a single 24GB GPU. The benchmarks, run with 2048 prompt tokens and 128 timed decode tokens, show Qwen 27B IQ3_S at 70.38 tok/s without speculation, 242.59 tok/s with MTP K5, and 257.13 tok/s with DFlash2 K5, while Ternary Bonsai 2.5 reached 291.69 tok/s (PTQ1_0, MTP K3) and 323.88 tok/s (PQ2_0, MTP K3); the maintainer cautions these are short synthetic engine benchmarks, not guaranteed real-world serving speeds. The Apache 2.0 build adds quantized KV cache (rk4v4, rk8v4), hybrid prefix caching, and OpenAI- and Anthropic-compatible APIs, and the maintainer is seeking feedback from RTX 4090 owners running local coding agents at 64K–192K contexts.", "body_md": "Hey everyone,\n\nI’ve been working on an independently maintained version of NInfer-all, specifically optimized for the RTX 4090 and its SM89 architecture.\n\nThe goal is to get as much performance as possible out of a single 24GB GPU while running larger local models, especially for coding and long-context workloads.\n\nI’ve just released v0.1.4 as a stable, GPU-tested Windows build.\n\n**Features:**\n\nNative C++/CUDA 13.4 inference\n\nRTX 4090 / SM89 optimizations\n\nDFlash2 and MTP speculative decoding\n\nQwen3.8 27B and Ternary Bonsai 2.5 support\n\nQuantized KV cache (rk4v4, rk8v4, etc.)\n\nHybrid prefix caching\n\nOpenAI- and Anthropic-compatible APIs\n\nPortable Windows binaries\n\nApache 2.0 license\n\n**Recent RTX 4090 benchmarks:**\n\n| Model / Backend | Decode | \n|---|---|\n| Qwen 27B IQ3_S – No speculation | 70.38 tok/s | \n| Qwen 27B – MTP K5 | 242.59 tok/s | \n| Qwen 27B – DFlash2 K5 | 257.13 tok/s | \n| Qwen 27B – DFlash2 K7 | 326.41 tok/s | \n| Qwen 27B – DFlash2 K9 | 269.33 tok/s | \n| Bonsai 2.5 PTQ1_0 – MTP K3 | 291.69 tok/s | \n| Bonsai 2.5 PQ2_0 – MTP K3 | 323.88 tok/s | \n\nThese are short synthetic engine benchmarks with 2048 prompt tokens and 128 timed decode tokens, not guaranteed real-world serving speeds. The methodology and measurement data are publicly available.\n\nI’ve also built a project website with an interactive VRAM calculator, launch command generator, model downloads, installation guides and benchmark results.\n\n**Project website:** [NInfer-all RTX 4090 | Local LLM inference on Windows & CUDA](https://spk-c.github.io/ninfer-all-rtx4090/)\n\nCredit to the original NInfer and NInfer-all developers. This project builds on their work.\n\nI’d love to hear feedback from other RTX 4090 owners, especially people running local coding agents with 64K–192K contexts.\n\nIf you try it, please share your results, even if they’re worse than expected. I’m interested in finding bottlenecks and improving the engine further.", "url": "https://wpnews.pro/news/ninfer-rtx-4090-native-cuda-llm-inference-on-windows-up-to-326-tok-s-with-qwen", "canonical_source": "https://discuss.huggingface.co/t/ninfer-rtx-4090-native-cuda-llm-inference-on-windows-up-to-326-tok-s-with-qwen-27b-and-dflash2-in-short-benchmarks/192681#post_1", "published_at": "2026-11-26 14:55:29+00:00", "updated_at": "2026-11-26 15:13:12.973566+00:00", "lang": "en", "topics": ["large-language-models", "ai-infrastructure", "ai-tools"], "entities": ["NInfer-all", "RTX 4090", "Qwen 27B", "Ternary Bonsai 2.5", "DFlash2", "CUDA 13.4", "SM89", "NInfer"], "also_reported_by": [], "takeaway": "On a single RTX 4090, DFlash2 speculative decoding at K7 lifted Qwen 27B decode from 70.38 tok/s without speculation to 326.41 tok/s, while K9 dropped to 269.33 tok/s, measured on 2048 prompt tokens and 128 decode tokens.", "recommendation": {"advice": "Tune speculative-decoding depth rather than maximizing it: on RTX 4090, DFlash2 K7 hit 326.41 tok/s on Qwen 27B versus 269.33 tok/s at K9, so benchmark each K value before committing.", "playbook": "inference-serving", "playbook_url": "https://wpnews.pro/playbooks/inference-serving"}, "alternates": {"html": "https://wpnews.pro/news/ninfer-rtx-4090-native-cuda-llm-inference-on-windows-up-to-326-tok-s-with-qwen", "markdown": "https://wpnews.pro/news/ninfer-rtx-4090-native-cuda-llm-inference-on-windows-up-to-326-tok-s-with-qwen.md", "text": "https://wpnews.pro/news/ninfer-rtx-4090-native-cuda-llm-inference-on-windows-up-to-326-tok-s-with-qwen.txt", "jsonld": "https://wpnews.pro/news/ninfer-rtx-4090-native-cuda-llm-inference-on-windows-up-to-326-tok-s-with-qwen.jsonld"}}