Unlock 250k Context on RTX 4090: Optimizing Qwen 3.8 with Custom Drafters
alexcovo_eth · x · 2026-08-23
The author achieved a 250,000 token context window for Qwen 3.8-27B on a single RTX 4090 (24GB) running at 75 tokens/s through specific optimizations.
Key Optimization Techniques:
- Custom 2-bit Drafter: Quantized the DFlash 2 drafter to Q2K, saving 450MB of VRAM while maintaining 100% draft acceptance and decode speed (76 t/s) in benchmarks.
- Hidden VRAM Tax: Discovered that llama-server reserves massive chunks of VRAM for multi-user batching by default. By passing the --parallel 1 flag, the engine dedicates the full 24GB buffer to a single user session.
Results:
Combining the VRAM savings from the Q2K drafter with the --parallel 1 flag caused the context ceiling to "absolutely explode," enabling the massive 250k context length on consumer hardware.
More from Infra
- Study: 603 data center restrictions in 445 US counties, all 42 ballot proposals rejected — huggingface · 2026-11-30
- Google Colab hands users a G4 Blackwell GPU, user reports — MickeySteamboat · 2026-11-30
- 19 GitHub Actions Runner Providers Benchmarked: Speed and Cost, Updated Weekly — DanielLockyer · 2026-11-30
- Learn Inference: An Interactive Guide to Serving Generative Models in Production — attentionmech · 2026-11-30
- open-daytona: rootless gVisor sandbox pool runs 1,536 concurrent agent-RL sandboxes on Slurm — victor_explore · 2026-11-30
- Notes on 'Looking Back at Postgres': Extensibility, No WAL, Open Source — sh_reya · 2026-11-30