gpt-oss-20b-RotorQuant-GGUF-Q2_K
GGUF Q2_K weight-quantized variant of openai/gpt-oss-20b 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, q8_0, q4_0, etc.).
Hardware compatibility
| Device | VRAM / RAM | Recommendation |
|---|---|---|
| CPU host with β₯8 GB RAM | ~7.9 GB | works via llama.cpp; slower than GPU but no accelerator required |
| Apple Silicon (Metal) | ~8.6 GB | llama.cpp Metal backend; fast on M-series unified memory |
| NVIDIA GPU (partial offload) | split between GPU + RAM | offload as many layers as VRAM allows; rest on CPU |
Overview
This model combines two independent compression techniques:
| Technique | What it does | Requirement |
|---|---|---|
| GGUF Q2_K weight quantization | Reduces model size from ~40 GB (BF16) to ~7.2 GB | Any llama.cpp-compatible runtime |
RotorQuant KV cache compression β block-diagonal Clifford-algebra rotors for 3-bit KV cache (--cache-type-k iso3 --cache-type-v iso3) |
Block-diagonal rotations / random rotation for compressed KV cache | llama-cpp-turboquant fork only |
Quickstart
Option A β With RotorQuant KV cache (fork required)
You must build from the RotorQuant-enabled llama.cpp fork:
# Clone and build the fork
git clone https://github.com/johndpope/llama-cpp-turboquant.git
cd llama-cpp-turboquant && git checkout feature/planarquant-kv-cache
# CUDA (Windows/Linux)
cmake -B build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release && cmake --build build -j
# Metal (Apple Silicon)
cmake -B build -DGGML_METAL=ON -DGGML_METAL_EMBED_LIBRARY=ON -DCMAKE_BUILD_TYPE=Release && cmake --build build -j
# Run with RotorQuant KV cache
./build/bin/llama-cli -m gpt-oss-20b-RotorQuant-GGUF-Q2_K.gguf \
--cache-type-k iso3 --cache-type-v iso3 \
-ngl 99 -fa \
-p "Explain quantum computing"
# Or run as a server
./build/bin/llama-server -m gpt-oss-20b-RotorQuant-GGUF-Q2_K.gguf \
--cache-type-k iso3 --cache-type-v iso3 \
-ngl 99 -fa --jinja
Option B β With standard llama.cpp / LM Studio / Ollama
The GGUF works as a normal quantised model. You won't get RotorQuant-specific KV cache benefits, but standard KV cache quantization (q8_0, q4_0) still reduces VRAM significantly.
llama.cpp (upstream)
llama-cli -m gpt-oss-20b-RotorQuant-GGUF-Q2_K.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/gpt-oss-20b-RotorQuant-GGUF-Q2_K
Specifications
| Property | Value |
|---|---|
| Base Model | openai/gpt-oss-20b |
| Architecture | Sparse MoE |
| Parameters | 20B total (MoE) |
| Context Length | 128K |
| Weight Quantization | GGUF Q2_K (aggressive 2-bit, noticeable quality drop) |
| Original Size (BF16) | ~40 GB |
| Quantized File Size | ~7.2 GB |
| KV Cache (RotorQuant) | 3-bit via --cache-type-k iso3 --cache-type-v iso3 (fork only) |
| KV Cache (standard) | q8_0, q4_0, f16, etc. (any llama.cpp runtime) |
| License | apache-2.0 |
| Modalities | Text only |
| Compatible Runtimes | llama.cpp, LM Studio, Ollama, koboldcpp |
What is RotorQuant?
RotorQuant is a KV cache compression method based on Clifford algebra (Cl(3,0)) rotors. It was developed as a faster, more parameter-efficient alternative to Google's TurboQuant (ICLR 2026).
Instead of applying a dense dΓd random orthogonal rotation matrix (as TurboQuant does), RotorQuant uses lightweight block-diagonal rotations β independent 2D/4D rotations per pair/quartet β achieving O(d) complexity instead of O(d log d), fully parallelisable with no inter-element dependencies.
Benchmarks from the RotorQuant repository (Llama 3.1 8B, RTX 5090 β results will vary by model and hardware):
| Metric | RotorQuant (iso3) | TurboQuant | Standard q4_0 |
|---|---|---|---|
| Prefill Speed | 3,822 tok/s | 722 tok/s | β |
| Decode Speed | 119 tok/s | 93 tok/s | β |
| Perplexity (PPL) | 6.91 | 7.07 | β |
| KV Compression | ~5Γ vs FP16 | ~5Γ vs FP16 | ~4Γ vs FP16 |
| Rotation Parameters | 4 per rotor | 16,384 per matrix | N/A |
Note: These benchmarks are from the RotorQuant repository using Llama 3.1 8B on an RTX 5090. Performance on gpt-oss-20b will differ. Independent benchmarks for this specific model are welcome β please open a discussion if you have results to share.
Current Status of RotorQuant in the Ecosystem
| Runtime | RotorQuant Support | Standard KV Quant |
|---|---|---|
| llama.cpp (upstream) | β Not merged | β q8_0, q4_0, q4_1, iq4_nl, q5_0, q5_1 |
| llama-cpp-turboquant fork | β planar3, iso3 | β All standard types |
| LM Studio | β Requested | β Via advanced settings |
| Ollama | β Not supported | β Via OLLAMA_KV_CACHE_TYPE |
| koboldcpp | β Not supported | β Standard types |
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.
| VRAM | Suggested Configuration |
|---|---|
| 24 GB (RTX 4090) | Q2_K + q8_0 KV cache + Flash Attention, 8Kβ16K context |
| 16 GB | Q2_K + q4_0 KV cache + Flash Attention, 4Kβ8K context |
| 48+ GB | Q2_K + f16 KV cache, full 32K+ context |
See Also
- RotorQuant GitHub
- llama-cpp-turboquant fork
- TurboQuant llama.cpp discussion
- TurboQuant paper (arXiv: 2504.19874)
- Base model: openai/gpt-oss-20b
- gpt-oss-20b announcement
Quant trade-off (GGUF lane)
| Quant | Approx size | Use case | Recommendation |
|---|---|---|---|
| Q2_K | ~11 GB | Lossy, low-RAM CPU/edge | Resource-constrained inference |
| Q3_K_M | ~12 GB | Smaller-than-Q4, modest quality drop | Edge devices with ~16 GB RAM |
| IQ4_XS | ~10 GB | Importance-quant 4-bit, smaller than Q4_K_M | Best size/quality at 4-bit |
| Q4_K_M | ~15 GB | Balanced default | Recommended for most users |
| Q5_K_M | ~16 GB | Higher fidelity than Q4 | Quality-sensitive applications |
| Q6_K | ~18 GB | Approaching FP16 quality | High-fidelity CPU/edge |
| Q8_0 | ~20 GB | Near-lossless reference | Fidelity-critical work |
| MXFP4_MOE | ~11 GB | Microscaling FP4 (MoE-aware) | vLLM / transformers users |
(Current variant β Q2_K β is bolded.)
Variants in this family
(Showing 14 sibling variants under majentik/gpt-oss-20b-*. The current variant β RotorQuant-GGUF-Q2_K β is bolded.)
| Variant | Runtime | Approx size | Use case |
|---|---|---|---|
| RotorQuant | runtime modifier | n/a | KV-cache root (weight-agnostic) |
| RotorQuant-GGUF-IQ4_XS | llama.cpp | ~17 GB | Lossy 4-bit, low-RAM CPU/edge |
| RotorQuant-GGUF-Q2_K | llama.cpp | ~12 GB | Lossy, low-RAM CPU/edge |
| RotorQuant-GGUF-Q3_K_M | llama.cpp | ~16 GB | Smaller 3-bit, CPU-friendly |
| RotorQuant-GGUF-Q4_K_M | llama.cpp | ~22 GB | Balanced default |
| RotorQuant-GGUF-Q5_K_M | llama.cpp | ~26 GB | Higher fidelity, more RAM |
| RotorQuant-GGUF-Q8_0 | llama.cpp | ~42 GB | Near-lossless reference |
| RotorQuant-MLX-2bit | mlx-lm | ~6.4 GB | Apple Silicon, smallest |
| RotorQuant-MLX-4bit | mlx-lm | ~12 GB | Apple Silicon balanced |
| RotorQuant-MLX-8bit | mlx-lm | ~24 GB | Apple Silicon reference |
| TurboQuant | runtime modifier | n/a | KV-cache root (weight-agnostic) |
| TurboQuant-MLX-2bit | mlx-lm | ~6.4 GB | Apple Silicon, smallest |
| TurboQuant-MLX-4bit | mlx-lm | ~12 GB | Apple Silicon balanced |
| TurboQuant-MLX-8bit | mlx-lm | ~24 GB | Apple Silicon reference |
- Downloads last month
- 186
2-bit
Model tree for majentik/gpt-oss-20b-RotorQuant-GGUF-Q2_K
Base model
openai/gpt-oss-20b