majentik/gemma-4-31B-it-RotorQuant-GGUF-Q3_K_M
[!WARNING] Fork compatibility (2026-07-07): thellama-cpp-turboquantfork is currently based on a llama.cpp revision that predates `gemma4` architecture support — it fails withunknown model architecture: 'gemma4'and cannot run this model at all. Until the fork rebases, use mainline llama.cpp (which loads this GGUF fine with standard KV-cache types); the RotorQuant/TurboQuant KV-cache options are not usable with gemma-4 yet.
<!-- gemma4-fork-note -->
[!TIP] KV-cache quantization without any fork (recommended, 2026): upstream llama.cpp/Ollama now cover this natively — use-ctk q8_0 -ctv q8_0(~half KV memory, negligible quality loss: perplexity +0.002–0.05) or-ctk q4_0 -ctv q4_0(~quarter memory, ≈7.6% perplexity increase). In Ollama:OLLAMA_KV_CACHE_TYPE=q8_0withOLLAMA_FLASH_ATTENTION=1. Keep K and V types symmetric to stay on the fast fused Flash-Attention path. Since April 2026, mainline llama.cpp also applies Hadamard rotation to KV activations (PR #21038), which greatly improves low-bit KV quality (opt-out:LLAMA_ATTN_ROT_DISABLE=1). The RotorQuant/TurboQuant fork flow below is experimental/legacy: the TurboQuant llama.cpp PR was closed without merging (June 2026) and the fork is unmaintained relative to mainline. It is NOT required to use this model.
<!-- kv-upstream-note -->
gemma-4-31B-it-RotorQuant-GGUF-Q3KM
GGUF Q3KM weight-quantized variant of google/gemma-4-31B-it optimised for use with RotorQuant KV cache compression via a dedicated llama.cpp fork.
Important: RotorQuant KV cache types (planar3,iso3) are not available in upstream llama.cpp, standard Ollama, or LM Studio. They require a specific llama.cpp fork. The GGUF file itself is a standard GGUF and works with any llama.cpp-compatible runtime using normal KV cache types (f16, q80, q40, etc.).
Hardware compatibility
Overview
This model combines two independent compression techniques:
Quickstart
llama.cpp / LM Studio / Ollama (upstream)
The GGUF works as a normal quantised model. For KV-cache savings use the upstream path described in the tip at the top of this card (-ctk q8_0 -ctv q8_0, or q4_0); no fork is required.
llama.cpp (upstream)
llama-completion -no-cnv -m gemma-4-31B-it-RotorQuant-GGUF-Q3_K_M.gguf \
--cache-type-k q8_0 --cache-type-v q8_0 \
-ngl 99 -fa \
-p "Explain quantum computing"LM Studio
- Download the GGUF file and load in LM Studio.
- Enable Developer Mode (Settings → Developer).
- In the model loader's advanced settings, set Flash Attention to ON.
- Set K Cache Quantization and V Cache Quantization to
q8_0(orq4_0for more aggressive VRAM savings). - Note: LM Studio does not currently support RotorQuant's
iso3cache types. Track this feature request for updates.
Ollama
# Standard Ollama does not support RotorQuant cache types.
# Use with default or q8_0 KV cache via OLLAMA_KV_CACHE_TYPE=q8_0
OLLAMA_KV_CACHE_TYPE=q8_0 OLLAMA_FLASH_ATTENTION=1 ollama run majentik/gemma-4-31B-it-RotorQuant-GGUF-Q3_K_MSpecifications
About the RotorQuant / TurboQuant labels
RotorQuant and TurboQuant are this project's release labels, not distinct quantization algorithms — for any given tier, both brand repos carry byte-identical weights produced with the standard MLX / llama.cpp quantizers. No brand-specific speedup is claimed or measured. The KV-cache fork these labels originally referred to is legacy; for KV-cache memory savings use the upstream options described above (-ctk/-ctv q8_0, OLLAMA_KV_CACHE_TYPE).
Current Status of RotorQuant in the Ecosystem
Recommended Settings
For VRAM-constrained setups, standard q8_0 KV cache quantization already halves KV cache memory with negligible quality impact. Flash Attention should always be enabled — it is required for V cache quantization and improves memory efficiency regardless.
See Also
- RotorQuant GitHub
- llama-cpp-turboquant fork
- TurboQuant llama.cpp discussion
- TurboQuant paper (arXiv: 2504.19874)
- Base model: google/gemma-4-31B-it
- gemma-4-31B-it announcement
Quant trade-off (GGUF lane)
(Current variant — Q3_K_M — is bolded.)
Variants in this family
(Showing 14 sibling variants under majentik/gemma-4-31b-it-*. The current variant — RotorQuant-GGUF-Q3_K_M — is bolded.)
