Codestral — local AI model by Mistral AI

Written by Jakub Rusinowski · Last updated

Superseded model. Codestral has been superseded by Devstral. This page is kept for reference; the newer family is a better starting point. View Devstral →

Mistral's dedicated code generation model, trained on a massive programming corpus covering 80+ programming languages. Excels at fill-in-the-middle (FIM) completion — the key technique powering IDE autocomplete. Integrates natively with VS Code via continue.dev and Cursor.

Variants

The smallest Codestral variant needs about 14 GB of VRAM at Q4_K_M — quantized weights plus framework overhead, before any KV cache.

ModelVRAM
Codestral 22B →
22B
~14.2 GB

Memory is quantized weights plus overhead at Q4_K_M, from the same engine as the GPU & VRAM checker.

How to run Codestral locally

Install Ollama, then pull the tag.

ollama run codestral:22b

Pick a size above for its own VRAM figure, speed estimate and install command.

Licence

MNPL-0.1Research / non-commercial only

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

Applies to: Codestral 22B

Recommended GPU

The cheapest catalogued GPU that runs Codestral locally (min 14 GB VRAM) 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.

Can I run Codestral on my GPU?

Codestral — frequently asked questions

How much VRAM does Codestral need?

Codestral needs about 14 GB VRAM at Q4_K_M quantization for its smallest variant. Variants: Codestral 22B (14 GB, Q4_K_M). On Apple Silicon, unified memory counts toward this requirement.

Can I run Codestral on an RTX 4090 (24 GB)?

Yes — Codestral runs on an RTX 4090 (24 GB) and other 24 GB cards such as the RTX 3090. Smaller variants also fit comfortably on 8–16 GB GPUs at Q4_K_M.

What quantization should I use for Codestral?

Q4_K_M is the best balance of quality and VRAM for Codestral in most cases. Choose Q8_0 for near-lossless quality if you have spare VRAM, or smaller quants (Q3/Q2) only when memory is tight.

How do I run Codestral with Ollama?

Install Ollama, then run: ollama run codestral:22b. This downloads Codestral and starts a local, OpenAI-compatible endpoint — no internet connection is needed after the initial download.