LLMs ·

Codestral 22B

Parameters
22B
Architecture
Dense
Max context
32K tokens
License
mnpl
Released
2024-05

How to run it

Quickest · Ollama

One command downloads a ready-to-run version and starts a chat.

ollama run codestral:22b

Get Ollama at ollama.com/download (opens in a new tab) · model page (opens in a new tab)

Quantized files · GGUF

Works in LM Studio, llama.cpp, Jan and Ollama. No sign-in needed.

huggingface.co/lmstudio-community/Codestral-22B-v0.1-GGUF (opens in a new tab)

ollama run hf.co/lmstudio-community/Codestral-22B-v0.1-GGUF

Original weights · Hugging Face

Full-precision files from Mistral AI, for fine-tuning, vLLM, Transformers.

huggingface.co/mistralai/Codestral-22B-v0.1 (opens in a new tab)

No sign-in needed.

Official repo · GitHub

Reference code, inference scripts and docs from Mistral AI. The weights themselves download from Hugging Face.

github.com/mistralai/mistral-inference (opens in a new tab)

git clone https://github.com/mistralai/mistral-inference

Mistral AI’s official inference code.

Memory needed

Weights plus KV cache and runtime overhead. Leave a little extra free for the operating system and other apps.

Quantization Quality Weights Total at 8K context Total at 32K context Download
Q2_K Low 8.9 GB 11.4 GB 17.0 GB GGUF (opens in a new tab)
Q3_K_M Low 10.9 GB 13.4 GB 19.0 GB GGUF (opens in a new tab)
Q4_K_M Good 13.6 GB 16.1 GB 21.7 GB GGUF (opens in a new tab)
Q5_K_M High 15.8 GB 18.3 GB 23.9 GB GGUF (opens in a new tab)
Q6_K High 18.2 GB 20.7 GB 26.4 GB GGUF (opens in a new tab)
Q8_0 Very high 23.6 GB 26.1 GB 31.7 GB GGUF (opens in a new tab)
F16 Full 44.5 GB 47.0 GB 52.6 GB Original weights (opens in a new tab)

Best hardware for Codestral 22B

The least expensive GPU in our catalog that runs it without offloading is the Intel Arc B580 (launch price $249) at Q2_K.

Grade · points Hardware Quant Memory Speed Fit
82 ptsGreat (A) · 82 of 100 points: Model quality 27.6/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 5090 Q6_K 22.3 GB / 32.0 GB 68.6 tok/s Runs well
82 ptsGreat (A) · 82 of 100 points: Model quality 27.1/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 3090 Q5_K_M 19.5 GB / 24.0 GB 42.7 tok/s Runs well
82 ptsGreat (A) · 82 of 100 points: Model quality 27.1/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 4090 Q5_K_M 19.5 GB / 24.0 GB 45.9 tok/s Runs well
81 ptsGreat (A) · 81 of 100 points: Model quality 27.1/45, Memory fit 25.0/25, Speed 14.6/15, Memory use 15.0/15 AMD Radeon RX 7900 XTX Q5_K_M 19.5 GB / 24.0 GB 37.7 tok/s Runs well
77 ptsGreat (A) · 77 of 100 points: Model quality 23.4/45, Memory fit 24.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 4070 Ti SUPER Q3_K_M 14.2 GB / 16.0 GB 47.9 tok/s Tight fit
77 ptsGreat (A) · 77 of 100 points: Model quality 23.4/45, Memory fit 24.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 4080 SUPER Q3_K_M 14.2 GB / 16.0 GB 52.5 tok/s Tight fit
77 ptsGreat (A) · 77 of 100 points: Model quality 23.4/45, Memory fit 24.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 5070 Ti Q3_K_M 14.2 GB / 16.0 GB 63.9 tok/s Tight fit
77 ptsGreat (A) · 77 of 100 points: Model quality 23.4/45, Memory fit 24.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 5080 Q3_K_M 14.2 GB / 16.0 GB 68.5 tok/s Tight fit
77 ptsGreat (A) · 77 of 100 points: Model quality 23.4/45, Memory fit 24.0/25, Speed 14.9/15, Memory use 15.0/15 AMD Radeon RX 9070 XT Q3_K_M 14.2 GB / 16.0 GB 39.3 tok/s Tight fit
75 ptsGreat (A) · 75 of 100 points: Model quality 23.4/45, Memory fit 24.0/25, Speed 13.4/15, Memory use 15.0/15 NVIDIA GeForce RTX 5060 Ti 16GB Q3_K_M 14.2 GB / 16.0 GB 32.0 tok/s Tight fit

Check it on your own hardware

Estimates come from published hardware specs and our open formulas, not from running the model on your machine. Real speed varies with runtime, drivers and settings. Numbers marked “Measured” come from a linked benchmark.