I saw that BasinKV added Qwen4-35B-A3B support. How does it fit a 256K context on a 24 GB GPU, and which inference engines support it?
Can BasinKV really run Qwen4-35B-A3B at 256K context on a 24 GB GPU?
Answers
The reported setup uses llama.cpp and keeps a smaller working set of the KV cache on the GPU, with the rest stored in host memory. It uses Qwen4's own trained attention indexer to select which cached tokens to fetch over PCIe.
The developers report testing 256K context on a 24 GB NVIDIA L4 without going below Q4 weight quantization. They also say decode speed stays stable as the context grows. That's a reported result for their setup, not a guarantee for every 24 GB card or workload.
Reply to this answer
Native support was announced for llama.cpp. SGLang and vLLM integrations were described as in development, so I wouldn't assume those are ready yet. The developers also said PolyStrata has an implementation based on their work.
Reply to this answer
The interesting bit is that it doesn't swap out Qwen4's learned indexer for a separate scoring method. The indexer stays on the GPU, while a fixed-size GPU working set sits in front of host-side INT8 KV storage. An INT4 option was also mentioned.
In the reported comparison, ordinary llama.cpp ran out of GPU memory at 32K on the L4, while BasinKV was tested at 256K. That makes the memory saving the main thing to look at, separate from the speed claim.
Reply to this answer
If this has you looking at a used 3090, check the price before treating it as an automatic upgrade. The announced 24 GB test was on an L4, not a 3090, so it would be worth checking results for your intended hardware and setup.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Kelsey:
Host memory and the PCIe connection are part of the setup too, so 24 GB of VRAM isn't the whole hardware requirement.