Press "Enter" to skip to content

Mistral Gets Into the Code-generation Game

Key takeaways:

  • Mistral AI has introduced its first code-generation model, Codestral, which is open source.
  • It is a 22 billion-parameter model with a 32k token context window. Mistral said this is larger than those of its competitors.
  • The license for Codestral is available for research and other non-commercial uses. However, Mistral said it can grant commercial licenses on a case-by-case basis.

French startup Mistral AI has unveiled Codestral, its first code-generation model, as it joins the growing marketplace for text-to-code generators.

Mistral, the maker of the popular open-source LLM with the same name, said Codestral can write in more than 80 programming languages including Python, Java, C, C++, JavaScript, Bash, Swift, and Fortran. It is also proficient in English.

The 22 billion-parameter model can complete coding functions, write tests, and fill in partial code snippets through a fill-in-the-middle mechanism.

Notably, Codestral has a longer context window of 32k tokens compared to 4k, 8k, or 16k for its competitors, according to Mistral. For example, GitHub Copilot has an 8k context window. (A context window is the maximum amount of text that a model can accept for every prompt. A hundred tokens is roughly equivalent to 75 words.)

Mistral said Codestral outperforms other models in RepoBench, which measures performance in complex, multi-file programming scenarios, according to its creators.

Codestral, which is open source, can be downloaded through Hugging Face. As an open-weight LLM, its model weights are made freely available. Codestral is covered under Mistral’s new Mistral AI Non-Production License (MNPL) for non-commercial and research purposes only. The startup also offers commercial licenses on a case-by-case basis.

Codestral is available on a new, dedicated endpoint: codestral.mistral.ai. It is free during the 8-week beta period for developers joining a waitlist. Mistral said the API Key for this endpoint is managed at the personal level, not organizational level. However, Codestral is immediately available on the primary endpoint, api.mistral.ai, where users are billed per token.

Mistral is adding an AI chatbot interface – its previously announced ‘Le Chat’ – to Codestral so developers can interact using natural language.

Codestral is integrated into prominent tools for developer productivity and AI application-making, such as LlamaIndex and LangChain, enabling the creation of agentic applications. Additionally, developers can use Codestral within VSCode and JetBrains environments, thanks to partnerships with Continue.dev and Tabnine.

Author