Codestral 22B — VRAM, Speed & Local Setup

Written by Jakub Rusinowski · Last updated May 29, 2024

Model libraryCodestral → 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.

Specifications

Parameters22 Billion
Context window32,768
ArchitectureDense
ProviderMistral AI
LicenceMNPL (Non-Commercial)
Specified atQ4_K_M
System RAM24 GB
Record updated2024-05-29

Licence

MNPL-0.1research / non-commercial only. Research / non-commercial only — this licence does NOT permit shipping a commercial product.

VRAM and Speed by Quantization

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.

QuantWeightsVRAM neededEst. speedFit on 24 GB
Q2_K7.3 GB10.0 GB~76 tok/s (est.)Fits comfortably
Q3_K_M9.5 GB12.1 GB~62 tok/s (est.)Fits comfortably
Q4_K_M13.4 GB16.1 GB~47 tok/s (est.)Fits comfortably
Q5_K_M15.7 GB18.4 GB~41 tok/s (est.)Fits comfortably
Q6_K18.2 GB20.9 GB~36 tok/s (est.)Fits comfortably
Q8_023.6 GB26.3 GB~4 tok/s (est.)Offloads to system RAM (slow)
F1644.4 GB47.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.

Buy This HardwareAMD Radeon RX 9060 XT 16GB — 16 GB VRAM · 160 W board powerDeploy in the Cloud NowRTX 4090 on RunPod — from $0.34/hr · rate checked 2026-07

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.

Recommended GPU

The cheapest catalogued GPU that runs Codestral 22B is the AMD Radeon RX 9060 XT 16GB (16 GB).

Affiliate disclosure: Some links on this page are affiliate links — if you buy through them, LLM Configurator may earn a commission at no extra cost to you. As an Amazon Associate, LLM Configurator earns from qualifying purchases.
AMD Radeon RX 9060 XT 16GB
16 GB VRAM · 160 W board power
2026 prices are volatile — check the current listing.
Check price on Amazon

How to Run Codestral 22B

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.

Can I Run Codestral 22B on My GPU?

Codestral 22B — Frequently Asked Questions

How much VRAM does Codestral 22B need?
About 14 GB at Q4_K_M — quantized weights plus framework overhead, before any KV cache. The cache grows with context length and is added on top; the table above folds it in. Apple Silicon counts unified memory toward the same figure.
Does Codestral 22B run on an RTX 4090 (24 GB)?
Yes. Codestral 22B needs about 14 GB at Q4_K_M, inside a 24 GB card, at an estimated 47 tokens/sec.
How do I run Codestral 22B locally?
Install Ollama and run `ollama run codestral:22b`. That pulls the weights and starts a local OpenAI-compatible endpoint; after the download nothing leaves the machine.

← All Codestral models | VRAM calculator | Check your own hardware