3 min Devops

Mistral unveils AI model Codestral, fluent in 80 programming languages

Mistral unveils AI model Codestral, fluent in 80 programming languages

With the new Codestral, Mistral aims to assist developers in the best possible way. The new model’s usability is potentially enormous, as it supports 80 programming languages and appears on the scene as a (semi-)open-source LLM.

There’s a few familiar faces among the 80 supported languages, including Python, Java, C, C++, JavaScript and Bash. However, Mistral is quick to assert that Codestral also performs well with Swift and the age-old Fortran.

The use case for Mistral is similar to other “codepilots,” such as features within GitHub Copilot. Specifically, the French company mentions completing functions, writing tests, and finishing partial code. This is not only an autocomplete but also a “fill-in-the-middle” mechanism.

Best AI help for programmers

Codestral is one of many when it comes to offering AI assistants focused on code. Even ChatGPT and Gemini can somewhat handle the subject matter, although other solutions are more accurate. Codestral, which uses 22 billion parameters, has competition mainly from CodeLlama 70B, DeepSeek Coder 33B and Llama 3 70B. In several benchmarks, Codestral towers high above these alternatives, with especially impressive performance across multiple languages. Others may only excel in languages that were the most well-represented in the training data, such as Python or C.

The key to Codestral’s success seems to be the large context window of 32,000, or the amount of tokens the model can effectively remember for further AI processing. 32k is significantly larger than what CodeLlama (4k), DeepSeek Coder (16k) and Llama 3 (8k) can handle. Like Google, Mistral has found that increasing this context window significantly improves accuracy. A similar move was previously made by Anthropic with Claude 3 for general-purpose models.

Continue reading: ‘Claude 3 is better than GPT-4 and Gemini’: OpenAI has more and more competitors

Open-source though?

Codestral is available to download for free through HuggingFace. However, there is a catch, as the model may only be used for research and testing purposes under the Mistral AI Non-Production License. Codestral thus isn’t truly free and open-source (FOSS).

In addition to HuggingFace, users can choose to access Codestral via Le Chat, a free chat interface. A dedicated endpoint (codestral.mistral.ai) is also available and best suits users looking to deploy the model’s Instruct or Fill-in-the-Middle functionalities within an integrated development environment (IDE). The free beta period for this method lasts 8 weeks and currently sits behind a waiting list.

Also read: Mistral AI seeks $600 million to realize AI ambitions