People often tell me that something is “impossible”… but when it actually works, they suddenly have nothing to say.
They claim that a 10M context with 90%+ coherence is undoable? Well, Grok publicly rated my solution on X (Twitter) as a 9.8 out of 10… for achieving a 60M context with 90%+ coherence.
Today, I want to share a successful stress-test optimization that allowed me to push the Qwen 3.6 MoE (35B-A3B) model far beyond its native limits on a single consumer-grade RTX 5060 Ti 16GB GPU, while keeping all 99 layers completely in VRAM.
My Setup & Metrics
GPU: RTX 5060 Ti 16GB (GDDR7)
Model: Qwen3.6-35B-A3B-12Gb-2.6763bpw.gguf
Context processed: 353,993 tokens (real usage inside a live coding session)
VRAM allocation: 15166 MiB / 16311 MiB (with around 1.1GB still free — and this includes the OS + 2 open browsers!)
Prefill time: 8m 14s (~716 tok/s at the very end of the 353k chunk)
Decode speed: 24.9 - 25.9 tok/s (Prompt Caching works perfectly on follow-up turns!)
Key Takeaways
You can easily push the limit up to 450k tokens without crashing the system. Pushing to 500k is possible, but it’s right on the edge.
The model remains completely coherent (I haven’t strictly verified the code execution accuracy at this scale yet, but the logic holds up).
Thanks to Prompt Caching, it works incredibly well. Getting 25 tok/s at this context scale speaks for itself. Massive kudos to the llama.cpp team!
The smart quant model squeezed down to exactly 11.7GB is beyond praise. Low bow to the author of this quant!
Deep Dive & The Solution (How to bypass HTTP 400 & Capping)
Standard parameters like qwen2.context_length or bare context_length overrides were ignored by the recent llama-server builds with CUDA 13.3, forcing a 256k slot cap. The hard limit of the model was successfully forced-overridden via the correct metadata key: --override-kv qwen35moe.context_length=int:400000.
Here is the exact launch command that made this rock-solid stable:
Just wanted to update this thread! Yesterday, we conducted the exact same stress-test architecture, but this time on a flagship RTX 5090 32GB GPU.
And the results are absolutely mind-blowing:
Context window forced to:1,500,000 tokens!!!
Total VRAM allocation: Only 23.8 GB out of 32 GB total (including Windows OS + 2 active browsers)!
Live context filled to:1.18 Million tokens (ingested around 2,000 pages of real heavy PDF documentation).
After the massive ~10-minute prefill phase, we ran a thorough sanity check testing the model on complex isolated code generation and abstract logic. The Qwen 3.6 MoE model remained 100% coherent, fully responsive, and perfectly functional, generating pristine code structures at a blistering 35 tok/s!
And yes — the entire 1.5M context pipeline runs COMPLETELY inside a single GPU! No system RAM offloading, no dual-card setups. Just raw, optimized single-card dominance.
This is great stuff! I’m wanting to try this out with my 5090, but not ready for downtime to experiment with yet. Has this held up for you long term? I do have a modded RTX 4090 48gb too, and I’m curious if you’ve tried this out on a non-MoE like Qwen 3.8 27B for more context for higher effor tasks?
I can’t imagine this is useful in a autonomous setting. Can it build something accurately? I use 16GB VRAM andsometimes push the usage to 15.2GB in a single model, the weights aren’t that strong, there is more failures over 64k tokens when VRAM in at 90%+ than if I use a model better sized for the card.
I use Qwen3.8-27B-UD-Q2_K_XL and it cannot surpass 128k without a OOM with llama.cpp. ~13.2GB before context.
For autonomous verfied responses(as in something else checks the work) I can’t trust more than 64K, over that and the quant weights are iffy at best. The repeat loops are funny sometimes, but the quant context pressure seems varied per model weights.
I’d love to see the 16GB card(qwen3.6-35b-a3b-12gb-2.6763bpw.gguf) run a software buildout with a follow up cloud model to judge and grade it. That’s my method of validating local models currently.
So just wanted to chime in that I have been testing this on my 4090, and so far have had good results. I kept getting OOM (I am on windows) when testing qwen3.6 q4, and context size kept being my limiting factor. So far I have been able to complete the coding effort I was testing with, which involves needed to parse a 2k line file, and the 400k context appears to be valid.
So far being able to still use my system while the model is running doing things has been great. I needed to tweak some settings (direct IO seems to work better for me), but so far so good.
Shortly I will be testing refactoring that 2k file to modularize it, which should really help test the context limits. I have spare VRAM headroom so may see how much I want to consume for extra context with this.