Running DeepSeek at 1M Context on Single RTX 5090 via Adaptive Dual CUDA Graphs
BlackBeardAI · reddit · 2026-08-05
A developer shared the latest optimizations for running the massive DeepSeek-V4-Flash-0731 (155GB) on a single RTX 5090 while maintaining its native 1M token context.
Previously, fixed speculative decoding depth caused unstable throughput due to varying acceptance rates between hard reasoning and code generation. To fix this, the author developed a phase-adaptive mechanism:
- Switches to K=1 during the <think> reasoning phase.
- Switches back to K=2 for final content/code generation.
To prevent performance drops from mismatched CUDA graph shapes during switching, the author implemented dual CUDA graph capture. Ultimately, at the full 1M context, reasoning throughput reached 13.8 tok/s and code generation hit 17.0 tok/s.
Related event: Single RTX 5090 Runs DeepSeek 1M Context(2 posts)→
More from Infra
- Fully open-source FPGA toolchain lands for the $4 Vicharak Shrike board — Obijuan_cube · 2026-12-02
- Running torch nightly with CUDA 13.5 on 8x V100 via volta-forever, agent-driven setup — QuixiAI · 2026-12-02
- DeepSeek's Claimed 83.4% Ascend 950DT Margin Debunked: Losing ¥36.6/Hour at 60% Utilization — teortaxesTex · 2026-12-02
- One number = +27%: raising MLX's 20-op CUDA graph cap on DGX Spark boosts Qwen3 to 430 tok/s — AIFlow_ML · 2026-12-02
- Polymarket: Jensen Huang admits under oath Nvidia AI chips were diverted to China — Polymarket · 2026-12-02
- China pours billions into optical chips for AI data centers despite US curbs threat — pstAsiatech · 2026-12-02