Gemma 3 12B IT (Multimodal) — Besoins VRAM, matrice de quantification et guide GPU
Gemma 3 12B IT (Multimodal) (Google Gemma, Gemma Terms) repose sur une architecture Transformer dense comptant 12.2B paramètres résidents (12.2B actifs par token), 48 couches et Fenêtre glissante hybride (SWA) prenant en charge jusqu’à 131,072 tokens de contexte.
Simulateur interactif de mémoire et de contexte pour Gemma 3 12B IT (Multimodal)
Matrice VRAM par précision et quantification (contexte 8K / 32K / 128K)
| Précision / Format | bpw effectifs | Poids seuls | Total @ ctx 8K | Total @ ctx 32K | Total @ ctx 128K | Palier recommandé (@ 32K) |
|---|---|---|---|---|---|---|
| FP16 / BF16 | 16.00 bpw | 22.72 Go | 25.34 Go | 26.84 Go | 32.84 Go | RTX 5090 32GB |
| FP8 | 8.50 bpw | 12.07 Go | 14.37 Go | 15.87 Go | 21.87 Go | RTX 3090 24GB |
| Q8_0 | 8.50 bpw | 12.07 Go | 14.37 Go | 15.87 Go | 21.87 Go | RTX 3090 24GB |
| Q6_K | 6.56 bpw | 9.32 Go | 11.53 Go | 13.03 Go | 19.03 Go | RTX 4060 Ti 16GB |
| Q5_K_M | 5.69 bpw | 8.08 Go | 10.26 Go | 11.76 Go | 17.76 Go | RTX 4060 Ti 16GB |
| Q4_K_M | 4.85 bpw | 6.89 Go | 9.03 Go | 10.53 Go | 16.53 Go | RTX 3060 12GB |
| AWQ INT4 | 4.50 bpw | 6.39 Go | 8.52 Go | 10.02 Go | 16.02 Go | RTX 3060 12GB |
| IQ4_XS | 4.25 bpw | 6.04 Go | 8.15 Go | 9.65 Go | 15.65 Go | RTX 3060 12GB |
Compatibilité matérielle et vitesse de décodage (Gemma 3 12B IT (Multimodal) @ Q4_K_M, contexte 32K)
| Palier matériel | Mémoire et bande passante | Requis (32K) | Compatibilité | Débit décodage est. |
|---|---|---|---|---|
| RTX 3090 24GB | 24 Go · 936 GB/s | 10.53 Go (44%) | Tient confortablement | 59.3 tok/s |
| RTX 4090 24GB | 24 Go · 1008 GB/s | 10.53 Go (44%) | Tient confortablement | 63.8 tok/s |
| RTX 5090 32GB | 32 Go · 1792 GB/s | 10.53 Go (33%) | Tient confortablement | 113.5 tok/s |
| Apple M-Max 64GB | 64 Go · 546 GB/s | 10.09 Go (16%) | Tient confortablement | 32.5 tok/s |
| Mac Studio 128GB | 128 Go · 546 GB/s | 10.09 Go (8%) | Tient confortablement | 32.5 tok/s |
| Mac Studio 192GB | 192 Go · 800 GB/s | 10.09 Go (5%) | Tient confortablement | 47.7 tok/s |
| NVIDIA A100 80GB | 80 Go · 2039 GB/s | 10.53 Go (13%) | Tient confortablement | 136.7 tok/s |
| NVIDIA H100 80GB | 80 Go · 3350 GB/s | 10.53 Go (13%) | Tient confortablement | 224.6 tok/s |
Paramètres vérifiés de l’architecture Transformer
- Checkpoint ID
- google/gemma-3-12b-it
- Ollama Tag
- gemma3:12b
- License / Release
- Gemma Terms · 2025-Q1
- Topologie et attention
- Transformer dense
- Mécanisme d’attention
- Fenêtre glissante hybride (SWA)
- Paramètres totaux (B)
- 12.2B
- Paramètres actifs / token (B)
- 12.2B
- Couches cachées / Dimension cachée
- 48 / 3840
- Têtes de requête / Têtes KV
- 16Q / 8KV (d=256)
- Sliding Window
- 1024 (83% local)
- Vocab / Max Position
- 262,208 / 131,072
Les formats quantifiés stockent des facteurs d’échelle et des points zéro par bloc aux côtés des poids entiers compressés. Un checkpoint GGUF Q4_K_M 4 bits occupe en moyenne 4.85 bits effectifs par paramètre (et non 4.00), tandis que Q8_0 atteint 8.50 bpw. Pour les architectures Mixture-of-Experts, l’ensemble des experts routés et partagés reste résident en mémoire afin d’éviter la pagination hôte à chaque token.
L’attention à requêtes groupées standard alloue 2 × L × H_kv × d_head × S × B × bytes_kv sur l’ensemble des couches. L’attention latente multi-têtes de DeepSeek (MLA) compresse clés et valeurs en L × (d_kv_lora + d_qk_rope) × S × B × bytes_kv, réduisant de plus de 90 % l’empreinte mémoire sur long contexte. Les modèles hybrides à fenêtre glissante plafonnent les couches locales à min(S, window_size) tout en faisant croître linéairement les couches globales avec S.
Commandes rapides vLLM et Ollama pour Gemma 3 12B IT (Multimodal)
vllm serve google/gemma-3-12b-it \
--tensor-parallel-size 1 \
--max-model-len 32768 \
--max-num-seqs 8 \
--gpu-memory-utilization 0.95 \
--kv-cache-dtype fp8 \
--enable-prefix-caching \
--port 8000
# Save as Modelfile, then run: ollama create gemma-3-12b-custom -f Modelfile
FROM gemma3:12b
PARAMETER num_ctx 32768
PARAMETER num_batch 512
PARAMETER flash_attn true
# Environment variables for ollama serve:
# OLLAMA_NUM_PARALLEL=8 OLLAMA_FLASH_ATTENTION=1 OLLAMA_KV_CACHE_TYPE=q8_0 ollama serve
Comparer les modèles proches et de taille similaire à poids ouverts
Gemma 3 27B IT (Multimodal)
Google Gemma · 27.4B (HYBRID_SWA)
Microsoft Phi-4 (14B)
Microsoft Phi · 14.7B (GQA)
Qwen3-14B
Qwen · 14.8B (GQA)
GLM-4-9B-0414
Zhipu GLM · 9.4B (GQA)
Qwen3-8B
Qwen · 8.2B (GQA)
Llama 3.1 8B Instruct
Meta Llama · 8.03B (GQA)