Downloads · 30 days
184
6% of all-time downloads
WhiskyAKM/Gemma-4-E2B-it-qat-GGUF
Gemma-4-E2B-it-qat-GGUF is a any-to-any model from WhiskyAKM. Use it for the any-to-any task on the model card, and read the license before you ship it in a product. It is set up for llama-cpp. The card lists the license as apache-2.0.
GGUF quantizations of google/gemma-4-E2B-it-qat-q4-0, created from the Quantization-Aware Training (QAT) checkpoint of Gemma 4 E2B IT.
Downloads · 30 days
184
6% of all-time downloads
All-time downloads
2.9K
Public
Repo size
36.4 GB
Likes
0
Public
Click a slice to open those files.
.gguf36.4 GB · 100%
From the Hugging Face model README
GGUF quantizations of google/gemma-4-E2B-it-qat-q4-0, created from the Quantization-Aware Training (QAT) checkpoint of Gemma 4 E2B IT.
Gemma 4 E2B IT is a multimodal model built by Google DeepMind that handles text, image, and audio inputs and generates text output. It is designed for efficient on-device deployment on laptops and mobile devices.
The "E" in E2B stands for "effective" parameters — the model uses Per-Layer Embeddings (PLE) to maximize parameter efficiency, giving each decoder layer its own small embedding for every token. This keeps the effective parameter count much smaller than the total.
This repository contains GGUF conversions of the QAT-optimized checkpoint, making it usable with llama.cpp and other GGUF-compatible inference engines.
| Property | Value |
|---|---|
| Architecture | Gemma4ForConditionalGeneration |
| Effective Parameters | 2.3B (5.1B with embeddings) |
| Layers | 35 |
| Sliding Window | 512 tokens |
| Context Length | 128K tokens |
| Vocabulary Size | 262K |
| Supported Modalities | Text, Image, Audio |
| Vision Encoder Parameters | ~150M |
| Audio Encoder Parameters | ~300M |
| Attention | Hybrid (sliding window + global, every 5th layer) |
| RoPE | Proportional RoPE (p-RoPE) on global layers |
| File | Format | Size | Description |
|---|---|---|---|
gemma-4-E2B-it-qat-Q4_0.gguf | Q4_0 | 3.2G | QAT Q4_0 — native QAT quantization |
gemma-4-E2B-it-qat-Q4_K_M.gguf | Q4_K_M | 3.2G | K-quant, medium |
gemma-4-E2B-it-qat-Q4_K_S.gguf | Q4_K_S | 3.2G | K-quant, small |
gemma-4-E2B-it-qat-Q5_K_M.gguf | Q5_K_M | 3.4G | K-quant, medium |
gemma-4-E2B-it-qat-Q5_K_S.gguf | Q5_K_S | 3.4G | K-quant, small |
gemma-4-E2B-it-qat-Q6_K.gguf | Q6_K | 3.6G | K-quant, higher precision |
gemma-4-E2B-it-qat-Q8_0.gguf | Q8_0 | 4.7G | 8-bit, highest GGUF precision |
gemma-4-E2B-it-qat-bf16.gguf | bf16 | 8.7G | Full bfloat16 (unquantized) |
A chat_template.jinja file is also provided for use with chat-based inference.
Note on QAT: The Q4_0 file is the native QAT quantization. The K-quant and Q8_0 variants are additional GGUF quantizations produced from the QAT checkpoint. The QAT optimization preserves quality close to bfloat16 while dramatically reducing memory requirements.
# Run text inference
./llama-cli \
-m gemma-4-E2B-it-qat-Q4_0.gguf \
-p "Explain quantum computing in simple terms." \
--temp 1.0 --top-k 64 --top-p 0.95
./llama-server \
-m gemma-4-E2B-it-qat-Q4_0.gguf \
--host 0.0.0.0 --port 8080
For image and audio inputs, use a GGUF-compatible engine with multimodal support. Refer to your inference engine's documentation for passing image/audio data alongside text prompts.
Modality order tip: For best results, place image content before text and audio content after text in your prompt.
Recommended parameters from the model's generation_config.json:
| Parameter | Value |
|---|---|
| Temperature | 1.0 |
| Top-K | 64 |
| Top-P | 0.95 |
| BOS Token ID | 2 |
| EOS Token IDs | 1, 106, 50 |
| Pad Token ID | 0 |
Gemma 4 supports configurable thinking (reasoning) mode:
<|think|> token at the start of the system prompt.<|channel>thought
[Internal reasoning]
<channel|>
[Final answer]
<|think|> token. For the E2B variant, thinking is fully off when disabled (no empty thought block is generated).Many libraries like Transformers and llama.cpp handle the chat template complexities automatically.
system role for structured conversations@misc{gemmateam2026gemma4,
title={Gemma 4 Technical Report},
author={Gemma Team},
year={2026},
eprint={2607.02770},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2607.02770},
}