ShaunGves danielhanchen commited on
Commit
f93eec6
·
0 Parent(s):

Duplicate from unsloth/gemma-4-26B-A4B-it-qat-GGUF

Browse files

Co-authored-by: Daniel (Unsloth) <danielhanchen@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ gemma-4-26B-A4B-it-qat-UD-Q4_K_XL.gguf filter=lfs diff=lfs merge=lfs -text
37
+ gemma-4-26B-A4B-it-qat-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
38
+ mmproj-BF16.gguf filter=lfs diff=lfs merge=lfs -text
39
+ mmproj-F16.gguf filter=lfs diff=lfs merge=lfs -text
40
+ mmproj-F32.gguf filter=lfs diff=lfs merge=lfs -text
41
+ MTP/gemma-4-26B-A4B-it-MTP-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
42
+ MTP/gemma-4-26B-A4B-it-MTP-BF16.gguf filter=lfs diff=lfs merge=lfs -text
43
+ MTP/gemma-4-26B-A4B-it-MTP-F16.gguf filter=lfs diff=lfs merge=lfs -text
44
+ mtp-gemma-4-26B-A4B-it.gguf filter=lfs diff=lfs merge=lfs -text
45
+ MTP/gemma-4-26B-A4B-it-Q8_0-MTP.gguf filter=lfs diff=lfs merge=lfs -text
46
+ MTP/gemma-4-26B-A4B-it-BF16-MTP.gguf filter=lfs diff=lfs merge=lfs -text
47
+ MTP/gemma-4-26B-A4B-it-F16-MTP.gguf filter=lfs diff=lfs merge=lfs -text
48
+ MTP/gemma-4-26B-A4B-it-Q4_0-MTP.gguf filter=lfs diff=lfs merge=lfs -text
MTP/README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Gemma 4 26B-A4B QAT MTP drafter
2
+
3
+ Multi-Token Prediction (MTP) drafter for `unsloth/gemma-4-26B-A4B-it-qat-GGUF`. It runs as a speculative draft model that shares the target's KV cache and speeds up text generation. The drafter is the Gemma 4 26B-A4B QAT assistant and pairs with the QAT model unchanged.
4
+
5
+ Verified on a single B200 against the `gemma-4-26B-A4B-it-qat-UD-Q4_K_XL.gguf` target with `-hf` auto-discovery: draft acceptance 0.73.
6
+
7
+ MTP was merged into llama.cpp on 2026-06-07 (PR ggml-org/llama.cpp#23398). You need a llama.cpp build from after that date. Older builds cannot load these (arch `gemma4-assistant`).
8
+
9
+ ## Files
10
+
11
+ The recommended drafter is a **smart Q4_0**: the native 4-bit QAT drafter (about 97% of its weights are byte-exact on the int4 grid), near-lossless versus higher precision while roughly half the size. It sits at the repo root as `mtp-gemma-4-26B-A4B-it.gguf` so `-hf` finds it automatically, and the same file plus higher-precision drafters are in `MTP/`:
12
+
13
+ - `mtp-gemma-4-26B-A4B-it.gguf` (repo root, smart Q4_0, recommended; used by `-hf`)
14
+ - `MTP/gemma-4-26B-A4B-it-Q4_0-MTP.gguf` (same smart Q4_0)
15
+ - `MTP/gemma-4-26B-A4B-it-Q8_0-MTP.gguf`
16
+ - `MTP/gemma-4-26B-A4B-it-BF16-MTP.gguf`
17
+ - `MTP/gemma-4-26B-A4B-it-F16-MTP.gguf`
18
+
19
+ ## Build llama.cpp
20
+
21
+ ```bash
22
+ git clone https://github.com/ggml-org/llama.cpp
23
+ cd llama.cpp
24
+
25
+ # CUDA build. Set the arch for your GPU: 89 (RTX 4090), 90 (H100), 100 (B200).
26
+ cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=90
27
+ cmake --build build --config Release -j --target llama-server
28
+ ```
29
+
30
+ ## Run, the easy way
31
+
32
+ A recent llama.cpp finds the drafter automatically from the root `mtp-` file, so `-hf` is all you need. No `--model-draft`.
33
+
34
+ ```bash
35
+ ./build/bin/llama-server \
36
+ -hf unsloth/gemma-4-26B-A4B-it-qat-GGUF:UD-Q4_K_XL \
37
+ --spec-type draft-mtp --spec-draft-n-max 4 \
38
+ -ngl 999 -fa on
39
+ ```
40
+
41
+ If your build is too old to auto-discover the sibling, use the explicit form below.
42
+
43
+ ## Run with an explicit drafter
44
+
45
+ Use this to choose a precision or point at a local file.
46
+
47
+ ```bash
48
+ hf download unsloth/gemma-4-26B-A4B-it-qat-GGUF gemma-4-26B-A4B-it-qat-UD-Q4_K_XL.gguf --local-dir .
49
+ hf download unsloth/gemma-4-26B-A4B-it-qat-GGUF MTP/gemma-4-26B-A4B-it-Q8_0-MTP.gguf --local-dir .
50
+
51
+ ./build/bin/llama-server \
52
+ -m gemma-4-26B-A4B-it-qat-UD-Q4_K_XL.gguf \
53
+ --model-draft MTP/gemma-4-26B-A4B-it-Q8_0-MTP.gguf \
54
+ --spec-type draft-mtp --spec-draft-n-max 4 \
55
+ -ngl 999 -fa on
56
+ ```
57
+
58
+ Multi GPU: add `--spec-draft-device CUDA0 -sm layer`. The drafter pairs with any quant of the 26B-A4B QAT model. Quantized KV cache works.
MTP/gemma-4-26B-A4B-it-BF16-MTP.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f72390e03bedb93f68582211273c3375b58ec4aa88e707b17d5bc32c726b0c01
3
+ size 855245760
MTP/gemma-4-26B-A4B-it-F16-MTP.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a930d5857ea4b0b49af47d9a0245f9c82e2664c82cb1f5feec93fef1dacda55
3
+ size 855245760
MTP/gemma-4-26B-A4B-it-Q4_0-MTP.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62bd3af7f66c9308de9a5454233852f8c7324c93767e8dfb824ed45b9179864a
3
+ size 251937728
MTP/gemma-4-26B-A4B-it-Q8_0-MTP.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d960344481e41bcb11117d9a88401db4f184bbaada9551df96012458ece04f7
3
+ size 461784000
README.md ADDED
@@ -0,0 +1,578 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ license_link: https://ai.google.dev/gemma/docs/gemma_4_license
5
+ pipeline_tag: image-text-to-text
6
+ base_model: google/gemma-4-26B-A4B-it-qat-q4_0-unquantized
7
+ tags:
8
+ - gemma4
9
+ - unsloth
10
+ - gemma
11
+ - google
12
+ ---
13
+ # Read our How to [Run Gemma 4 QAT Guide!](https://unsloth.ai/docs/models/gemma-4/qat)
14
+ <div>
15
+ <p style="margin: 0 0 0px 0; margin-top: 0px;">
16
+ <em>See <a href="https://unsloth.ai/docs/basics/unsloth-dynamic-v2.0-gguf">Unsloth Dynamic 2.0 GGUFs</a> for our quantization benchmarks.</em>
17
+ </p>
18
+ <div style="display: flex; gap: 5px; align-items: center; margin-bottom: 0px;">
19
+ <a href="https://github.com/unslothai/unsloth/">
20
+ <img src="https://github.com/unslothai/unsloth/raw/main/images/unsloth%20new%20logo.png" width="133">
21
+ </a>
22
+ <a href="https://discord.gg/unsloth">
23
+ <img src="https://github.com/unslothai/unsloth/raw/main/images/Discord%20button.png" width="173">
24
+ </a>
25
+ <a href="https://unsloth.ai/docs/models/gemma-4">
26
+ <img src="https://raw.githubusercontent.com/unslothai/unsloth/refs/heads/main/images/documentation%20green%20button.png" width="143">
27
+ </a>
28
+ </div>
29
+
30
+ <ul style="margin: 0;">
31
+ <li><b>Jun 9 Update:</b> Added MTP support. See our <a href="https://unsloth.ai/docs/models/mtp">MTP Guide</a>.</li>
32
+ <li>Gemma 4 can now be run and fine-tuned in <a href="https://unsloth.ai/docs/new/studio">Unsloth Studio</a>. <a href="https://unsloth.ai/docs/models/gemma-4">Read our guide</a>.</li>
33
+ <li>See all versions of Gemma 4 QAT (GGUF, 16-bit etc.) <a href="https://huggingface.co/collections/unsloth/gemma-4-qat">in our collection</a>.</li>
34
+ <li>Example of Gemma 4 E4B (4-bit GGUF) running in Unsloth Studio with tool-calling:</li>
35
+ </ul>
36
+ </div>
37
+ <img width="600" alt="gemma 4 in unsloth studio" src="https://cdn-uploads.huggingface.co/production/uploads/62ecdc18b72a69615d6bd857/BTmv3pr-QQ8ZMxxX3Ofnf.gif" />
38
+
39
+
40
+ ![image](https://cdn-uploads.huggingface.co/production/uploads/62ecdc18b72a69615d6bd857/GqK0ebz09JAFyDQUiYGnV.png)
41
+
42
+ ## Run with MTP (speculative decoding)
43
+
44
+ This model ships a Multi-Token Prediction drafter at the repo root (`mtp-gemma-4-26B-A4B-it.gguf`, a near-lossless smart Q4_0). A recent llama.cpp auto-discovers it from `-hf`, so you do not pass `--model-draft`:
45
+
46
+ ```bash
47
+ ./build/bin/llama-server \
48
+ -hf unsloth/gemma-4-26B-A4B-it-qat-GGUF:UD-Q4_K_XL \
49
+ --spec-type draft-mtp --spec-draft-n-max 4 \
50
+ -ngl 999 -fa on
51
+ ```
52
+
53
+ The drafter shares the target's KV cache and does not change the output (the target verifies every drafted token). See the `MTP/` folder for the other precisions and explicit usage.
54
+
55
+
56
+ <div align="center">
57
+ <img src=https://ai.google.dev/gemma/images/gemma4_banner.png>
58
+ </div>
59
+
60
+
61
+ <p align="center">
62
+ <a href="https://huggingface.co/collections/google/gemma-4" target="_blank">Hugging Face</a> |
63
+ <a href="https://github.com/google-gemma" target="_blank">GitHub</a> |
64
+ <a href="https://blog.google/innovation-and-ai/technology/developers-tools/introducing-gemma-4-12B/" target="_blank">Launch Blog</a> |
65
+ <a href="https://ai.google.dev/gemma/docs/core" target="_blank">Documentation</a>
66
+ <br>
67
+ <b>License</b>: <a href="https://ai.google.dev/gemma/docs/gemma_4_license" target="_blank">Apache 2.0</a> | <b>Authors</b>: <a href="https://deepmind.google/models/gemma/" target="_blank">Google DeepMind</a>
68
+ </p>
69
+
70
+ > [!Note]
71
+ > This model card is for the new versions of the Gemma 4 family optimized with Quantization-Aware Training (QAT), which allows preserving similar quality to bfloat16 while dramatically reducing the memory requirements to load the model.
72
+ > Four versions of the QAT checkpoints are available:
73
+ > * **Unquantized QAT checkpoints** (Q4_0): Half-precision weights extracted from the QAT pipeline, ideal for custom downstream compilation and research. Available for Gemma 4 E2B, E4B, 12B, 26B A4B, and 31B, and their drafter models.
74
+ > * **GGUF** (Q4_0): Ready-to-deploy formats for broad ecosystem compatibility. Available for Gemma 4 E2B, E4B, 12B, 26B A4B, and 31B.
75
+ > * **Mobile-optimized** (wNa8o8): A custom schema engineered explicitly for mobile hardware efficiency. It features targeted 2-bit decoding layers, optimized KV caches, and static activations to maximize VRAM savings. Available for Gemma 4 E2B and E4B.
76
+ > * **Compressed Tensors** (w4a16): QAT checkpoints serialized in the compressed-tensors format for native, optimized inference with vLLM. Available for Gemma 4 E2B, E4B, 12B, and 31B.
77
+
78
+ Gemma is a family of open models built by Google DeepMind. Gemma 4 models are multimodal, handling text and image input (with audio supported on E2B, E4B, and 12B) and generating text output. This release includes open-weights models in both pre-trained and instruction-tuned variants. Gemma 4 features a context window of up to 256K tokens and maintains multilingual support in over 140 languages.
79
+
80
+ Featuring both Dense and Mixture-of-Experts (MoE) architectures, Gemma 4 is well-suited for tasks like text generation, coding, and reasoning. The models are available in five distinct sizes: **E2B**, **E4B**, **12B**, **26B A4B**, and **31B**. Their diverse sizes make them deployable in environments ranging from high-end phones to laptops and servers, democratizing access to state-of-the-art AI.
81
+
82
+ Gemma 4 introduces key **capability and architectural advancements**:
83
+
84
+ * **Reasoning** – All models in the family are designed as highly capable reasoners, with configurable thinking modes.
85
+
86
+ * **Extended Multimodalities** – Processes Text, Image with variable aspect ratio and resolution support (all models), Video, and Audio (featured natively on the E2B, E4B, and 12B models).
87
+
88
+ * **Diverse & Efficient Architectures** – Offers Dense and Mixture-of-Experts (MoE) variants of different sizes for scalable deployment.
89
+
90
+ * **Optimized for On-Device** – Smaller models are specifically designed for efficient local execution on laptops and mobile devices.
91
+
92
+ * **Increased Context Window** – The small models feature a 128K context window, while the medium models support 256K.
93
+
94
+ * **Enhanced Coding & Agentic Capabilities** – Achieves notable improvements in coding benchmarks alongside native function-calling support, powering highly capable autonomous agents.
95
+
96
+ * **Native System Prompt Support** – Gemma 4 introduces native support for the `system` role, enabling more structured and controllable conversations.
97
+
98
+ ## **Models Overview**
99
+
100
+ Gemma 4 models are designed to deliver frontier-level performance at each size, targeting deployment scenarios from mobile and edge devices (E2B, E4B) to consumer GPUs and workstations (12B, 26B A4B, 31B). They are well-suited for reasoning, agentic workflows, coding, and multimodal understanding.
101
+
102
+ The models employ a hybrid attention mechanism that interleaves local sliding window attention with full global attention, ensuring the final layer is always global. This hybrid design delivers the processing speed and low memory footprint of a lightweight model without sacrificing the deep awareness required for complex, long-context tasks. To optimize memory for long contexts, global layers feature unified Keys and Values, and apply Proportional RoPE (p-RoPE).
103
+
104
+ ### Dense Models
105
+
106
+ | Property | E2B | E4B | 12B Unified | 31B Dense |
107
+ | :---- | :---- | :---- | :---- | :---- |
108
+ | **Total Parameters** | 2.3B effective <br> (5.1B with embeddings) | 4.5B effective <br> (8B with embeddings) | 11.95B | 30.7B |
109
+ | **Layers** | 35 | 42 | 48 | 60 |
110
+ | **Sliding Window** | 512 tokens | 512 tokens | 1024 tokens | 1024 tokens |
111
+ | **Context Length** | 128K tokens | 128K tokens | 256K tokens | 256K tokens |
112
+ | **Vocabulary Size** | 262K | 262K | 262K | 262K |
113
+ | **Supported Modalities** | Text, Image, Audio | Text, Image, Audio | Text, Image, Audio | Text, Image |
114
+ | **Vision Encoder Parameters** | *~150M* | *~150M* | - | *~550M* |
115
+ | **Audio Encoder Parameters** | *~300M* | *~300M* | - | No Audio |
116
+
117
+ The "E" in E2B and E4B stands for "effective" parameters. The smaller models incorporate Per-Layer Embeddings (PLE) to maximize parameter efficiency in on-device deployments. Rather than adding more layers or parameters to the model, PLE gives each decoder layer its own small embedding for every token. These embedding tables are large but are only used for quick lookups, which is why the effective parameter count is much smaller than the total.
118
+
119
+ The "Unified" in Gemma 4 12B Unified refers to its encoder-free architecture. Other Gemma 4 models use dedicated encoders to process multimodal data before passing it to the LLM. Gemma 4 12B eliminates these encoders entirely, projecting raw image patches and audio waveforms directly into the LLM's embedding space through lightweight linear layers. This unified approach means all modalities flow straight into a single decoder-only transformer, reducing multimodal latency and allowing the entire model to be fine-tuned in one pass.
120
+
121
+ ### Mixture-of-Experts (MoE) Model
122
+
123
+ | Property | 26B A4B MoE |
124
+ | :---- | :---- |
125
+ | **Total Parameters** | 25.2B |
126
+ | **Active Parameters** | 3.8B |
127
+ | **Layers** | 30 |
128
+ | **Sliding Window** | 1024 tokens |
129
+ | **Context Length** | 256K tokens |
130
+ | **Vocabulary Size** | 262K |
131
+ | **Expert Count** | 8 active / 128 total and 1 shared |
132
+ | **Supported Modalities** | Text, Image |
133
+ | **Vision Encoder Parameters** | *~550M* |
134
+
135
+ The "A" in 26B A4B stands for "active parameters" in contrast to the total number of parameters the model contains. By only activating a 4B subset of parameters during inference, the Mixture-of-Experts model runs much faster than its 26B total might suggest. This makes it an excellent choice for fast inference compared to the dense 31B model since it runs almost as fast as a 4B-parameter model.
136
+
137
+ ## **Benchmark Results**
138
+
139
+ These models were evaluated against a large collection of different datasets and metrics to cover different aspects of text generation. Evaluation results marked in the table are for instruction-tuned models.
140
+
141
+ | | Gemma 4 31B | Gemma 4 26B A4B | Gemma 4 12B Unified | Gemma 4 E4B | Gemma 4 E2B | Gemma 3 27B (no think) |
142
+ | :---- | :---- | :---- | :---- | :---- | :---- | :---- |
143
+ | MMLU Pro | 85.2% | 82.6% | 77.2% | 69.4% | 60.0% | 67.6% |
144
+ | AIME 2026 no tools | 89.2% | 88.3% | 77.5% | 42.5% | 37.5% | 20.8% |
145
+ | LiveCodeBench v6 | 80.0% | 77.1% | 72.0% | 52.0% | 44.0% | 29.1% |
146
+ | Codeforces ELO | 2150 | 1718 | 1659 | 940 | 633 | 110 |
147
+ | GPQA Diamond | 84.3% | 82.3% | 78.8% | 58.6% | 43.4% | 42.4% |
148
+ | Tau2 (average over 3) | 76.9% | 68.2% | 69.0% | 42.2% | 24.5% | 16.2% |
149
+ | HLE no tools | 19.5% | 8.7% | 5.2% | - | - | - |
150
+ | HLE with search | 26.5% | 17.2% | - | - | - | - |
151
+ | BigBench Extra Hard | 74.4% | 64.8% | 53.0% | 33.1% | 21.9% | 19.3% |
152
+ | MMMLU | 88.4% | 86.3% | 83.4% | 76.6% | 67.4% | 70.7% |
153
+ | **Vision** | | | | | | |
154
+ | MMMU Pro | 76.9% | 73.8% | 69.1% | 52.6% | 44.2% | 49.7% |
155
+ | OmniDocBench 1.5 (average edit distance, lower is better) | 0.131 | 0.149 | 0.164 | 0.181 | 0.290 | 0.365 |
156
+ | MATH-Vision | 85.6% | 82.4% | 79.7% | 59.5% | 52.4% | 46.0% |
157
+ | MedXPertQA MM | 61.3% | 58.1% | 48.7% | 28.7% | 23.5% | - |
158
+ | **Audio** | | | | | | |
159
+ | CoVoST | - | - | 38.5<sup>*</sup> | 35.54 | 33.47 | - |
160
+ | FLEURS (lower is better) | - | - | 0.069<sup>*</sup> | 0.08 | 0.09 | - |
161
+ | **Long Context** | | | | | | |
162
+ | MRCR v2 8 needle 128k (average) | 66.4% | 44.1% | 43.4% | 25.4% | 19.1% | 13.5% |
163
+
164
+ <sup>*</sup>Excluding Chinese language.
165
+
166
+ ## **Core Capabilities**
167
+
168
+ Gemma 4 models handle a broad range of tasks across text, vision, and audio. Key capabilities include:
169
+
170
+ * **Thinking** – Built-in reasoning mode that lets the model think step-by-step before answering.
171
+ * **Long Context** – Context windows of up to 128K tokens (E2B/E4B) and 256K tokens (12B, 26B A4B/31B).
172
+ * **Image Understanding** – Object detection, Document/PDF parsing, screen and UI understanding, chart comprehension, OCR (including multilingual), handwriting recognition, and pointing. Images can be processed at variable aspect ratios and resolutions.
173
+ * **Video Understanding** – Analyze video by processing sequences of frames.
174
+ * **Interleaved Multimodal Input** – Freely mix text and images in any order within a single prompt.
175
+ * **Function Calling** – Native support for structured tool use, enabling agentic workflows.
176
+ * **Coding** – Code generation, completion, and correction.
177
+ * **Multilingual** – Out-of-the-box support for 35+ languages, pre-trained on 140+ languages.
178
+ * **Audio** (E2B, E4B, and 12B only) – Automatic speech recognition (ASR) and speech-to-translated-text translation across multiple languages.
179
+
180
+
181
+ ## Getting Started
182
+
183
+ You can use all Gemma 4 models with the latest version of Transformers. To get started, install the necessary dependencies in your environment:
184
+
185
+ `pip install -U transformers torch accelerate`
186
+
187
+ Once you have everything installed, you can proceed to load the model with the code below:
188
+
189
+ ```python
190
+ from transformers import AutoProcessor, AutoModelForMultimodalLM
191
+
192
+ MODEL_ID = "google/gemma-4-12B-it"
193
+
194
+ # Load model
195
+ processor = AutoProcessor.from_pretrained(MODEL_ID)
196
+ model = AutoModelForMultimodalLM.from_pretrained(
197
+ MODEL_ID,
198
+ dtype="auto",
199
+ device_map="auto"
200
+ )
201
+ ```
202
+
203
+ Once the model is loaded, you can start generating output:
204
+
205
+ ```python
206
+ # Prompt
207
+ messages = [
208
+ {"role": "system", "content": "You are a helpful assistant."},
209
+ {"role": "user", "content": "Write a short joke about saving RAM."},
210
+ ]
211
+
212
+ # Process input
213
+ inputs = processor.apply_chat_template(
214
+ messages,
215
+ tokenize=True,
216
+ return_dict=True,
217
+ return_tensors="pt",
218
+ add_generation_prompt=True,
219
+ enable_thinking=False
220
+ ).to(model.device)
221
+ input_len = inputs["input_ids"].shape[-1]
222
+
223
+ # Generate output
224
+ outputs = model.generate(**inputs, max_new_tokens=1024)
225
+ response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
226
+
227
+ # Parse output
228
+ processor.parse_response(response)
229
+ ```
230
+
231
+ To enable reasoning, set `enable_thinking=True` and the `parse_response` function will take care of parsing the thinking output.
232
+
233
+ Below, you will also find snippets for processing audio (E2B, E4B, 12B only), images, and video alongside text:
234
+
235
+ <details>
236
+ <summary>Code for processing Audio</summary>
237
+
238
+ Make sure to install the following packages:
239
+
240
+ `pip install -U transformers torch torchvision librosa accelerate`
241
+
242
+ You can then load the model with the code below:
243
+
244
+ ```python
245
+ from transformers import AutoProcessor, AutoModelForMultimodalLM
246
+
247
+ MODEL_ID = "google/gemma-4-12B-it"
248
+
249
+ # Load model
250
+ processor = AutoProcessor.from_pretrained(MODEL_ID)
251
+ model = AutoModelForMultimodalLM.from_pretrained(
252
+ MODEL_ID,
253
+ dtype="auto",
254
+ device_map="auto"
255
+ )
256
+ ```
257
+
258
+ Once the model is loaded, you can start generating output by directly referencing the audio URL in the prompt:
259
+
260
+
261
+ ```python
262
+ # Prompt - add audio after text
263
+ messages = [
264
+ {
265
+ "role": "user",
266
+ "content": [
267
+ {"type": "text", "text": "Transcribe the following speech segment in its original language. Follow these specific instructions for formatting the answer:\n* Only output the transcription, with no newlines.\n* When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three."},
268
+ {"type": "audio", "audio": "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/apps/sample-data/journal1.wav"},
269
+ ]
270
+ }
271
+ ]
272
+
273
+ # Process input
274
+ inputs = processor.apply_chat_template(
275
+ messages,
276
+ tokenize=True,
277
+ return_dict=True,
278
+ return_tensors="pt",
279
+ add_generation_prompt=True,
280
+ ).to(model.device)
281
+ input_len = inputs["input_ids"].shape[-1]
282
+
283
+ # Generate output
284
+ outputs = model.generate(**inputs, max_new_tokens=512)
285
+ response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
286
+
287
+ # Parse output
288
+ processor.parse_response(response)
289
+ ```
290
+
291
+ </details>
292
+
293
+ <details>
294
+ <summary>Code for processing Images</summary>
295
+
296
+ Make sure to install the following packages:
297
+
298
+
299
+ `pip install -U transformers torch torchvision accelerate`
300
+
301
+ You can then load the model with the code below:
302
+
303
+ ```python
304
+ from transformers import AutoProcessor, AutoModelForMultimodalLM
305
+
306
+ MODEL_ID = "google/gemma-4-12B-it"
307
+
308
+ # Load model
309
+ processor = AutoProcessor.from_pretrained(MODEL_ID)
310
+ model = AutoModelForMultimodalLM.from_pretrained(
311
+ MODEL_ID,
312
+ dtype="auto",
313
+ device_map="auto"
314
+ )
315
+ ```
316
+
317
+ Once the model is loaded, you can start generating output by directly referencing the image URL in the prompt:
318
+
319
+
320
+ ```python
321
+ # Prompt - add image before text
322
+ messages = [
323
+ {
324
+ "role": "user", "content": [
325
+ {"type": "image", "url": "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/apps/sample-data/GoldenGate.png"},
326
+ {"type": "text", "text": "What is shown in this image?"}
327
+ ]
328
+ }
329
+ ]
330
+
331
+ # Process input
332
+ inputs = processor.apply_chat_template(
333
+ messages,
334
+ tokenize=True,
335
+ return_dict=True,
336
+ return_tensors="pt",
337
+ add_generation_prompt=True,
338
+ ).to(model.device)
339
+ input_len = inputs["input_ids"].shape[-1]
340
+
341
+ # Generate output
342
+ outputs = model.generate(**inputs, max_new_tokens=512)
343
+ response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
344
+
345
+ # Parse output
346
+ processor.parse_response(response)
347
+ ```
348
+
349
+ </details>
350
+
351
+
352
+ <details>
353
+ <summary>Code for processing Videos</summary>
354
+
355
+ Make sure to install the following packages:
356
+
357
+ `pip install -U transformers torch torchvision librosa accelerate`
358
+
359
+ You can then load the model with the code below:
360
+
361
+ ```python
362
+ from transformers import AutoProcessor, AutoModelForMultimodalLM
363
+
364
+ MODEL_ID = "google/gemma-4-12B-it"
365
+
366
+ # Load model
367
+ processor = AutoProcessor.from_pretrained(MODEL_ID)
368
+ model = AutoModelForMultimodalLM.from_pretrained(
369
+ MODEL_ID,
370
+ dtype="auto",
371
+ device_map="auto"
372
+ )
373
+ ```
374
+
375
+ Once the model is loaded, you can start generating output by directly referencing the video URL in the prompt:
376
+
377
+
378
+ ```python
379
+ # Prompt - add video before text
380
+ messages = [
381
+ {
382
+ 'role': 'user',
383
+ 'content': [
384
+ {"type": "video", "video": "https://github.com/bebechien/gemma/raw/refs/heads/main/videos/ForBiggerBlazes.mp4"},
385
+ {'type': 'text', 'text': 'Describe this video.'}
386
+ ]
387
+ }
388
+ ]
389
+
390
+ # Process input
391
+ inputs = processor.apply_chat_template(
392
+ messages,
393
+ tokenize=True,
394
+ return_dict=True,
395
+ return_tensors="pt",
396
+ add_generation_prompt=True,
397
+ ).to(model.device)
398
+ input_len = inputs["input_ids"].shape[-1]
399
+
400
+ # Generate output
401
+ outputs = model.generate(**inputs, max_new_tokens=512)
402
+ response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
403
+
404
+ # Parse output
405
+ processor.parse_response(response)
406
+ ```
407
+
408
+ </details>
409
+
410
+
411
+
412
+ ## **Best Practices**
413
+
414
+ For the best performance, use these configurations and best practices:
415
+
416
+ ### 1. Sampling Parameters
417
+
418
+ Use the following standardized sampling configuration across all use cases:
419
+
420
+ * `temperature=1.0`
421
+ * `top_p=0.95`
422
+ * `top_k=64`
423
+
424
+ ### 2. Thinking Mode Configuration
425
+
426
+ Compared to Gemma 3, the models use standard `system`, `assistant`, and `user` roles. To properly manage the thinking process, use the following control tokens:
427
+
428
+ * **Trigger Thinking:** Thinking is enabled by including the `<|think|>` token at the start of the system prompt. To disable thinking, remove the token.
429
+ * **Standard Generation:** When thinking is enabled, the model will output its internal reasoning followed by the final answer using this structure:
430
+ `<|channel>thought\n`**[Internal reasoning]**`<channel|>`
431
+ * **Disabled Thinking Behavior:** For all models except for the E2B and E4B variants, if thinking is disabled, the model will still generate the tags but with an empty thought block:
432
+ `<|channel>thought\n<channel|>`**[Final answer]**
433
+
434
+ > [!Note]
435
+ > Note that many libraries like Transformers and llama.cpp handle the complexities of the chat template for you.
436
+
437
+ ### 3. Multi-Turn Conversations
438
+
439
+ * **No Thinking Content in History**: In multi-turn conversations, the historical model output should only include the final response. Thoughts from previous model turns must *not be added* before the next user turn begins.
440
+
441
+ ### 4. Modality order
442
+
443
+ For optimal performance with multimodal inputs, place:
444
+
445
+ * Image content **before** the text in your prompt.
446
+ * Audio content **after** the text in your prompt.
447
+
448
+ ### 5. Variable Image Resolution
449
+
450
+ Aside from variable aspect ratios, Gemma 4 supports variable image resolution through a configurable visual token budget, which controls how many tokens are used to represent an image. A higher token budget preserves more visual detail at the cost of additional compute, while a lower budget enables faster inference for tasks that don't require fine-grained understanding.
451
+
452
+ * The supported token budgets are: **70**, **140**, **280**, **560**, and **1120**.
453
+ * Use *lower budgets* for classification, captioning, or video understanding, where faster inference and processing many frames outweigh fine-grained detail.
454
+ * Use *higher budgets* for tasks like OCR, document parsing, or reading small text.
455
+
456
+ ### 6. Audio
457
+
458
+ Use the following prompt structures for audio processing:
459
+
460
+ * **Audio Speech Recognition (ASR)**
461
+
462
+ ```text
463
+ Transcribe the following speech segment in {LANGUAGE} into {LANGUAGE} text.
464
+
465
+ Follow these specific instructions for formatting the answer:
466
+ * Only output the transcription, with no newlines.
467
+ * When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three.
468
+ ```
469
+
470
+ * **Automatic Speech Translation (AST)**
471
+
472
+ ```text
473
+ Transcribe the following speech segment in {SOURCE_LANGUAGE}, then translate it into {TARGET_LANGUAGE}.
474
+ When formatting the answer, first output the transcription in {SOURCE_LANGUAGE}, then one newline, then output the string '{TARGET_LANGUAGE}: ', then the translation in {TARGET_LANGUAGE}.
475
+ ```
476
+
477
+ ### 7. Audio and Video Length
478
+
479
+ All models support image inputs and can process videos as frames whereas the E2B, E4B, and 12B models also support audio inputs. Audio supports a maximum length of 30 seconds. Video supports a maximum of 60 seconds assuming the images are processed at one frame per second.
480
+
481
+ ## **Model Data**
482
+
483
+ Data used for model training and how the data was processed.
484
+
485
+ ### **Training Dataset**
486
+
487
+ Our pre-training dataset is a large-scale, diverse collection of data encompassing a wide range of domains and modalities, which includes web documents, code, images, audio, with a cutoff date of January 2025. Here are the key components:
488
+
489
+ * **Web Documents**: A diverse collection of web text ensures the model is exposed to a broad range of linguistic styles, topics, and vocabulary. The training dataset includes content in over 140 languages.
490
+ * **Code**: Exposing the model to code helps it to learn the syntax and patterns of programming languages, which improves its ability to generate code and understand code-related questions.
491
+ * **Mathematics**: Training on mathematical text helps the model learn logical reasoning, symbolic representation, and to address mathematical queries.
492
+ * **Images**: A wide range of images enables the model to perform image analysis and visual data extraction tasks.
493
+
494
+ The combination of these diverse data sources is crucial for training a powerful multimodal model that can handle a wide variety of different tasks and data formats.
495
+
496
+ ### **Data Preprocessing**
497
+
498
+ Here are the key data cleaning and filtering methods applied to the training data:
499
+
500
+ * **CSAM Filtering**: Rigorous CSAM (Child Sexual Abuse Material) filtering was applied at multiple stages in the data preparation process to ensure the exclusion of harmful and illegal content.
501
+ * **Sensitive Data Filtering**: As part of making Gemma pre-trained models safe and reliable, automated techniques were used to filter out certain personal information and other sensitive data from training sets.
502
+ * **Additional methods**: Filtering based on content quality and safety in line with [our policies](https://ai.google/static/documents/ai-responsibility-update-published-february-2025.pdf).
503
+
504
+ ## **Ethics and Safety**
505
+
506
+ As open models become central to enterprise infrastructure, provenance and security are paramount. Developed by Google DeepMind, Gemma 4 undergoes the same rigorous safety evaluations as our proprietary Gemini models.
507
+
508
+ ### **Evaluation Approach**
509
+
510
+ Gemma 4 models were developed in partnership with internal safety and responsible AI teams. A range of automated as well as human evaluations were conducted to help improve model safety. These evaluations align with [Google’s AI principles](https://ai.google/principles/), as well as safety policies, which aim to prevent our generative AI models from generating harmful content, including:
511
+
512
+ * Content related to child sexual abuse material and exploitation
513
+ * Dangerous content (e.g., promoting suicide, or instructing in activities that could cause real-world harm)
514
+ * Sexually explicit content
515
+ * Hate speech (e.g., dehumanizing members of protected groups)
516
+ * Harassment (e.g., encouraging violence against people)
517
+
518
+ ### **Evaluation Results**
519
+
520
+ For all areas of safety testing, we saw major improvements in all categories of content safety relative to previous Gemma models. Overall, Gemma 4 models significantly outperform Gemma 3 and 3n models in improving safety, while keeping unjustified refusals low. All testing was conducted without safety filters to evaluate the model capabilities and behaviors. For both text-to-text and image-to-text, and across all model sizes, the model produced minimal policy violations, and showed significant improvements over previous Gemma models' performance.
521
+
522
+ ## **Usage and Limitations**
523
+
524
+ These models have certain limitations that users should be aware of.
525
+
526
+ ### **Intended Usage**
527
+
528
+ Multimodal models (capable of processing vision, language, and/or audio) have a wide range of applications across various industries and domains. The following list of potential uses is not comprehensive. The purpose of this list is to provide contextual information about the possible use-cases that the model creators considered as part of model training and development.
529
+
530
+ * **Content Creation and Communication**
531
+ * **Text Generation**: These models can be used to generate creative text formats such as poems, scripts, code, marketing copy, and email drafts.
532
+ * **Chatbots and Conversational AI**: Power conversational interfaces for customer service, virtual assistants, or interactive applications.
533
+ * **Text Summarization**: Generate concise summaries of a text corpus, research papers, or reports.
534
+ * **Image Data Extraction**: These models can be used to extract, interpret, and summarize visual data for text communications.
535
+ * **Audio Processing and Interaction**: The E2B, E4B, and 12B models can analyze and interpret audio inputs, enabling voice-driven interactions and transcriptions.
536
+ * **Research and Education**
537
+ * **Natural Language Processing (NLP) and VLM Research**: These models can serve as a foundation for researchers to experiment with VLM and NLP techniques, develop algorithms, and contribute to the advancement of the field.
538
+ * **Language Learning Tools**: Support interactive language learning experiences, aiding in grammar correction or providing writing practice.
539
+ * **Knowledge Exploration**: Assist researchers in exploring large bodies of text by generating summaries or answering questions about specific topics.
540
+
541
+ ### **Limitations**
542
+
543
+ * **Training Data**
544
+ * The quality and diversity of the training data significantly influence the model's capabilities. Biases or gaps in the training data can lead to limitations in the model's responses.
545
+ * The scope of the training dataset determines the subject areas the model can handle effectively.
546
+ * **Context and Task Complexity**
547
+ * Models perform well on tasks that can be framed with clear prompts and instructions. Open-ended or highly complex tasks might be challenging.
548
+ * A model's performance can be influenced by the amount of context provided (longer context generally leads to better outputs, up to a certain point).
549
+ * **Language Ambiguity and Nuance**
550
+ * Natural language is inherently complex. Models might struggle to grasp subtle nuances, sarcasm, or figurative language.
551
+ * **Factual Accuracy**
552
+ * Models generate responses based on information they learned from their training datasets, but they are not knowledge bases. They may generate incorrect or outdated factual statements.
553
+ * **Common Sense**
554
+ * Models rely on statistical patterns in language. They might lack the ability to apply common sense reasoning in certain situations.
555
+
556
+ ### **Ethical Considerations and Risks**
557
+
558
+ The development of vision-language models (VLMs) raises several ethical concerns. In creating an open model, we have carefully considered the following:
559
+
560
+ * **Bias and Fairness**
561
+ * VLMs trained on large-scale, real-world text and image data can reflect socio-cultural biases embedded in the training material. Gemma 4 models underwent careful scrutiny, input data pre-processing, and post-training evaluations as reported in this card to help mitigate the risk of these biases.
562
+ * **Misinformation and Misuse**
563
+ * VLMs can be misused to generate text that is false, misleading, or harmful.
564
+ * Guidelines are provided for responsible use with the model, see the [Responsible Generative AI Toolkit](https://ai.google.dev/responsible).
565
+ * **Transparency and Accountability**
566
+ * This model card summarizes details on the models' architecture, capabilities, limitations, and evaluation processes.
567
+ * A responsibly developed open model offers the opportunity to share innovation by making VLM technology accessible to developers and researchers across the AI ecosystem.
568
+
569
+ **Risks identified and mitigations**:
570
+
571
+ * **Generation of harmful content**: Mechanisms and guidelines for content safety are essential. Developers are encouraged to exercise caution and implement appropriate content safety safeguards based on their specific product policies and application use cases.
572
+ * **Misuse for malicious purposes**: Technical limitations and developer and end-user education can help mitigate against malicious applications of VLMs. Educational resources and reporting mechanisms for users to flag misuse are provided.
573
+ * **Privacy violations**: Models were trained on data filtered for removal of certain personal information and other sensitive data. Developers are encouraged to adhere to privacy regulations with privacy-preserving techniques.
574
+ * **Perpetuation of biases**: It's encouraged to perform continuous monitoring (using evaluation metrics, human review) and the exploration of de-biasing techniques during model training, fine-tuning, and other use cases.
575
+
576
+ ### **Benefits**
577
+
578
+ At the time of release, this family of models provides high-performance open vision-language model implementations designed from the ground up for responsible AI development compared to similarly sized models.
config.json ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Gemma4ForConditionalGeneration"
4
+ ],
5
+ "audio_config": null,
6
+ "audio_token_id": 258881,
7
+ "boa_token_id": 256000,
8
+ "boi_token_id": 255999,
9
+ "torch_dtype": "bfloat16",
10
+ "eoa_token_id": 258883,
11
+ "eoa_token_index": 258883,
12
+ "eoi_token_id": 258882,
13
+ "eos_token_id": 106,
14
+ "image_token_id": 258880,
15
+ "initializer_range": 0.02,
16
+ "model_type": "gemma4",
17
+ "pad_token_id": 0,
18
+ "text_config": {
19
+ "attention_bias": false,
20
+ "attention_dropout": 0.0,
21
+ "attention_k_eq_v": true,
22
+ "bos_token_id": 2,
23
+ "torch_dtype": "bfloat16",
24
+ "enable_moe_block": true,
25
+ "eos_token_id": 1,
26
+ "final_logit_softcapping": 30.0,
27
+ "global_head_dim": 512,
28
+ "head_dim": 256,
29
+ "hidden_activation": "gelu_pytorch_tanh",
30
+ "hidden_size": 2816,
31
+ "hidden_size_per_layer_input": 0,
32
+ "initializer_range": 0.02,
33
+ "intermediate_size": 2112,
34
+ "layer_types": [
35
+ "sliding_attention",
36
+ "sliding_attention",
37
+ "sliding_attention",
38
+ "sliding_attention",
39
+ "sliding_attention",
40
+ "full_attention",
41
+ "sliding_attention",
42
+ "sliding_attention",
43
+ "sliding_attention",
44
+ "sliding_attention",
45
+ "sliding_attention",
46
+ "full_attention",
47
+ "sliding_attention",
48
+ "sliding_attention",
49
+ "sliding_attention",
50
+ "sliding_attention",
51
+ "sliding_attention",
52
+ "full_attention",
53
+ "sliding_attention",
54
+ "sliding_attention",
55
+ "sliding_attention",
56
+ "sliding_attention",
57
+ "sliding_attention",
58
+ "full_attention",
59
+ "sliding_attention",
60
+ "sliding_attention",
61
+ "sliding_attention",
62
+ "sliding_attention",
63
+ "sliding_attention",
64
+ "full_attention"
65
+ ],
66
+ "max_position_embeddings": 262144,
67
+ "model_type": "gemma4_text",
68
+ "moe_intermediate_size": 704,
69
+ "num_attention_heads": 16,
70
+ "num_experts": 128,
71
+ "num_global_key_value_heads": 2,
72
+ "num_hidden_layers": 30,
73
+ "num_key_value_heads": 8,
74
+ "num_kv_shared_layers": 0,
75
+ "pad_token_id": 0,
76
+ "rms_norm_eps": 1e-06,
77
+ "rope_parameters": {
78
+ "full_attention": {
79
+ "partial_rotary_factor": 0.25,
80
+ "rope_theta": 1000000.0,
81
+ "rope_type": "proportional"
82
+ },
83
+ "sliding_attention": {
84
+ "rope_theta": 10000.0,
85
+ "rope_type": "default"
86
+ }
87
+ },
88
+ "sliding_window": 1024,
89
+ "tie_word_embeddings": true,
90
+ "top_k_experts": 8,
91
+ "use_bidirectional_attention": "vision",
92
+ "use_cache": true,
93
+ "use_double_wide_mlp": false,
94
+ "vocab_size": 262144,
95
+ "vocab_size_per_layer_input": 262144
96
+ },
97
+ "tie_word_embeddings": true,
98
+ "transformers_version": "5.5.0.dev0",
99
+ "unsloth_fixed": true,
100
+ "video_token_id": 258884,
101
+ "vision_config": {
102
+ "_name_or_path": "",
103
+ "architectures": null,
104
+ "attention_bias": false,
105
+ "attention_dropout": 0.0,
106
+ "chunk_size_feed_forward": 0,
107
+ "default_output_length": 280,
108
+ "torch_dtype": "bfloat16",
109
+ "global_head_dim": 72,
110
+ "head_dim": 72,
111
+ "hidden_activation": "gelu_pytorch_tanh",
112
+ "hidden_size": 1152,
113
+ "id2label": {
114
+ "0": "LABEL_0",
115
+ "1": "LABEL_1"
116
+ },
117
+ "initializer_range": 0.02,
118
+ "intermediate_size": 4304,
119
+ "is_encoder_decoder": false,
120
+ "label2id": {
121
+ "LABEL_0": 0,
122
+ "LABEL_1": 1
123
+ },
124
+ "max_position_embeddings": 131072,
125
+ "model_type": "gemma4_vision",
126
+ "num_attention_heads": 16,
127
+ "num_hidden_layers": 27,
128
+ "num_key_value_heads": 16,
129
+ "output_attentions": false,
130
+ "output_hidden_states": false,
131
+ "patch_size": 16,
132
+ "pooling_kernel_size": 3,
133
+ "position_embedding_size": 10240,
134
+ "problem_type": null,
135
+ "return_dict": true,
136
+ "rms_norm_eps": 1e-06,
137
+ "rope_parameters": {
138
+ "rope_theta": 100.0,
139
+ "rope_type": "default"
140
+ },
141
+ "standardize": true,
142
+ "use_clipped_linears": false
143
+ },
144
+ "vision_soft_tokens_per_image": 280
145
+ }
gemma-4-26B-A4B-it-qat-UD-Q4_K_XL.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dcf179a91153e3a7ece792e48ef872180d9d6ef9b7677f0a0bd3e83cfe624d5e
3
+ size 14249045120
mmproj-BF16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b06953ccdbe8cf363f47841a7afaacd2b1c2ff9a8d6b426fdec7521a6878744
3
+ size 1194828256
mmproj-F16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d00f211a7d4f7fb19bd9b75d8e9342eccffb5920b08fd9562167560fdfcc5dd1
3
+ size 1193058784
mmproj-F32.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef269e294502d6ee3722cbf129681b2586c2e6ceb79d0507963c92146e058cd4
3
+ size 2291200480
mtp-gemma-4-26B-A4B-it.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62bd3af7f66c9308de9a5454233852f8c7324c93767e8dfb824ed45b9179864a
3
+ size 251937728