Codestral 22B — VRAM-Anforderungen, Quantisierungsmatrix & GPU-Leitfaden
Codestral 22B (Mistral, Mistral Non-Production) nutzt eine Dichter Transformer-Architektur mit 22.2B residenten Parametern (22.2B aktiv pro Token), 56 Schichten und Grouped-Query Attention (GQA) für bis zu 32,768 Kontext-Tokens.
Interaktiver Speicher- & Kontextsimulator für Codestral 22B
Präzisions- & Quantisierungs-VRAM-Matrix (8K / 32K / 128K Kontext)
| Präzision / Format | Effektive bpw | Nur Gewichte | Gesamt @ 8K | Gesamt @ 32K | Gesamt @ 128K | Empfohlene Klasse (@ 32K) |
|---|---|---|---|---|---|---|
| FP16 / BF16 | 16.00 bpw | 41.35 GB | 45.61 GB | 50.86 GB | 71.86 GB | NVIDIA A100 80GB |
| FP8 | 8.50 bpw | 21.97 GB | 25.64 GB | 30.89 GB | 51.89 GB | RTX 5090 32GB |
| Q8_0 | 8.50 bpw | 21.97 GB | 25.64 GB | 30.89 GB | 51.89 GB | RTX 5090 32GB |
| Q6_K | 6.56 bpw | 16.95 GB | 20.48 GB | 25.73 GB | 46.73 GB | RTX 5090 32GB |
| Q5_K_M | 5.69 bpw | 14.71 GB | 18.16 GB | 23.41 GB | 44.41 GB | RTX 5090 32GB |
| Q4_K_M | 4.85 bpw | 12.53 GB | 15.93 GB | 21.18 GB | 42.18 GB | RTX 3090 24GB |
| AWQ INT4 | 4.50 bpw | 11.63 GB | 14.99 GB | 20.24 GB | 41.24 GB | RTX 3090 24GB |
| IQ4_XS | 4.25 bpw | 10.98 GB | 14.33 GB | 19.58 GB | 40.58 GB | RTX 3090 24GB |
Hardware-Kompatibilität & Decode-Geschwindigkeit (Codestral 22B @ Q4_K_M, 32K Kontext)
| Hardware-Klasse | Speicher & Bandbreite | Benötigt (32K) | Bewertung | Gesch. Decode-Rate |
|---|---|---|---|---|
| RTX 3090 24GB | 24 GB · 936 GB/s | 21.18 GB (88%) | Knapp (>90 % nutzbar) | 27.9 tok/s |
| RTX 4090 24GB | 24 GB · 1008 GB/s | 21.18 GB (88%) | Knapp (>90 % nutzbar) | 30.1 tok/s |
| RTX 5090 32GB | 32 GB · 1792 GB/s | 21.18 GB (66%) | Passt komfortabel | 53.4 tok/s |
| Apple M-Max 64GB | 64 GB · 546 GB/s | 20.65 GB (32%) | Passt komfortabel | 15.3 tok/s |
| Mac Studio 128GB | 128 GB · 546 GB/s | 20.65 GB (16%) | Passt komfortabel | 15.3 tok/s |
| Mac Studio 192GB | 192 GB · 800 GB/s | 20.65 GB (11%) | Passt komfortabel | 22.5 tok/s |
| NVIDIA A100 80GB | 80 GB · 2039 GB/s | 21.18 GB (27%) | Passt komfortabel | 64.4 tok/s |
| NVIDIA H100 80GB | 80 GB · 3350 GB/s | 21.18 GB (27%) | Passt komfortabel | 105.8 tok/s |
Geprüfte Transformer-Architekturparameter
- Checkpoint ID
- mistralai/Codestral-22B-v0.1
- Ollama Tag
- codestral:22b
- License / Release
- Mistral Non-Production · 2024-Q3
- Topologie & Attention
- Dichter Transformer
- Aufmerksamkeitsmechanismus
- Grouped-Query Attention (GQA)
- Gesamtparameter (Mrd.)
- 22.2B
- Aktive Parameter / Token (Mrd.)
- 22.2B
- Verborgene Schichten / Hidden-Dimension
- 56 / 6144
- Query-Heads / KV-Heads
- 48Q / 8KV (d=128)
- Vocab / Max Position
- 32,768 / 32,768
Quantisierte Formate speichern blockweise Skalierungsfaktoren und Nullpunkte neben gepackten Ganzzahlgewichten. Ein 4-Bit-GGUF-Checkpoint in Q4_K_M benötigt im Schnitt 4.85 effektive Bits pro Parameter (nicht 4.00), während Q8_0 bei 8.50 bpw liegt. Bei Mixture-of-Experts-Modellen bleiben sämtliche gerouteten und geteilten Experten im Speicher resident, um Host-Paging bei jedem Token zu verhindern.
Standard-Grouped-Query-Attention reserviert über alle Schichten hinweg 2 × L × H_kv × d_head × S × B × bytes_kv. DeepSeek Multi-head Latent Attention (MLA) komprimiert Keys und Values auf L × (d_kv_lora + d_qk_rope) × S × B × bytes_kv und senkt den Speicherbedarf langer Kontexte um über 90 %. Hybride Sliding-Window-Modelle deckeln lokale Schichten bei min(S, window_size), während globale Schichten linear mit S wachsen.
Schnellstart-Befehle für vLLM & Ollama (Codestral 22B)
vllm serve mistralai/Codestral-22B-v0.1 \
--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 codestral-22b-custom -f Modelfile
FROM codestral:22b
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
Verwandte & ähnlich große Open-Weight-Modelle vergleichen
Devstral Small (24B SWE Agent)
Mistral · 23.6B (GQA)
Mistral Small 3.1 (24B)
Mistral · 24B (GQA)
Mistral Large 2411 (123B)
Mistral · 123B (GQA)
Gemma 3 27B IT (Multimodal)
Google Gemma · 27.4B (HYBRID_SWA)
Qwen3-14B
Qwen · 14.8B (GQA)
Microsoft Phi-4 (14B)
Microsoft Phi · 14.7B (GQA)