top of page
  • Koosmik

Codestral: Mistral AI unveils premium code model

Updated: Jun 3

A futuristic AI lab with the Mistral AI logo prominently displayed. The lab features computer terminals with complex code and holographic displays showing various programming languages like Python, Java, C++, Swift, and Fortran. Researchers are seen interacting with the AI, testing, and analyzing code. A screen shows secure password generator code in C++. The atmosphere is high-tech and innovative, highlighting research and non-commercial use. The design is sleek and modern, reflecting advanced technology and the state-of-the-art nature of the Codestral model.

Mistral AI, a French competitor to OpenAI, released its code generation model, Codestral, on Wednesday, May 29, exclusively for research and testing purposes.

After impacting the general LLM market, Mistral now focuses on specialized code generation models. Codestral is their first open model for code generation, praised as state-of-the-art in benchmarks. It comes with a new "non-production" license that restricts use to testing and research only.

Outstanding Python model

Trained on over 80 programming languages, including Python, Java, C, and C++, Codestral also handles rare languages like Swift and Fortran. Despite having only 22 billion parameters, it outperforms CodeLlama's 70 billion parameters. With a HumanEval score of 91.6%, it excels in querying code in natural language. In benchmarks, Codestral 22B shows an average accuracy of 61.5% across all languages, with 81.1% accuracy in Python. It leads in most languages, although DeepSeek Coder 33B and Llama 3 70B are close competitors in certain languages.

With a 32,000-token context, Codestral is ideal for analyzing small code portions.

Robust and simple code generation

Testing via Mistral AI's "Le Chat" interface, Codestral generated a secure random password generator in C++ with low latency and robust, simple code. While it doesn't add comments by default, it can be instructed to do so in the prompt.

New usage license

Alongside Codestral's release, Mistral AI introduces the Mistral AI non-production license (MNPL), allowing models to be used for non-commercial research and testing only. This move aims to ensure the company's viability and growth amid concerns about openness being exploited by dominant AI industry players. Despite this, Mistral AI will continue to release models under the Apache 2.0 license.

Codestral is accessible via the Mistral API (The Platform) and the public interface (Le Chat). It's also available on Hugging Face, integrated into LlamaIndex and LangChain, and accessible through and Tabnine extensions for VSCode and JetBrains IDEs. Source: JDN


bottom of page