Locally Explains

Your 128K local AI setting has a hidden memory bill

Checked 2026-09-26. Primary sources only: vendor model cards and config.json files, vendor announcements, official documentation and arXiv. KV cache arithmetic uses the standard formula 2 (K and V) x layers-with-KV x kv_heads x head_dim x bytes-per-element x tokens, and 1 GiB = 2^30 bytes, 1 MiB = 2^20 bytes.


1. RTX 3090 has 24GB of video memory

2. Qwen3-8B: 128K (131,072) via YaRN, native 32,768, YaRN needs supported configuration

3. Qwen3-8B KV cache: 18 GiB at 131,072, 4.5 GiB at 32,768 (fp16)

4. Devstral Small 2: 24B, 256K, repo work with tools, 68% SWE-bench Verified; KV 20 GiB @128K fp16, ~2.5 GiB @32K 8-bit

5. Qwen3.6-35B-A3B: hybrid, mostly recurrent-state layers; 35B total / ~3B active; full-attention KV 2.5 GiB @131,072; 4-bit weights + KV = 18.8 GiB

6. Qwen3.8-27B: released August 2026, dense, hybrid attention, native window > 128K; full-attention KV 8 GiB @131,072; SWE-bench Pro 61.7 vs 53.5

7. NVIDIA Nemotron 3 Nano 30B A3B: hybrid Mamba + attention + sparse MoE; up to 1M tokens, smaller default for memory reasons

8. DeepSeek V4.1 Flash: 890 bytes/token global KV (compressed design + 4-bit cache); 552B backbone + separate large conditional memory; 890 x 131,072 = ~111 MiB

9. DeepSeek-R1-Distill-Qwen models are built on Qwen base architectures

10. Ollama: q8_0 about 1/2 of f16, q4_0 about 1/4; q4_0 precision loss more noticeable at higher context; support depends on model/backend

11. llama-bench separates prompt processing (pp) from text generation (tg)

12. vLLM automatic prefix caching: reuses shared-prefix KV, saves prefill, does not speed up decoding

13. RULER: tests beyond needle-in-a-haystack, including multi-hop tracing and aggregation

14. A gibibyte is 2^30 bytes

15. 24e9 params at 4 bits = 11.18 GiB


Notes

All figures shown are confirmed by the primary sources above. Context worth knowing:


Figures derived for the picture

The same arithmetic as above, applied to published parameter counts and configs. Weights at an ideal 4 bits are parameters x 0.5 bytes; KV is 2 x attention layers x KV heads x head dimension x 2 bytes x 131,072 tokens. Neither includes quantization overhead, runtime buffers or recurrent state.