majentik commited on
Commit
32b6d20
Β·
verified Β·
1 Parent(s): a5c7bdc

Update model card with accurate fork requirements and ecosystem status

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