Add article
Browse files
README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: 10 Kv Cache Quantization
|
| 3 |
+
author: kleinnner
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# We attempted KV cache quantization to Q4 — and documented why it fails on the qwen2vl architecture.
|
| 7 |
+
|
| 8 |
+
**KV Cache Quantization Attempt: type_k/type_v on qwen2vl Architecture**
|
| 9 |
+
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
## The Problem
|
| 13 |
+
|
| 14 |
+
The KV cache consumes significant memory bandwidth during autoregressive generation. On CPU-bound systems, memory bandwidth is the primary bottleneck. Quantizing the KV cache from FP16 to Q4 theoretically halves memory bandwidth requirements.
|
| 15 |
+
|
| 16 |
+
## What We Built
|
| 17 |
+
|
| 18 |
+
We attempted to enable Q4_0, Q4_1, and Q8_0 quantization for both K and V cache states via the type_k and type_v parameters in llama.cpp v0.3.31.
|
| 19 |
+
|
| 20 |
+
## The Research
|
| 21 |
+
|
| 22 |
+
type_k and type_v parameters accept GGML quantization type integers: 2 (Q4_0), 3 (Q4_1), 7 (Q8_0). Models must be loaded with these parameters set at initialization. We tested all three values with the qwen2vl architecture.
|
| 23 |
+
|
| 24 |
+
## Results
|
| 25 |
+
|
| 26 |
+
| Cache config | Result |
|
| 27 |
+
|---|---|
|
| 28 |
+
| type_k=2, type_v=2 (Q4_0) | Failed to create llama_context |
|
| 29 |
+
| type_k=3, type_v=3 (Q4_1) | Failed to create llama_context |
|
| 30 |
+
| type_k=7, type_v=7 (Q8_0) | Failed to create llama_context |
|
| 31 |
+
|
| 32 |
+
All three quantization types failed. Error message: "Failed to create llama_context." This is a known limitation: the qwen2vl architecture in llama.cpp v0.3.31 does not support independent KV cache quantization. The GGUF is already Q4_K_M quantized and the KV cache cannot be further quantized without upstream support in llama.cpp.
|
| 33 |
+
|
| 34 |
+
## Conclusion
|
| 35 |
+
|
| 36 |
+
KV cache quantization is not currently supported for the qwen2vl architecture in llama.cpp v0.3.31. This feature requires upstream support in the llama.cpp codebase.
|
| 37 |
+
|
| 38 |
+
> **Full citation:** Alpasan, L.-K. (2026). KV Cache Quantization Attempt on qwen2vl Architecture. *The Anticloud Research Corpus.*
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
### Why The Anticloud
|
| 43 |
+
|
| 44 |
+
Every AI system you have ever used was designed to extract value from you — your data, your attention, your money. The Anticloud is not a service. It is not in the cloud. It is not rentable inference. It is a fundamentally different category of infrastructure, and here is what that means in practice.
|
| 45 |
+
|
| 46 |
+
Your data never leaves your machine. We designed the system so we physically cannot access it. Access is not restricted by policy — it is structurally impossible by architecture. There is no data to steal because there is no server to steal it from.
|
| 47 |
+
|
| 48 |
+
The system is airgapped by architecture, not by configuration. It does not require a network connection to function. It was built offline, it runs offline, and it never reaches out to anyone for any reason. Connectivity is simply not a prerequisite for intelligence.
|
| 49 |
+
|
| 50 |
+
```
|
| 51 |
+
.====================================================================.
|
| 52 |
+
! Made in the UAE, Dubai #DubaiIt #Dubai #Dxb #SovereignAI !
|
| 53 |
+
! Made in The Emirates #Dubai_it !
|
| 54 |
+
! !
|
| 55 |
+
! Lois-Kleinner Alpasan - The Anticloud 2026- !
|
| 56 |
+
! !
|
| 57 |
+
! 0-1.gg ! GitHub ! LinkedIn ! DEV ! GH Pages !
|
| 58 |
+
! HuggingFace ! Blog ! Tumblr ! Fandom ! Bluesky ! Mastodon !
|
| 59 |
+
! Zenodo ! Harvard Dataverse ! Internet Archive ! ORCID !
|
| 60 |
+
! !
|
| 61 |
+
! Sovereign AI ! Local-First ! Privacy ! Zero Trust ! No Datacenter !
|
| 62 |
+
! Air-Gapped ! Open Source ! Rust ! Hash Chain ! Single Binary !
|
| 63 |
+
! Offline LLM ! Crypto Ledger ! P2P ! Federated !
|
| 64 |
+
'===================================================================='
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
Lois-Kleinner Alpasan, 22, has served executive roles spanning technology, operations, finance, and product across 20+ organizations. His cross-functional work combines architecture, business, and AI strategy.
|
| 68 |
+
|
| 69 |
+
References:
|
| 70 |
+
1. Lois-Kleinner Zenodo: https://doi.org/10.5281/zenodo.20781790
|
| 71 |
+
2. Lois-Kleinner GitHub: https://github.com/kleinnner/Anticloud/tree/main/04-aioss-format
|
| 72 |
+
3. Lois-Kleinner Harvard DV: https://doi.org/10.7910/DVN/GKUDHE
|
| 73 |
+
4. Lois-Kleinner Internet Arc: https://archive.org/details/aioss-format
|
| 74 |
+
5. Lois-Kleinner ORCID: https://orcid.org/0009-0009-2233-6107
|
| 75 |
+
6. Lois-Kleinner DEV.to: https://dev.to/kleinner
|
| 76 |
+
7. Lois-Kleinner LinkedIn: https://linkedin.com/in/kleinner
|
| 77 |
+
8. Lois-Kleinner HuggingFace: https://huggingface.co/Anticloud
|
| 78 |
+
9. Lois-Kleinner Tumblr: https://anticloud.tumblr.com
|
| 79 |
+
10. Lois-Kleinner Mastodon: https://mastodon.social/@kleinner
|
| 80 |
+
11. Lois-Kleinner Bluesky: https://bsky.app/profile/kleinner.bsky.social
|
| 81 |
+
12. 0-1.gg: https://0-1.gg
|