Codestral is the first code generation model from Mistral AI, announced on May 29, 2024. It is a 22-billion-parameter open-weight model trained on more than 80 programming languages, including Python, Java, C, C++, JavaScript, Bash, Swift, and Fortran.
The model supports code completion, fill-in-the-middle infilling, and test generation, and it has a 32,000-token context window, larger than many comparably sized code models of its time. Mistral reported strong results on Python benchmarks such as HumanEval, MBPP, and CruxEval, on the Spider benchmark for SQL, and competitive performance across additional languages including C++, Bash, Java, PHP, TypeScript, and C#, as well as strong long-range, repository-level completion scores on RepoBench.
Codestral extended the trend of broad-language, infilling-capable code models into the European open-model ecosystem. For businesses, a single model covering dozens of languages with both completion and infilling reduces the need to juggle multiple specialized tools, and the open weights make private deployment feasible.