Skip to content

Commit 618e90c

Browse files
localai-botmudler
andauthored
feat(gallery): add Gemma 4 QAT family + MTP speculative-decoding pairs (#10215)
Add the remaining official Google Gemma 4 QAT Q4_0 GGUFs (E2B, E4B, 26B-A4B, 31B) next to the existing 12B entry, each shipping its multimodal mmproj. Also add three MTP (Multi-Token Prediction) speculative-decoding bundles that pair each QAT target with a QAT-matched assistant/drafter head: - 12B <- Janvitos/gemma-4-12B-it-qat-assistant-MTP-Q8_0-GGUF - 26B-A4B <- boxwrench/gemma-4-qat-mtp-assistant-heads - 31B <- boxwrench/gemma-4-qat-mtp-assistant-heads The assistant heads use the gemma4_assistant architecture and are not standalone chat models, so each entry bundles the target + draft and sets draft_model together with the draft-mtp spec options (spec_type:draft-mtp / spec_n_max:6 / spec_p_min:0.75), matching MTPSpecOptions() in core/config/mtp.go. QAT-matched heads raise draft acceptance substantially over generic non-QAT heads. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
1 parent 92dea96 commit 618e90c

1 file changed

Lines changed: 329 additions & 0 deletions

File tree

gallery/index.yaml

Lines changed: 329 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,335 @@
106106
- filename: llama-cpp/mmproj/gemma-4-12B-it-qat-q4_0-gguf/mmproj-gemma-4-12b-it-qat-q4_0.gguf
107107
sha256: e70b0e5cd80323d5d588b4ed06780356b7b1ba03995a4b8164c6ae9db0ff5989
108108
uri: https://huggingface.co/google/gemma-4-12B-it-qat-q4_0-gguf/resolve/main/mmproj-gemma-4-12b-it-qat-q4_0.gguf
109+
- name: "gemma-4-e2b-it-qat-q4_0"
110+
url: "github:mudler/LocalAI/gallery/virtual.yaml@master"
111+
urls:
112+
- https://huggingface.co/google/gemma-4-E2B-it-qat-q4_0-gguf
113+
description: |
114+
Gemma 4 E2B is a multimodal (text + image) instruction-tuned model from Google DeepMind, optimized with Quantization-Aware Training (QAT) to preserve bfloat16-level quality at a fraction of the memory. E2B is a MatFormer "effective 2B" elastic variant: it carries a larger backbone but runs at an effective 2B-parameter footprint, making it well suited to lightweight and on-device deployments. This is the official Google Q4_0 GGUF, shipped with its multimodal projector.
115+
116+
License: Apache 2.0 | Authors: Google DeepMind
117+
license: "apache-2.0"
118+
tags:
119+
- llm
120+
- gguf
121+
- qat
122+
- multimodal
123+
icon: https://ai.google.dev/gemma/images/gemma4_banner.png
124+
overrides:
125+
backend: llama-cpp
126+
function:
127+
automatic_tool_parsing_fallback: true
128+
grammar:
129+
disable: true
130+
known_usecases:
131+
- chat
132+
mmproj: llama-cpp/mmproj/gemma-4-E2B-it-qat-q4_0-gguf/gemma-4-E2B-it-mmproj.gguf
133+
options:
134+
- use_jinja:true
135+
parameters:
136+
min_p: 0
137+
model: llama-cpp/models/gemma-4-E2B-it-qat-q4_0-gguf/gemma-4-E2B_q4_0-it.gguf
138+
repeat_penalty: 1
139+
temperature: 1
140+
top_k: 64
141+
top_p: 0.95
142+
template:
143+
use_tokenizer_template: true
144+
files:
145+
- filename: llama-cpp/models/gemma-4-E2B-it-qat-q4_0-gguf/gemma-4-E2B_q4_0-it.gguf
146+
sha256: 3646b4c147cd235a44d91df1546d3b7d8e29b547dbe4e1f80856419aa455e6fd
147+
uri: https://huggingface.co/google/gemma-4-E2B-it-qat-q4_0-gguf/resolve/main/gemma-4-E2B_q4_0-it.gguf
148+
- filename: llama-cpp/mmproj/gemma-4-E2B-it-qat-q4_0-gguf/gemma-4-E2B-it-mmproj.gguf
149+
sha256: 58c187648007cab392bd5678b87e862c3e8794017deb945feea2cf256195e96a
150+
uri: https://huggingface.co/google/gemma-4-E2B-it-qat-q4_0-gguf/resolve/main/gemma-4-E2B-it-mmproj.gguf
151+
- name: "gemma-4-e4b-it-qat-q4_0"
152+
url: "github:mudler/LocalAI/gallery/virtual.yaml@master"
153+
urls:
154+
- https://huggingface.co/google/gemma-4-E4B-it-qat-q4_0-gguf
155+
description: |
156+
Gemma 4 E4B is a multimodal (text + image) instruction-tuned model from Google DeepMind, optimized with Quantization-Aware Training (QAT) to preserve bfloat16-level quality at a fraction of the memory. E4B is a MatFormer "effective 4B" elastic variant, balancing quality and footprint for on-device and edge deployments. This is the official Google Q4_0 GGUF, shipped with its multimodal projector.
157+
158+
License: Apache 2.0 | Authors: Google DeepMind
159+
license: "apache-2.0"
160+
tags:
161+
- llm
162+
- gguf
163+
- qat
164+
- multimodal
165+
icon: https://ai.google.dev/gemma/images/gemma4_banner.png
166+
overrides:
167+
backend: llama-cpp
168+
function:
169+
automatic_tool_parsing_fallback: true
170+
grammar:
171+
disable: true
172+
known_usecases:
173+
- chat
174+
mmproj: llama-cpp/mmproj/gemma-4-E4B-it-qat-q4_0-gguf/gemma-4-E4B-it-mmproj.gguf
175+
options:
176+
- use_jinja:true
177+
parameters:
178+
min_p: 0
179+
model: llama-cpp/models/gemma-4-E4B-it-qat-q4_0-gguf/gemma-4-E4B_q4_0-it.gguf
180+
repeat_penalty: 1
181+
temperature: 1
182+
top_k: 64
183+
top_p: 0.95
184+
template:
185+
use_tokenizer_template: true
186+
files:
187+
- filename: llama-cpp/models/gemma-4-E4B-it-qat-q4_0-gguf/gemma-4-E4B_q4_0-it.gguf
188+
sha256: e8b6a059ba86947a44ace84d6e5679795bc41862c25c30513142588f0e9dba1d
189+
uri: https://huggingface.co/google/gemma-4-E4B-it-qat-q4_0-gguf/resolve/main/gemma-4-E4B_q4_0-it.gguf
190+
- filename: llama-cpp/mmproj/gemma-4-E4B-it-qat-q4_0-gguf/gemma-4-E4B-it-mmproj.gguf
191+
sha256: c6398448d84a4836fdedf58f9775979e69ae0cc4dfdf4d697b5597693a555b12
192+
uri: https://huggingface.co/google/gemma-4-E4B-it-qat-q4_0-gguf/resolve/main/gemma-4-E4B-it-mmproj.gguf
193+
- name: "gemma-4-26b-a4b-it-qat-q4_0"
194+
url: "github:mudler/LocalAI/gallery/virtual.yaml@master"
195+
urls:
196+
- https://huggingface.co/google/gemma-4-26B-A4B-it-qat-q4_0-gguf
197+
description: |
198+
Gemma 4 26B-A4B is a multimodal (text + image) instruction-tuned Mixture-of-Experts model from Google DeepMind, optimized with Quantization-Aware Training (QAT) to preserve bfloat16-level quality at a fraction of the memory. With 26B total parameters and ~4B active per token, it delivers large-model quality at a much lower inference cost. This is the official Google Q4_0 GGUF, shipped with its multimodal projector.
199+
200+
License: Apache 2.0 | Authors: Google DeepMind
201+
license: "apache-2.0"
202+
tags:
203+
- llm
204+
- gguf
205+
- qat
206+
- multimodal
207+
- moe
208+
icon: https://ai.google.dev/gemma/images/gemma4_banner.png
209+
overrides:
210+
backend: llama-cpp
211+
function:
212+
automatic_tool_parsing_fallback: true
213+
grammar:
214+
disable: true
215+
known_usecases:
216+
- chat
217+
mmproj: llama-cpp/mmproj/gemma-4-26B-A4B-it-qat-q4_0-gguf/gemma-4-26B-it-mmproj.gguf
218+
options:
219+
- use_jinja:true
220+
parameters:
221+
min_p: 0
222+
model: llama-cpp/models/gemma-4-26B-A4B-it-qat-q4_0-gguf/gemma-4-26B_q4_0-it.gguf
223+
repeat_penalty: 1
224+
temperature: 1
225+
top_k: 64
226+
top_p: 0.95
227+
template:
228+
use_tokenizer_template: true
229+
files:
230+
- filename: llama-cpp/models/gemma-4-26B-A4B-it-qat-q4_0-gguf/gemma-4-26B_q4_0-it.gguf
231+
sha256: 4c856523d61d77922dbc0b26753a6bf6208e5d69d80db0c04dcd776832d054c5
232+
uri: https://huggingface.co/google/gemma-4-26B-A4B-it-qat-q4_0-gguf/resolve/main/gemma-4-26B_q4_0-it.gguf
233+
- filename: llama-cpp/mmproj/gemma-4-26B-A4B-it-qat-q4_0-gguf/gemma-4-26B-it-mmproj.gguf
234+
sha256: d8e2de16e17515d9061b23c9a002715f996f9e0c87b93a9354264611bfab9239
235+
uri: https://huggingface.co/google/gemma-4-26B-A4B-it-qat-q4_0-gguf/resolve/main/gemma-4-26B-it-mmproj.gguf
236+
- name: "gemma-4-31b-it-qat-q4_0"
237+
url: "github:mudler/LocalAI/gallery/virtual.yaml@master"
238+
urls:
239+
- https://huggingface.co/google/gemma-4-31B-it-qat-q4_0-gguf
240+
description: |
241+
Gemma 4 31B is the largest dense multimodal (text + image) instruction-tuned model in the Gemma 4 family from Google DeepMind, optimized with Quantization-Aware Training (QAT) to preserve bfloat16-level quality while dramatically reducing the memory required to load the model. This is the official Google Q4_0 GGUF, shipped with its multimodal projector.
242+
243+
License: Apache 2.0 | Authors: Google DeepMind
244+
license: "apache-2.0"
245+
tags:
246+
- llm
247+
- gguf
248+
- qat
249+
- multimodal
250+
icon: https://ai.google.dev/gemma/images/gemma4_banner.png
251+
overrides:
252+
backend: llama-cpp
253+
function:
254+
automatic_tool_parsing_fallback: true
255+
grammar:
256+
disable: true
257+
known_usecases:
258+
- chat
259+
mmproj: llama-cpp/mmproj/gemma-4-31B-it-qat-q4_0-gguf/gemma-4-31B-it-mmproj.gguf
260+
options:
261+
- use_jinja:true
262+
parameters:
263+
min_p: 0
264+
model: llama-cpp/models/gemma-4-31B-it-qat-q4_0-gguf/gemma-4-31B_q4_0-it.gguf
265+
repeat_penalty: 1
266+
temperature: 1
267+
top_k: 64
268+
top_p: 0.95
269+
template:
270+
use_tokenizer_template: true
271+
files:
272+
- filename: llama-cpp/models/gemma-4-31B-it-qat-q4_0-gguf/gemma-4-31B_q4_0-it.gguf
273+
sha256: 0374ce7b0124db9ba96fc649e835c531223ee224a497ce88a374baaea10932ec
274+
uri: https://huggingface.co/google/gemma-4-31B-it-qat-q4_0-gguf/resolve/main/gemma-4-31B_q4_0-it.gguf
275+
- filename: llama-cpp/mmproj/gemma-4-31B-it-qat-q4_0-gguf/gemma-4-31B-it-mmproj.gguf
276+
sha256: 8e239c9c592541c9f537fff75677ea30d8af1e14ba63d27cf245423b7d0a688b
277+
uri: https://huggingface.co/google/gemma-4-31B-it-qat-q4_0-gguf/resolve/main/gemma-4-31B-it-mmproj.gguf
278+
- name: "gemma-4-12b-it-qat-mtp"
279+
url: "github:mudler/LocalAI/gallery/virtual.yaml@master"
280+
urls:
281+
- https://huggingface.co/google/gemma-4-12B-it-qat-q4_0-gguf
282+
- https://huggingface.co/Janvitos/gemma-4-12B-it-qat-assistant-MTP-Q8_0-GGUF
283+
description: |
284+
Gemma 4 12B IT QAT (Google DeepMind) paired with the official QAT assistant/drafter head for Multi-Token Prediction (MTP) speculative decoding. The Q4_0 target carries the full multimodal (text + image) model, while the Q8_0 assistant GGUF (from Janvitos, converted from Google's `gemma-4-12B-it-qat-q4_0-unquantized-assistant` checkpoint) acts as the draft model. With llama.cpp's `draft-mtp` speculative path enabled, this combination accelerates generation while keeping the target model's quality. The assistant head is not a standalone chat model: it only runs paired with the target, which is why both are bundled here.
285+
286+
License: Apache 2.0 | Authors: Google DeepMind (target/assistant checkpoints), Janvitos (GGUF conversion)
287+
license: "apache-2.0"
288+
tags:
289+
- llm
290+
- gguf
291+
- qat
292+
- multimodal
293+
- mtp
294+
icon: https://ai.google.dev/gemma/images/gemma4_banner.png
295+
overrides:
296+
backend: llama-cpp
297+
function:
298+
automatic_tool_parsing_fallback: true
299+
grammar:
300+
disable: true
301+
known_usecases:
302+
- chat
303+
mmproj: llama-cpp/mmproj/gemma-4-12B-it-qat-q4_0-gguf/mmproj-gemma-4-12b-it-qat-q4_0.gguf
304+
draft_model: llama-cpp/models/gemma-4-12B-it-qat-assistant-MTP-Q8_0-GGUF/gemma-4-12B-it-qat-assistant-MTP-Q8_0.gguf
305+
options:
306+
- use_jinja:true
307+
- spec_type:draft-mtp
308+
- spec_n_max:6
309+
- spec_p_min:0.75
310+
parameters:
311+
min_p: 0
312+
model: llama-cpp/models/gemma-4-12B-it-qat-q4_0-gguf/gemma-4-12b-it-qat-q4_0.gguf
313+
repeat_penalty: 1
314+
temperature: 1
315+
top_k: 64
316+
top_p: 0.95
317+
template:
318+
use_tokenizer_template: true
319+
files:
320+
- filename: llama-cpp/models/gemma-4-12B-it-qat-q4_0-gguf/gemma-4-12b-it-qat-q4_0.gguf
321+
sha256: faff1a63667fac17ac5e777f47114688fcefea96e220e211aaa8d62c2c4561f1
322+
uri: https://huggingface.co/google/gemma-4-12B-it-qat-q4_0-gguf/resolve/main/gemma-4-12b-it-qat-q4_0.gguf
323+
- filename: llama-cpp/mmproj/gemma-4-12B-it-qat-q4_0-gguf/mmproj-gemma-4-12b-it-qat-q4_0.gguf
324+
sha256: e70b0e5cd80323d5d588b4ed06780356b7b1ba03995a4b8164c6ae9db0ff5989
325+
uri: https://huggingface.co/google/gemma-4-12B-it-qat-q4_0-gguf/resolve/main/mmproj-gemma-4-12b-it-qat-q4_0.gguf
326+
- filename: llama-cpp/models/gemma-4-12B-it-qat-assistant-MTP-Q8_0-GGUF/gemma-4-12B-it-qat-assistant-MTP-Q8_0.gguf
327+
sha256: 13331068b6af643c3dc75e619373b674c1f75a1958e7c82e2020d96a17c63809
328+
uri: https://huggingface.co/Janvitos/gemma-4-12B-it-qat-assistant-MTP-Q8_0-GGUF/resolve/main/gemma-4-12B-it-qat-assistant-MTP-Q8_0.gguf
329+
- name: "gemma-4-26b-a4b-it-qat-mtp"
330+
url: "github:mudler/LocalAI/gallery/virtual.yaml@master"
331+
urls:
332+
- https://huggingface.co/google/gemma-4-26B-A4B-it-qat-q4_0-gguf
333+
- https://huggingface.co/boxwrench/gemma-4-qat-mtp-assistant-heads
334+
description: |
335+
Gemma 4 26B-A4B IT QAT (Google DeepMind), a multimodal Mixture-of-Experts model (26B total, ~4B active per token), paired with the QAT-matched MTP assistant/drafter head for Multi-Token Prediction speculative decoding. The Q4_0 target carries the full multimodal (text + image) model, while the Q8_0 assistant GGUF (from boxwrench, converted from Google's `gemma-4-26B-A4B-it-qat-q4_0-unquantized-assistant` checkpoint) acts as the draft model. Using a QAT-matched head instead of a generic non-QAT head raised draft acceptance from ~57% to ~92% on this model. The assistant head is not a standalone chat model: it only runs paired with the target, which is why both are bundled here.
336+
337+
> [!Note]
338+
> The assistant head uses the `gemma4_assistant` architecture. It loads on the Atomic TurboQuant llama.cpp fork and on stock llama.cpp once ggml-org/llama.cpp#23398 ("llama: add Gemma4 MTP") merges. Until the upstream `n_tokens` reshape fix lands, run with a single parallel slot.
339+
340+
License: Apache 2.0 | Authors: Google DeepMind (target/assistant checkpoints), boxwrench (GGUF conversion)
341+
license: "apache-2.0"
342+
tags:
343+
- llm
344+
- gguf
345+
- qat
346+
- multimodal
347+
- moe
348+
- mtp
349+
icon: https://ai.google.dev/gemma/images/gemma4_banner.png
350+
overrides:
351+
backend: llama-cpp
352+
function:
353+
automatic_tool_parsing_fallback: true
354+
grammar:
355+
disable: true
356+
known_usecases:
357+
- chat
358+
mmproj: llama-cpp/mmproj/gemma-4-26B-A4B-it-qat-q4_0-gguf/gemma-4-26B-it-mmproj.gguf
359+
draft_model: llama-cpp/models/gemma-4-qat-mtp-assistant-heads/gemma-4-26B-A4B-it-qat-assistant-MTP-Q8_0.gguf
360+
options:
361+
- use_jinja:true
362+
- spec_type:draft-mtp
363+
- spec_n_max:6
364+
- spec_p_min:0.75
365+
parameters:
366+
min_p: 0
367+
model: llama-cpp/models/gemma-4-26B-A4B-it-qat-q4_0-gguf/gemma-4-26B_q4_0-it.gguf
368+
repeat_penalty: 1
369+
temperature: 1
370+
top_k: 64
371+
top_p: 0.95
372+
template:
373+
use_tokenizer_template: true
374+
files:
375+
- filename: llama-cpp/models/gemma-4-26B-A4B-it-qat-q4_0-gguf/gemma-4-26B_q4_0-it.gguf
376+
sha256: 4c856523d61d77922dbc0b26753a6bf6208e5d69d80db0c04dcd776832d054c5
377+
uri: https://huggingface.co/google/gemma-4-26B-A4B-it-qat-q4_0-gguf/resolve/main/gemma-4-26B_q4_0-it.gguf
378+
- filename: llama-cpp/mmproj/gemma-4-26B-A4B-it-qat-q4_0-gguf/gemma-4-26B-it-mmproj.gguf
379+
sha256: d8e2de16e17515d9061b23c9a002715f996f9e0c87b93a9354264611bfab9239
380+
uri: https://huggingface.co/google/gemma-4-26B-A4B-it-qat-q4_0-gguf/resolve/main/gemma-4-26B-it-mmproj.gguf
381+
- filename: llama-cpp/models/gemma-4-qat-mtp-assistant-heads/gemma-4-26B-A4B-it-qat-assistant-MTP-Q8_0.gguf
382+
sha256: 86f156403d9148aeffa765411f1373d1a2f9c840d62f5e088701153a35ecff73
383+
uri: https://huggingface.co/boxwrench/gemma-4-qat-mtp-assistant-heads/resolve/main/gemma-4-26B-A4B-it-qat-assistant-MTP-Q8_0.gguf
384+
- name: "gemma-4-31b-it-qat-mtp"
385+
url: "github:mudler/LocalAI/gallery/virtual.yaml@master"
386+
urls:
387+
- https://huggingface.co/google/gemma-4-31B-it-qat-q4_0-gguf
388+
- https://huggingface.co/boxwrench/gemma-4-qat-mtp-assistant-heads
389+
description: |
390+
Gemma 4 31B IT QAT (Google DeepMind), the largest dense multimodal model in the family, paired with the QAT-matched MTP assistant/drafter head for Multi-Token Prediction speculative decoding. The Q4_0 target carries the full multimodal (text + image) model, while the Q8_0 assistant GGUF (from boxwrench, converted from Google's `gemma-4-31B-it-qat-q4_0-unquantized-assistant` checkpoint) acts as the draft model. Using a QAT-matched head instead of a generic non-QAT head substantially raises draft acceptance and end-to-end throughput. The assistant head is not a standalone chat model: it only runs paired with the target, which is why both are bundled here.
391+
392+
> [!Note]
393+
> The assistant head uses the `gemma4_assistant` architecture. It loads on the Atomic TurboQuant llama.cpp fork and on stock llama.cpp once ggml-org/llama.cpp#23398 ("llama: add Gemma4 MTP") merges. Until the upstream `n_tokens` reshape fix lands, run with a single parallel slot.
394+
395+
License: Apache 2.0 | Authors: Google DeepMind (target/assistant checkpoints), boxwrench (GGUF conversion)
396+
license: "apache-2.0"
397+
tags:
398+
- llm
399+
- gguf
400+
- qat
401+
- multimodal
402+
- mtp
403+
icon: https://ai.google.dev/gemma/images/gemma4_banner.png
404+
overrides:
405+
backend: llama-cpp
406+
function:
407+
automatic_tool_parsing_fallback: true
408+
grammar:
409+
disable: true
410+
known_usecases:
411+
- chat
412+
mmproj: llama-cpp/mmproj/gemma-4-31B-it-qat-q4_0-gguf/gemma-4-31B-it-mmproj.gguf
413+
draft_model: llama-cpp/models/gemma-4-qat-mtp-assistant-heads/gemma-4-31B-it-qat-assistant-MTP-Q8_0.gguf
414+
options:
415+
- use_jinja:true
416+
- spec_type:draft-mtp
417+
- spec_n_max:6
418+
- spec_p_min:0.75
419+
parameters:
420+
min_p: 0
421+
model: llama-cpp/models/gemma-4-31B-it-qat-q4_0-gguf/gemma-4-31B_q4_0-it.gguf
422+
repeat_penalty: 1
423+
temperature: 1
424+
top_k: 64
425+
top_p: 0.95
426+
template:
427+
use_tokenizer_template: true
428+
files:
429+
- filename: llama-cpp/models/gemma-4-31B-it-qat-q4_0-gguf/gemma-4-31B_q4_0-it.gguf
430+
sha256: 0374ce7b0124db9ba96fc649e835c531223ee224a497ce88a374baaea10932ec
431+
uri: https://huggingface.co/google/gemma-4-31B-it-qat-q4_0-gguf/resolve/main/gemma-4-31B_q4_0-it.gguf
432+
- filename: llama-cpp/mmproj/gemma-4-31B-it-qat-q4_0-gguf/gemma-4-31B-it-mmproj.gguf
433+
sha256: 8e239c9c592541c9f537fff75677ea30d8af1e14ba63d27cf245423b7d0a688b
434+
uri: https://huggingface.co/google/gemma-4-31B-it-qat-q4_0-gguf/resolve/main/gemma-4-31B-it-mmproj.gguf
435+
- filename: llama-cpp/models/gemma-4-qat-mtp-assistant-heads/gemma-4-31B-it-qat-assistant-MTP-Q8_0.gguf
436+
sha256: 7a7cdd65a93536f3bf324e97ddf60cc8d482510eaa0837873aef0fd7e0b493a5
437+
uri: https://huggingface.co/boxwrench/gemma-4-qat-mtp-assistant-heads/resolve/main/gemma-4-31B-it-qat-assistant-MTP-Q8_0.gguf
109438
- name: "step-3.7-flash"
110439
url: "github:mudler/LocalAI/gallery/virtual.yaml@master"
111440
urls:

0 commit comments

Comments
 (0)