Robots Atlas>ROBOTS ATLAS
Codestral

Codestral

Codestral 22B (Codestral-22B-v0.1) · Family: Mistral
Mistral AI code generation model (22B): code completion and fill-in-the-middle, 80+ programming languages, 32K context, open weights (MNPL license).
✓ Active✓ Public access⚖ Open weightsLLM📁 Mistral
Context window
32K
tokens
Parameters
22B
parameters
Release date
29 May 2024
Access:DownloadAPIHostedDeployment:💻 Local☁ Cloud

Overview

Codestral is a Mistral AI language model specialized in code generation, released on 29 May 2024. It has 22 billion parameters and is designed for programming tasks, including code completion and the fill-in-the-middle (FIM) technique, which completes a missing fragment using context both before and after the insertion point.

The model was trained on more than 80 programming languages — from popular ones (Python, Java, C, C++, JavaScript, Bash) to more niche ones (Swift, Fortran). It supports a 32K-token context window, which helps with repository-level work (including long-range code completion).

Codestral is an open-weights model released under the Mistral AI Non-Production License (MNPL) — for research and testing, with a separate commercial license available on request. Weights can be downloaded from Hugging Face and the model can be run locally (e.g. via vLLM) or used through the dedicated codestral.mistral.ai endpoint and the Mistral API (la Plateforme).

The model integrates with developer tooling: IDE plugins (Continue.dev, Tabnine for VS Code and JetBrains) and application frameworks (LlamaIndex, LangChain). Codestral is positioned as a model for efficient developer assistance.

Classification
LLM
Family: Mistral
Access & deployment
DownloadAPIHosted
LocalCloud
Weights: Open weights
Key parameters
📏 Context: 32K
🧩 Parameters: 22B
✓ Fine-tuning
📥 Input: text

Technical specification

Context window
32K
tokens
Parameters
22B
parameters
License
Mistral AI Non-Production License (MNPL)
Hardware requirements
An open-weights model (MNPL license) downloadable from Hugging Face; local inference (e.g. vLLM) requires a large-VRAM GPU for its 22B parameters. Also available via the codestral.mistral.ai endpoint and the Mistral API (la Plateforme).
Features:Fine-tuning
Modalities
⬇ Input
text
⬆ Output
textcode

Capabilities and applications

Native model capabilities
Coding
Generating, analysing and modifying code in many programming languages. Covers writing functions, debugging, refactoring, code review, and creating tests. Measured by benchmarks such as HumanEval and SWE-bench.
Category: coding
Code completion
The model's ability to predict and complete code as it is written — from single lines to whole blocks and functions.
Category: coding
Fill-in-the-middle (FIM)
The model's ability to generate a missing code fragment using context both before and after the insertion point (fill-in-the-middle).
Category: coding
Language modeling
Ability to predict subsequent tokens and generate coherent natural-language text based on the preceding context.
Category: language
Long context
Support for large context windows — tens to hundreds of thousands (or millions) of input tokens. Enables analysis of entire codebases, long documents, and many parallel conversations without losing earlier information. GPT-5.1 supports 400,000 tokens.
Category: language
Multilingual
Competence in many natural languages (from a few to over a hundred): understanding, generation, translation, and code-switching within a single conversation. Frontier models support a wide range of languages with comparable quality.
Category: language
Instruction following
Precisely following instructions contained in the prompt: response format, length, style, constraints (e.g. 'reply in six words'). GPT-5.1 significantly improved this capability compared to GPT-5.
Category: language
Reasoning
The model's ability to reason logically and solve complex problems.
Category: reasoning

Technical architecture

Core Architecture
Training Techniques