majentik commited on
Commit
3f9cb29
·
verified ·
1 Parent(s): c20ba45

docs: upstream-first KV-cache guidance (q8_0/q4_0, mainline Hadamard rotation); fork demoted to experimental

Browse files
Files changed (1) hide show
  1. README.md +17 -0
README.md CHANGED
@@ -14,6 +14,23 @@ license: apache-2.0
14
  pipeline_tag: image-text-to-text
15
  ---
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  # Gemma 4 E4B - RotorQuant MLX 2-bit
18
 
19
  **2-bit weight-quantized MLX version** of [google/gemma-4-E4B](https://huggingface.co/google/gemma-4-E4B) with RotorQuant KV-cache quantization. Optimized for Apple Silicon inference via the [MLX](https://github.com/ml-explore/mlx) framework. RotorQuant delivers 5.3x faster prefill and 28% faster decode compared to TurboQuant. The most aggressive quantization, fitting the full model in the smallest possible footprint.
 
14
  pipeline_tag: image-text-to-text
15
  ---
16
 
17
+ > [!TIP]
18
+ > **KV-cache quantization without any fork (recommended, 2026):** upstream
19
+ > llama.cpp/Ollama now cover this natively — use `-ctk q8_0 -ctv q8_0`
20
+ > (~half KV memory, negligible quality loss: perplexity +0.002–0.05) or
21
+ > `-ctk q4_0 -ctv q4_0` (~quarter memory, ≈7.6% perplexity increase). In
22
+ > Ollama: `OLLAMA_KV_CACHE_TYPE=q8_0` with `OLLAMA_FLASH_ATTENTION=1`. Keep
23
+ > K and V types symmetric to stay on the fast fused Flash-Attention path.
24
+ > Since April 2026, mainline llama.cpp also applies Hadamard rotation to
25
+ > KV activations ([PR #21038](https://github.com/ggml-org/llama.cpp/pull/21038)),
26
+ > which greatly improves low-bit KV quality (opt-out:
27
+ > `LLAMA_ATTN_ROT_DISABLE=1`).
28
+ >
29
+ > The RotorQuant/TurboQuant fork flow below is **experimental/legacy**: the
30
+ > TurboQuant llama.cpp PR was closed without merging (June 2026) and the fork
31
+ > is unmaintained relative to mainline. It is NOT required to use this model.
32
+ <!-- kv-upstream-note -->
33
+
34
  # Gemma 4 E4B - RotorQuant MLX 2-bit
35
 
36
  **2-bit weight-quantized MLX version** of [google/gemma-4-E4B](https://huggingface.co/google/gemma-4-E4B) with RotorQuant KV-cache quantization. Optimized for Apple Silicon inference via the [MLX](https://github.com/ml-explore/mlx) framework. RotorQuant delivers 5.3x faster prefill and 28% faster decode compared to TurboQuant. The most aggressive quantization, fitting the full model in the smallest possible footprint.