Codestral 22B
22BMistral AI
Mistral's dedicated code model. 80+ language support, Fill-in-the-Middle capable.
33K
Max Context
2
Quant Variants
GGUF Q4_K_M
Best Quality
97.0%
Accuracy Retained
Quantization Variants
Per-quant VRAM, quality loss, and inference speed on RTX 4090
Measured = site benchmarks · Estimated = formula · Community = public reports
Similar models
Compare with Mistral SmallMistral Small 24B Instruct
Mistral AI
Mistral's efficient 24B. Strong multilingual; fits on 24GB with Q4.
Mistral Large 3 675B Instruct
Mistral AI
Mistral 3 flagship MoE (41B active / 675B total) with vision encoder. FP8 on 8×H200; GGUF quant for research clusters only.
Mistral Nemo 12B Instruct
Mistral AI
Mistral + NVIDIA collaboration. 128K context, excellent multilingual support.
Mixtral 8x7B Instruct
Mistral AI
Classic MoE model. ~13B active params per token; needs 32GB+ VRAM for Q4.
Running Codestral 22B locally
At Q4_K_M and 4K of context, Codestral 22B needs about 15.0 GB — 12.8 GB of weights, 0.88 GB of KV cache and a 1.4 GB activation buffer. The smallest card in this index that clears that comfortably is the Radeon RX 7900 XT at 20 GB, and 31 of the 63 cards here do. These are calculated figures, not measurements: the estimate stops counting a card as comfortable at 88% of its VRAM, which is roughly the room a desktop session needs.
What longer context costs
Going from 4K to 32K adds about 6.12 GB, taking the total to 21.8 GB. Weights do not move with context — only the KV cache does, and it grows linearly, so this is the number to watch when planning for long documents. The model's native window is 32K; holding all of it at Q4_K_M would need about 22 GB.
Which build to download
This index tracks 2 formats for it — GGUF, AWQ — across 2 levels. Q4_K_M carries the lowest published perplexity loss at 3.0%. The fastest level measured here is AWQ INT4 at 72 tok/s on an RTX 4090, batch 1. GGUF runs on llama.cpp and Ollama across NVIDIA, AMD and Apple silicon; AWQ and GPTQ target vLLM on CUDA and ROCm; EXL2 is ExLlamaV2 and CUDA only.
Common questions
- How much VRAM does Codestral 22B need?
- About 15.0 GB at Q4_K_M with 4K of context and batch 1, rising to roughly 21.8 GB at 32K. That figure is weights plus KV cache plus a 10% activation buffer, calculated from the model's architecture rather than measured on a card.
- Will Codestral 22B run on a 20GB GPU?
- Yes — at Q4_K_M and 4K context it needs about 15.0 GB, which leaves 5.0 GB spare on a Radeon RX 7900 XT. That is the smallest card in this index that clears it comfortably; 31 of 63 do.
- Which quantization of Codestral 22B should I use?
- Q4_K_M has the lowest published quality loss (3.0%), and Q4_K_M is the level most people run. All 2 levels in the index are Q4_K_M, AWQ INT4.
Where this model fits
Sized at Q4_K_M with a 4K context window, smallest card first. Comfortable means the estimate uses at most 88% of the memory.
- Runs comfortably on
- Radeon RX 7900 XT20GB · +5.0RTX 409024GB · +9.0RTX 309024GB · +9.0Tesla P40 24G24GB · +9.0Mac M4 Pro 24G24GB · +3.0
- Tight but possible
- RTX 508016GBRTX 5070 Ti16GBRTX 5060 Ti 16G16GB
- Compared here
- GGUF vs AWQ
- Try it yourself
- Size it in the calculatorGenerate the run command
How to actually run this
Deployment guides for this model and this class of hardware.
This page's figures change when the model or the runtime does.Last updated 2026-09-21 RSS → /feed.xml