deucebucket commited on
Commit
9a33cd5
Β·
verified Β·
1 Parent(s): 631aa14

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +88 -4
README.md CHANGED
@@ -7,7 +7,7 @@ model_name: Gemma-4-26B-A4B-it-Cerebellum-v6-GGUF
7
  model_creator: google
8
  model_type: gemma4
9
  quantized_by: deucebucket
10
- pipeline_tag: text-generation
11
  tags:
12
  - GGUF
13
  - gemma4
@@ -19,6 +19,8 @@ tags:
19
  - moe
20
  - 3-bit
21
  - conversational
 
 
22
  ---
23
 
24
  # Gemma 4 26B-A4B-it β€” Cerebellum v6 GGUF
@@ -29,12 +31,15 @@ Cerebellum v6 is an ablation-guided mixed-precision GGUF quantization of [google
29
 
30
  This is a 26B-parameter MoE model with 4B active parameters per token, 128 experts per layer, and 30 layers. This release uses tensor-level precision overrides selected from 140+ ablation experiments across six internal iterations, including per-layer MoE router surgery.
31
 
 
 
32
  ## At a Glance
33
 
34
  | | |
35
  |---|---|
36
  | **File** | `gemma-4-26B-A4B-it-cerebellum-v6.gguf` |
37
- | **Size** | 11.7 GB |
 
38
  | **Base model** | `google/gemma-4-26B-A4B-it` |
39
  | **Base quant** | Q3_K_M with [bartowski's imatrix](https://huggingface.co/bartowski/google_gemma-4-26B-A4B-it-GGUF) |
40
  | **Format** | GGUF, mixed precision |
@@ -144,13 +149,90 @@ Q8_0 is the only precision that improves PPL. K-quant formats (Q6_K, Q2_K) use 2
144
 
145
  91 tensor-level overrides + 1 surgical router recast on top of Q3_K_M base.
146
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  ## Usage
148
 
 
 
149
  ```bash
150
- # llama.cpp
151
  ./llama-server -m gemma-4-26B-A4B-it-cerebellum-v6.gguf -ngl 99 -c 4096
152
 
153
- # ollama
 
 
 
 
 
 
154
  ollama create gemma4-cerebellum -f Modelfile
155
  ollama run gemma4-cerebellum
156
  ```
@@ -164,9 +246,11 @@ Fits in 24 GB VRAM at full GPU offload with room for 4K context.
164
  - **Ablation experiments**: 140+ across 6 iterations (including 30-layer router surgery)
165
  - **Quantizer**: llama.cpp `llama-quantize` with `--tensor-type-file` overrides + `gguf_tensor_surgery.py` for router recast
166
  - **Hardware**: RTX 3090 (24 GB VRAM)
 
167
 
168
  ## Credits
169
 
170
  - **Base model**: [Google Gemma Team](https://huggingface.co/google/gemma-4-26B-A4B-it)
171
  - **Imatrix**: [bartowski](https://huggingface.co/bartowski/google_gemma-4-26B-A4B-it-GGUF)
 
172
  - **Method & quantization**: [deucebucket/osmosis](https://github.com/deucebucket/osmosis) β€” Cerebellum pipeline
 
7
  model_creator: google
8
  model_type: gemma4
9
  quantized_by: deucebucket
10
+ pipeline_tag: image-text-to-text
11
  tags:
12
  - GGUF
13
  - gemma4
 
19
  - moe
20
  - 3-bit
21
  - conversational
22
+ - multimodal
23
+ - vision
24
  ---
25
 
26
  # Gemma 4 26B-A4B-it β€” Cerebellum v6 GGUF
 
31
 
32
  This is a 26B-parameter MoE model with 4B active parameters per token, 128 experts per layer, and 30 layers. This release uses tensor-level precision overrides selected from 140+ ablation experiments across six internal iterations, including per-layer MoE router surgery.
33
 
34
+ **This model supports vision** when used with the included mmproj file. See [Vision Support](#vision-support) below.
35
+
36
  ## At a Glance
37
 
38
  | | |
39
  |---|---|
40
  | **File** | `gemma-4-26B-A4B-it-cerebellum-v6.gguf` |
41
+ | **mmproj** | `mmproj-google_gemma-4-26B-A4B-it-f16.gguf` |
42
+ | **Size** | 11.7 GB (backbone) + 1.14 GB (mmproj) |
43
  | **Base model** | `google/gemma-4-26B-A4B-it` |
44
  | **Base quant** | Q3_K_M with [bartowski's imatrix](https://huggingface.co/bartowski/google_gemma-4-26B-A4B-it-GGUF) |
45
  | **Format** | GGUF, mixed precision |
 
149
 
150
  91 tensor-level overrides + 1 surgical router recast on top of Q3_K_M base.
151
 
152
+ ## Vision Support
153
+
154
+ This model is multimodal β€” it can process images alongside text. Vision requires two files used together:
155
+
156
+ - `gemma-4-26B-A4B-it-cerebellum-v6.gguf` β€” the text backbone (this file)
157
+ - `mmproj-google_gemma-4-26B-A4B-it-f16.gguf` β€” the vision encoder + projector (1.14 GB)
158
+
159
+ The image token `<|image|>` (token ID 258880) is already in the vocabulary. No metadata changes needed.
160
+
161
+ ### Usage with llama-server
162
+
163
+ ```bash
164
+ llama-server \
165
+ -m gemma-4-26B-A4B-it-cerebellum-v6.gguf \
166
+ --mmproj mmproj-google_gemma-4-26B-A4B-it-f16.gguf \
167
+ --jinja \
168
+ --reasoning off \
169
+ --reasoning-budget 0 \
170
+ -ngl 99 \
171
+ -c 4096
172
+ ```
173
+
174
+ **Required flags:**
175
+ - `--mmproj` β€” loads the vision encoder. The mmproj filename starts with `mmproj-` so it also works with `--mmproj-auto` auto-download if placed in the same directory.
176
+ - `--jinja` β€” enables the Gemma 4 chat template (embedded in the GGUF; required for correct formatting)
177
+ - `--reasoning off --reasoning-budget 0` β€” disables thinking mode which can cause infinite loops without dedicated reasoning tokens
178
+
179
+ ### Usage with curl
180
+
181
+ ```bash
182
+ curl http://localhost:8080/v1/chat/completions \
183
+ -H "Content-Type: application/json" \
184
+ -d '{
185
+ "model": "gemma4-cerebellum",
186
+ "messages": [
187
+ {
188
+ "role": "user",
189
+ "content": [
190
+ {"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}},
191
+ {"type": "text", "text": "What is shown in this image?"}
192
+ ]
193
+ }
194
+ ]
195
+ }'
196
+ ```
197
+
198
+ ### Usage with ollama
199
+
200
+ Create a `Modelfile`:
201
+
202
+ ```dockerfile
203
+ FROM ./gemma-4-26B-A4B-it-cerebellum-v6.gguf
204
+ FROM ./mmproj-google_gemma-4-26B-A4B-it-f16.gguf
205
+ TEMPLATE {{ .Prompt }}
206
+ ```
207
+
208
+ Then:
209
+ ```bash
210
+ ollama create gemma4-cerebellum -f Modelfile
211
+ ollama run gemma4-cerebellum
212
+ ```
213
+
214
+ ### Technical notes
215
+
216
+ - The vision encoder has 27 layers with 1152 hidden dimension, projecting to 2816 (matching the text model's embedding dimension).
217
+ - Image resolution: native input size 224Γ—224, patches of 16Γ—16. Dynamic resolution supported.
218
+ - The mmproj was converted using llama.cpp's `convert_hf_to_gguf.py` from the original Google model and is redistributed under the Apache 2.0 license. Conversion credit: [bartowski](https://huggingface.co/bartowski).
219
+ - Vision works out of the box β€” no special tokens, metadata edits, or re-quantization needed.
220
+
221
  ## Usage
222
 
223
+ ### llama.cpp
224
+
225
  ```bash
226
+ # Text only
227
  ./llama-server -m gemma-4-26B-A4B-it-cerebellum-v6.gguf -ngl 99 -c 4096
228
 
229
+ # With vision
230
+ ./llama-server -m gemma-4-26B-A4B-it-cerebellum-v6.gguf --mmproj mmproj-google_gemma-4-26B-A4B-it-f16.gguf --jinja --reasoning off --reasoning-budget 0 -ngl 99 -c 4096
231
+ ```
232
+
233
+ ### ollama
234
+
235
+ ```bash
236
  ollama create gemma4-cerebellum -f Modelfile
237
  ollama run gemma4-cerebellum
238
  ```
 
246
  - **Ablation experiments**: 140+ across 6 iterations (including 30-layer router surgery)
247
  - **Quantizer**: llama.cpp `llama-quantize` with `--tensor-type-file` overrides + `gguf_tensor_surgery.py` for router recast
248
  - **Hardware**: RTX 3090 (24 GB VRAM)
249
+ - **Vision**: See [Vision Support](#vision-support) for details
250
 
251
  ## Credits
252
 
253
  - **Base model**: [Google Gemma Team](https://huggingface.co/google/gemma-4-26B-A4B-it)
254
  - **Imatrix**: [bartowski](https://huggingface.co/bartowski/google_gemma-4-26B-A4B-it-GGUF)
255
+ - **mmproj conversion**: [bartowski](https://huggingface.co/bartowski/google_gemma-4-26B-A4B-it-GGUF)
256
  - **Method & quantization**: [deucebucket/osmosis](https://github.com/deucebucket/osmosis) β€” Cerebellum pipeline