Skip to content

Codestral 22B

by Mistral AI · mistral family

22B

parameters

text-generation code-generation

Codestral 22B is Mistral AI's dedicated code generation model, trained on over 80 programming languages. It excels at code completion, generation, and explanation tasks, with particular strength in Python, JavaScript, TypeScript, Java, C++, and many other languages. This model is optimized for developer workflows including fill-in-the-middle completion, test generation, and code documentation. It offers significantly better coding performance than general-purpose models of similar size.

Quick Start with Ollama

ollama run 22b-v0.1-q4_K_M
Resources Ollama Hugging Face Official Page
Creator Mistral AI
Parameters 22B
Architecture transformer-decoder
Context 32K tokens
Released May 29, 2024
License Mistral AI Non-Production License
Ollama codestral

Quantization Options

Format File Size VRAM Required Quality Ollama Tag
Q4_K_M rec 11.2 GB 14.7 GB 22b-v0.1-q4_K_M
Q5_K_M 13 GB 16.9 GB 22b-v0.1-q5_K_M
Q8_0 19.8 GB 24 GB 22b-v0.1-q8_0

Compatible Hardware

Q4_K_M requires 14.7 GB VRAM

Compatible Hardware

HardwareVRAMTypeFitEst. Speed
Mac Studio M4 Ultra 512GB512 GBmacRuns~56 tok/s
Mac Pro M2 Ultra 192GB192 GBmacRuns~54 tok/s
Mac Studio M4 Ultra 192GB192 GBmacRuns~56 tok/s
Mac Studio M4 Max 128GB128 GBmacRuns~37 tok/s
MacBook Pro M4 Max 128GB128 GBmacRuns~37 tok/s
MacBook Pro M5 Max 128GB128 GBmacRuns~37 tok/s
NVIDIA RTX PRO 6000 Blackwell96 GBgpuRuns~131 tok/s
MacBook Pro M3 Max 96GB96 GBmacRuns~27 tok/s
Mac mini M4 Pro 64GB64 GBmacRuns~19 tok/s
Mac Studio M4 Max 64GB64 GBmacRuns~37 tok/s
MacBook Pro M4 Max 64GB64 GBmacRuns~37 tok/s
MacBook Pro M5 Max 64GB64 GBmacRuns~37 tok/s
NVIDIA RTX 6000 Ada Generation48 GBgpuRuns~65 tok/s
NVIDIA RTX A600048 GBgpuRuns~52 tok/s
NVIDIA RTX PRO 5000 Blackwell48 GBgpuRuns~65 tok/s
Mac mini M4 Pro 48GB48 GBmacRuns~19 tok/s
MacBook Pro M3 Max 48GB48 GBmacRuns~27 tok/s
MacBook Pro M4 Pro 48GB48 GBmacRuns~19 tok/s
MacBook Pro M4 Max 48GB48 GBmacRuns~37 tok/s
MacBook Pro M5 Max 48GB48 GBmacRuns~28 tok/s
MacBook Pro M5 Pro 48GB48 GBmacRuns~19 tok/s
Mac Studio M4 Max 36GB36 GBmacRuns~37 tok/s
MacBook Pro M3 Pro 36GB36 GBmacRuns~10 tok/s
MacBook Pro M5 Max 36GB36 GBmacRuns~28 tok/s
NVIDIA RTX 5000 Ada Generation32 GBgpuRuns~49 tok/s
NVIDIA GeForce RTX 509032 GBgpuRuns~122 tok/s
iMac M4 32GB32 GBmacRuns~8 tok/s
Mac mini M4 32GB32 GBmacRuns~8 tok/s
MacBook Air M4 32GB32 GBmacRuns~8 tok/s
MacBook Air M5 32GB32 GBmacRuns~8 tok/s
MacBook Pro M5 32GB32 GBmacRuns~8 tok/s
AMD Radeon RX 7900 XTX24 GBgpuRuns~65 tok/s
NVIDIA GeForce RTX 3090 Ti24 GBgpuRuns~69 tok/s
NVIDIA GeForce RTX 309024 GBgpuRuns~64 tok/s
NVIDIA GeForce RTX 409024 GBgpuRuns~69 tok/s
NVIDIA RTX A500024 GBgpuRuns~52 tok/s
iMac M3 24GB24 GBmacRuns~7 tok/s
Mac mini M2 24GB24 GBmacRuns~7 tok/s
Mac mini M4 Pro 24GB24 GBmacRuns~19 tok/s
MacBook Air M2 24GB24 GBmacRuns~7 tok/s
MacBook Air M4 24GB24 GBmacRuns~8 tok/s
MacBook Air M5 24GB24 GBmacRuns~8 tok/s
MacBook Pro M4 Pro 24GB24 GBmacRuns~19 tok/s
MacBook Pro M5 24GB24 GBmacRuns~8 tok/s
MacBook Pro M5 Pro 24GB24 GBmacRuns~19 tok/s
AMD Radeon RX 7900 XT20 GBgpuRuns~54 tok/s
NVIDIA RTX 4000 Ada Generation20 GBgpuRuns~24 tok/s
MacBook Pro M3 Pro 18GB18 GBmacRuns~10 tok/s
AMD Radeon RX 6800 XT16 GBgpuRuns (tight)~35 tok/s
AMD Radeon RX 6900 XT16 GBgpuRuns (tight)~35 tok/s
AMD Radeon RX 7800 XT16 GBgpuRuns (tight)~42 tok/s
AMD Radeon RX 9060 XT 16GB16 GBgpuRuns (tight)~37 tok/s
AMD Radeon RX 9070 XT16 GBgpuRuns (tight)~44 tok/s
AMD Radeon RX 907016 GBgpuRuns (tight)~37 tok/s
Intel Arc A77016 GBgpuRuns (tight)~38 tok/s
NVIDIA GeForce RTX 4060 Ti 16GB16 GBgpuRuns (tight)~20 tok/s
NVIDIA GeForce RTX 4070 Ti Super16 GBgpuRuns (tight)~46 tok/s
NVIDIA GeForce RTX 4080 Super16 GBgpuRuns (tight)~50 tok/s
NVIDIA GeForce RTX 408016 GBgpuRuns (tight)~49 tok/s
NVIDIA GeForce RTX 5060 Ti 16GB16 GBgpuRuns (tight)~30 tok/s
NVIDIA GeForce RTX 5070 Ti16 GBgpuRuns (tight)~61 tok/s
NVIDIA GeForce RTX 508016 GBgpuRuns (tight)~65 tok/s
NVIDIA RTX A400016 GBgpuRuns (tight)~30 tok/s
iMac M1 16GB16 GBmacRuns (tight)~5 tok/s
iMac M4 16GB16 GBmacRuns (tight)~8 tok/s
Mac mini M1 16GB16 GBmacRuns (tight)~5 tok/s
Mac mini M4 16GB16 GBmacRuns (tight)~8 tok/s
MacBook Air M2 16GB16 GBmacRuns (tight)~7 tok/s
MacBook Air M3 16GB16 GBmacRuns (tight)~7 tok/s
MacBook Air M4 16GB16 GBmacRuns (tight)~8 tok/s
MacBook Air M5 16GB16 GBmacRuns (tight)~8 tok/s
MacBook Pro M1 16GB16 GBmacRuns (tight)~5 tok/s
MacBook Pro M2 Pro 16GB16 GBmacRuns (tight)~14 tok/s
MacBook Pro M5 16GB16 GBmacRuns (tight)~8 tok/s
AMD Radeon RX 6700 XT12 GBgpuCPU Offload~8 tok/s
AMD Radeon RX 7700 XT12 GBgpuCPU Offload~9 tok/s
Intel Arc B58012 GBgpuCPU Offload~9 tok/s
NVIDIA GeForce RTX 3060 12GB12 GBgpuCPU Offload~7 tok/s
NVIDIA GeForce RTX 3080 12GB12 GBgpuCPU Offload~19 tok/s
NVIDIA GeForce RTX 4070 Super12 GBgpuCPU Offload~10 tok/s
NVIDIA GeForce RTX 4070 Ti12 GBgpuCPU Offload~10 tok/s
NVIDIA GeForce RTX 407012 GBgpuCPU Offload~10 tok/s
NVIDIA GeForce RTX 507012 GBgpuCPU Offload~14 tok/s
NVIDIA GeForce GTX 1080 Ti11 GBgpuCPU Offload~10 tok/s
NVIDIA GeForce RTX 2080 Ti11 GBgpuCPU Offload~13 tok/s
Intel Arc B57010 GBgpuCPU Offload~8 tok/s
NVIDIA GeForce RTX 3080 10GB10 GBgpuCPU Offload~16 tok/s
20 hardware device(s) cannot run this model at Q4_K_M.

Benchmark Scores

60.0
mmlu