Written by Jakub Rusinowski · Last updated May 29, 2024
Model library → Codestral → Codestral 22B
The best local model for IDE integration. Trained on 80+ programming languages with Fill-In-Middle support for autocomplete. Use with continue.dev or Cursor for production-grade code assistance. Fits in 16GB VRAM.
Codestral 22B needs about 14 GB of VRAM at Q4_K_M — quantized weights plus framework overhead, before any KV cache. On Apple Silicon that figure comes out of unified memory.
| Parameters | 22 Billion |
| Context window | 32,768 |
| Architecture | Dense |
| Provider | Mistral AI |
| Licence | MNPL (Non-Commercial) |
| Specified at | Q4_K_M |
| System RAM | 24 GB |
| Record updated | 2024-05-29 |
MNPL-0.1 — research / non-commercial only. Research / non-commercial only — this licence does NOT permit shipping a commercial product.
Modelled on a reference NVIDIA RTX 4090 (24 GB), at 8K context. Speed figures are ESTIMATES from the memory-bandwidth roofline described on the methodology page, not benchmarks we ran — rows marked measured come from published or reader-submitted runs. VRAM here includes the KV cache, so it reads higher than the headline figure above, which does not.
| Quant | Weights | VRAM needed | Est. speed | Fit on 24 GB |
|---|---|---|---|---|
| Q2_K | 7.3 GB | 10.0 GB | ~76 tok/s (est.) | Fits comfortably |
| Q3_K_M | 9.5 GB | 12.1 GB | ~62 tok/s (est.) | Fits comfortably |
| Q4_K_M | 13.4 GB | 16.1 GB | ~47 tok/s (est.) | Fits comfortably |
| Q5_K_M | 15.7 GB | 18.4 GB | ~41 tok/s (est.) | Fits comfortably |
| Q6_K | 18.2 GB | 20.9 GB | ~36 tok/s (est.) | Fits comfortably |
| Q8_0 | 23.6 GB | 26.3 GB | ~4 tok/s (est.) | Offloads to system RAM (slow) |
| F16 | 44.4 GB | 47.1 GB | ~2 tok/s (est.) | Offloads to system RAM (slow) |
Want the memory numbers alone, at every quantization level and your own context length? Use the Codestral 22B VRAM calculator.
or compare on Vast.ai from $0.35/hr (typical low · varies)
As an Amazon Associate we earn from qualifying purchases. Cloud GPU links are referral links — we may earn a commission at no extra cost to you.
The cheapest catalogued GPU that runs Codestral 22B is the AMD Radeon RX 9060 XT 16GB (16 GB).
Install Ollama, then run:
ollama run codestral:22b
Weights on Hugging Face: mistralai/Codestral-22B-v0.1.
Best for: coding agent, ide plugin, code completion, dev work.
← All Codestral models | VRAM calculator | Check your own hardware