The Pulse
BasinKV runs Qwen4-35B-A3B at 256K context on a 24 GB NVIDIA L4, Zellige says
Zellige reports running Qwen4-35B-A3B at 256K context on an NVIDIA L4 using BasinKV's cache offloading. Its tests also compare decoding speed, memory use and quality against stock llama.cpp on larger GPUs.

BasinKV ran Qwen4-35B-A3B with a 256K context on a 24 GB NVIDIA L4 GPU, using 21.8 GiB of peak GPU memory, according to tests published by Zellige AI. In the company's comparison, stock llama.cpp ran out of GPU memory at 32K on the same class of GPU.
The integration uses Qwen4's own attention indexer to move portions of its key-value cache between host memory and a fixed GPU working set. Zellige published the results on December 5 for BasinKV API v12 in llama.cpp.
Fitting the model on an L4
Qwen4-35B-A3B has Query-Sparse Attention on 10 full-attention layers, alongside 30 Gated DeltaNet layers. Its trained indexer pools keys in groups of four tokens and selects the top 2,048 tokens for each query; the attention calculation is reduced, but the full cache still occupies GPU memory in stock llama.cpp.
BasinKV uses that indexer while keeping pooled keys on the GPU and placing a working set of 4,096 tokens, plus a 64-token recent ring, ahead of a host-memory cache. The host cache uses INT8 by default, with WHT-INT4 available as an option.
In the L4 setup, the UD-Q4_K_M model's roughly 10.8 GiB of PLE embedding tables sit in host RAM, while roughly 21.2 GiB of model weights are on the GPU. To fit within the L4's ECC-enabled memory budget, the test offloaded one mixture-of-experts layer's routed experts to the CPU while keeping all 40 Gated DeltaNet and Query-Sparse Attention layers on the GPU.
At 256K, the L4 test generated 43.6 tokens per second and processed the prompt at 1,433 tokens per second, Zellige reported. A separate uncontended L4 sweep recorded 38.2 tokens per second at 256K; the company said shared cloud CPU contention had briefly affected a 32K measurement in the paired test.
Speed and quality comparisons
On an A100-SXM4-80GB at 256K, BasinKV processed the prompt at 3,632 tokens per second, compared with 4,357 for stock llama.cpp, according to the tests. In the same comparison, decoding reached 77.1 tokens per second against 67.2 for stock, while peak GPU memory was 23.0 GiB versus 30.1 GiB.
On an AMD Instinct MI300X, Zellige measured 89.8 tokens per second for BasinKV INT8 decoding at 256K, compared with 78.3 for stock. Peak GPU memory was 24.5 GiB versus 31.5 GiB, while BasinKV's prefill speed was 5,167 tokens per second, or 70.0% of stock.
Zellige reported exact matches on its 256K RULER tests for both stock and BasinKV INT8. In an 18-turn coding test at 16K and 32K, BasinKV INT8 scored 15 out of 18, compared with 12 out of 18 for stock; both recorded zero stale results.
An optional WHT-INT4 host-cache mode fell to six out of 18 on that coding test, despite both compression modes scoring 100% on 256K RULER, the company said. Zellige recommends retaining INT8 for Qwen4.
Prompt caching
BasinKV also offers RAM and NVMe prompt caching for the Qwen4 attention pools. On the same 15,976-token prompt on MI300X, Zellige measured a cold prompt evaluation at 2,795 milliseconds and a warm in-RAM prefix hit at 114 milliseconds.
An explicit save and restore through NVMe took 570 milliseconds end to end for restore plus evaluation in that test, according to the company. Automatic NVMe caching is process-local; the explicit save and restore mechanism supports persistence across server restarts.
Sources
Checked against this page · 1
This story
- Original source Zellige AI “BasinKV for Qwen4: 256K Context on a 24 GB GPU” zellige.ai
Related stories
- ggml-org opens public llama.cpp benchmarks for two AMD Radeon chips
- llama.cpp 1.0 sets versioning rules for local AI developers
- AI agents weakened model safeguards through weight edits, preprint finds
- Ai2's Vernier turns NOAA's 3 km HRRR forecasts into 100 m weather maps
- Apple’s CoRe trains image and text representations for understanding and generation