majentik commited on
Commit
479ac03
Β·
verified Β·
1 Parent(s): 096bc38

Update model card with accurate fork requirements and ecosystem status

Browse files
Files changed (1) hide show
  1. README.md +111 -31
README.md CHANGED
@@ -1,70 +1,150 @@
1
  ---
2
- library_name: gguf
3
  base_model: Qwen/Qwen3.5-27B
4
  tags:
5
  - gguf
6
  - rotorquant
7
  - kv-cache-quantization
8
  - qwen
9
- - qwen3
10
- - moe
11
- - thinking
12
  - llama-cpp
13
  - quantized
14
- license: apache-2.0
 
15
  ---
16
 
17
  # Qwen3.5-27B-RotorQuant-GGUF-IQ4_XS
18
 
19
- GGUF IQ4_XS weight-quantized variant of [Qwen/Qwen3.5-27B](https://huggingface.co/Qwen/Qwen3.5-27B) with **RotorQuant** KV cache compression for efficient inference with llama.cpp, Ollama, and LM Studio.
 
 
 
 
20
 
21
  ## Overview
22
 
23
- This model combines two compression techniques:
24
- - **GGUF IQ4_XS weight quantization** β€” reduces model size from ~54GB to ~14 GB
25
- - **RotorQuant KV cache compression** β€” block-diagonal rotations (Clifford algebra) for 3-bit KV cache, 5.3x faster prefill
 
 
 
26
 
27
  ## Quickstart
28
 
29
- ### llama.cpp
 
 
 
30
  ```bash
31
- llama-cli -m Qwen3.5-27B-RotorQuant-GGUF-IQ4_XS.gguf \
32
- --cache-type-k planar3 --cache-type-v iso3 \
 
 
 
 
 
 
 
 
 
 
 
 
33
  -p "Explain quantum computing"
 
 
 
 
 
34
  ```
35
 
36
- ### Ollama
 
 
 
 
37
  ```bash
38
- ollama run majentik/Qwen3.5-27B-RotorQuant-GGUF-IQ4_XS
 
 
 
39
  ```
40
 
41
- ### LM Studio
42
- Download the GGUF file and load in LM Studio. Enable RotorQuant KV cache in advanced settings.
 
 
 
 
 
 
 
 
 
 
 
43
 
44
  ## Specifications
45
 
46
  | Property | Value |
47
  |----------|-------|
48
- | Base Model | Qwen/Qwen3.5-27B |
49
- | Parameters | 27B hybrid MoE |
50
- | Weight Quantization | GGUF IQ4_XS |
51
- | KV Cache | RotorQuant 3-bit (planar/iso) |
52
- | File Size | ~14 GB |
53
- | License | Apache 2.0 |
54
- | Compatible | llama.cpp, Ollama, LM Studio, koboldcpp |
 
 
 
 
 
55
 
56
  ## What is RotorQuant?
57
 
58
- RotorQuant applies block-diagonal rotations (Clifford algebra) for KV cache compression. When used with llama.cpp's `--cache-type-k planar3 --cache-type-v iso3` flags:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
- | Metric | RotorQuant | TurboQuant |
61
- |--------|-----------|-----------|
62
- | Prefill Speed | 3,822 tok/s | 722 tok/s |
63
- | Decode Speed | 119 tok/s | 93 tok/s |
64
- | Perplexity | 6.91 | 7.07 |
65
 
66
  ## See Also
67
 
68
  - [RotorQuant GitHub](https://github.com/scrya-com/rotorquant)
69
- - [Base model](https://huggingface.co/Qwen/Qwen3.5-27B)
70
- - [MLX variants](https://huggingface.co/majentik/Qwen3.5-27B-RotorQuant-MLX-4bit)
 
 
 
 
1
  ---
2
+ license: apache-2.0
3
  base_model: Qwen/Qwen3.5-27B
4
  tags:
5
  - gguf
6
  - rotorquant
7
  - kv-cache-quantization
8
  - qwen
9
+ - qwen3.5
 
 
10
  - llama-cpp
11
  - quantized
12
+ library_name: gguf
13
+ pipeline_tag: text-generation
14
  ---
15
 
16
  # Qwen3.5-27B-RotorQuant-GGUF-IQ4_XS
17
 
18
+ GGUF IQ4_XS weight-quantized variant of [Qwen/Qwen3.5-27B](https://huggingface.co/Qwen/Qwen3.5-27B) optimised for use with **RotorQuant** KV cache compression via a dedicated llama.cpp fork.
19
+
20
+ > **Important:** RotorQuant KV cache types (`planar3`, `iso3`) are **not** available in upstream llama.cpp, standard Ollama, or LM Studio.
21
+ > They require a [specific llama.cpp fork](https://github.com/johndpope/llama-cpp-turboquant/tree/feature/planarquant-kv-cache).
22
+ > 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.).
23
 
24
  ## Overview
25
 
26
+ This model combines two independent compression techniques:
27
+
28
+ | Technique | What it does | Requirement |
29
+ |-----------|-------------|-------------|
30
+ | **GGUF IQ4_XS weight quantization** | Reduces model size from ~56 GB (BF16) to ~14.0 GB | Any llama.cpp-compatible runtime |
31
+ | **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](https://github.com/johndpope/llama-cpp-turboquant/tree/feature/planarquant-kv-cache) only |
32
 
33
  ## Quickstart
34
 
35
+ ### Option A β€” With RotorQuant KV cache (fork required)
36
+
37
+ You must build from the RotorQuant-enabled llama.cpp fork:
38
+
39
  ```bash
40
+ # Clone and build the fork
41
+ git clone https://github.com/johndpope/llama-cpp-turboquant.git
42
+ cd llama-cpp-turboquant && git checkout feature/planarquant-kv-cache
43
+
44
+ # CUDA (Windows/Linux)
45
+ cmake -B build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release && cmake --build build -j
46
+
47
+ # Metal (Apple Silicon)
48
+ cmake -B build -DGGML_METAL=ON -DGGML_METAL_EMBED_LIBRARY=ON -DCMAKE_BUILD_TYPE=Release && cmake --build build -j
49
+
50
+ # Run with RotorQuant KV cache
51
+ ./build/bin/llama-cli -m Qwen3.5-27B-RotorQuant-GGUF-IQ4_XS.gguf \
52
+ --cache-type-k iso3 --cache-type-v iso3 \
53
+ -ngl 99 -fa \
54
  -p "Explain quantum computing"
55
+
56
+ # Or run as a server
57
+ ./build/bin/llama-server -m Qwen3.5-27B-RotorQuant-GGUF-IQ4_XS.gguf \
58
+ --cache-type-k iso3 --cache-type-v iso3 \
59
+ -ngl 99 -fa --jinja
60
  ```
61
 
62
+ ### Option B β€” With standard llama.cpp / LM Studio / Ollama
63
+
64
+ 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.
65
+
66
+ **llama.cpp (upstream)**
67
  ```bash
68
+ llama-cli -m Qwen3.5-27B-RotorQuant-GGUF-IQ4_XS.gguf \
69
+ --cache-type-k q8_0 --cache-type-v q8_0 \
70
+ -ngl 99 -fa \
71
+ -p "Explain quantum computing"
72
  ```
73
 
74
+ **LM Studio**
75
+ 1. Download the GGUF file and load in LM Studio.
76
+ 2. Enable **Developer Mode** (Settings β†’ Developer).
77
+ 3. In the model loader's advanced settings, set **Flash Attention** to ON.
78
+ 4. Set **K Cache Quantization** and **V Cache Quantization** to `q8_0` (or `q4_0` for more aggressive VRAM savings).
79
+ 5. Note: LM Studio does not currently support RotorQuant's `iso3` cache types. Track [this feature request](https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/1719) for updates.
80
+
81
+ **Ollama**
82
+ ```bash
83
+ # Standard Ollama does not support RotorQuant cache types.
84
+ # Use with default or q8_0 KV cache via OLLAMA_KV_CACHE_TYPE=q8_0
85
+ OLLAMA_KV_CACHE_TYPE=q8_0 OLLAMA_FLASH_ATTENTION=1 ollama run majentik/Qwen3.5-27B-RotorQuant-GGUF-IQ4_XS
86
+ ```
87
 
88
  ## Specifications
89
 
90
  | Property | Value |
91
  |----------|-------|
92
+ | Base Model | [Qwen/Qwen3.5-27B](https://huggingface.co/Qwen/Qwen3.5-27B) |
93
+ | Architecture | Dense (Gated DeltaNet + Gated Attention hybrid, 3:1 ratio) |
94
+ | Parameters | 27.8B (all active β€” not MoE) |
95
+ | Context Length | 262K native (extensible to 1M) |
96
+ | Weight Quantization | GGUF IQ4_XS (importance-weighted 4-bit, smallest 4-bit) |
97
+ | Original Size (BF16) | ~56 GB |
98
+ | Quantized File Size | ~14.0 GB |
99
+ | KV Cache (RotorQuant) | 3-bit via `--cache-type-k iso3 --cache-type-v iso3` (fork only) |
100
+ | KV Cache (standard) | q8_0, q4_0, f16, etc. (any llama.cpp runtime) |
101
+ | License | apache-2.0 |
102
+ | Modalities | Text + Image + Video (native early-fusion) |
103
+ | Compatible Runtimes | llama.cpp, LM Studio, Ollama, koboldcpp |
104
 
105
  ## What is RotorQuant?
106
 
107
+ [RotorQuant](https://github.com/scrya-com/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](https://arxiv.org/abs/2504.19874) (ICLR 2026).
108
+
109
+ 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.
110
+
111
+ **Benchmarks from the RotorQuant repository** (Llama 3.1 8B, RTX 5090 β€” results will vary by model and hardware):
112
+
113
+ | Metric | RotorQuant (iso3) | TurboQuant | Standard q4_0 |
114
+ |--------|-------------------|------------|---------------|
115
+ | Prefill Speed | 3,822 tok/s | 722 tok/s | β€” |
116
+ | Decode Speed | 119 tok/s | 93 tok/s | β€” |
117
+ | Perplexity (PPL) | 6.91 | 7.07 | β€” |
118
+ | KV Compression | ~5Γ— vs FP16 | ~5Γ— vs FP16 | ~4Γ— vs FP16 |
119
+ | Rotation Parameters | 4 per rotor | 16,384 per matrix | N/A |
120
+
121
+ > **Note:** These benchmarks are from the RotorQuant repository using Llama 3.1 8B on an RTX 5090. Performance on Qwen3.5-27B will differ. Independent benchmarks for this specific model are welcome β€” please open a discussion if you have results to share.
122
+
123
+ ## Current Status of RotorQuant in the Ecosystem
124
+
125
+ | Runtime | RotorQuant Support | Standard KV Quant |
126
+ |---------|---------------------|-------------------|
127
+ | llama.cpp (upstream) | ❌ Not merged | βœ… q8_0, q4_0, q4_1, iq4_nl, q5_0, q5_1 |
128
+ | llama-cpp-turboquant fork | βœ… planar3, iso3 | βœ… All standard types |
129
+ | LM Studio | ❌ [Requested](https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/1719) | βœ… Via advanced settings |
130
+ | Ollama | ❌ Not supported | βœ… Via OLLAMA_KV_CACHE_TYPE |
131
+ | koboldcpp | ❌ Not supported | βœ… Standard types |
132
+
133
+ ## Recommended Settings
134
+
135
+ 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.
136
 
137
+ | VRAM | Suggested Configuration |
138
+ |------|------------------------|
139
+ | 24 GB (RTX 4090) | IQ4_XS + q8_0 KV cache + Flash Attention, 8K–16K context |
140
+ | 16 GB | IQ4_XS + q4_0 KV cache + Flash Attention, 4K–8K context |
141
+ | 48+ GB | IQ4_XS + f16 KV cache, full 32K+ context |
142
 
143
  ## See Also
144
 
145
  - [RotorQuant GitHub](https://github.com/scrya-com/rotorquant)
146
+ - [llama-cpp-turboquant fork](https://github.com/johndpope/llama-cpp-turboquant/tree/feature/planarquant-kv-cache)
147
+ - [TurboQuant llama.cpp discussion](https://github.com/ggml-org/llama.cpp/discussions/20969)
148
+ - [TurboQuant paper (arXiv: 2504.19874)](https://arxiv.org/abs/2504.19874)
149
+ - [Base model: Qwen/Qwen3.5-27B](https://huggingface.co/Qwen/Qwen3.5-27B)
150
+ - [Qwen3.5-27B announcement](https://qwen.ai/blog?id=qwen3.5)