Mistral, a French AI startup backed by Microsoft, has launched its first generative AI model for coding called Codestral. This model is designed to assist developers in writing and interacting with code across more than 80 programming languages, including Python, Java, C++, and JavaScript.
Key Features and Capabilities
Broad Language Support:
- Codestral supports over 80 programming languages, including popular ones like Python, Java, C, C++, JavaScript, and Bash, as well as specific ones like Swift and Fortran.
Functionality:
- Codestral can complete coding functions, write tests, and fill in partial code using a fill-in-the-middle mechanism.
- It can answer questions about a codebase in English, making it versatile for various development tasks.
Performance
High Performance:
- Codestral is a 22B model that sets a new standard in performance and latency for code generation.
- It has a larger context window of 32k, outperforming other models in long-range code generation evaluations like RepoBench.
Benchmarks:
- For Python, Codestral was evaluated using HumanEval pass@1, MBPP sanitized pass@1, CruxEval, and RepoBench EM.
- For SQL, the Spider benchmark was used.
- Additional evaluations were conducted across six languages: C++, Bash, Java, PHP, Typescript, and C#.
- Fill-in-the-middle performance was assessed using HumanEval pass@1 in Python, JavaScript, and Java, compared to DeepSeek Coder 33B.
Access and Integration
Availability:
- Codestral is available for download on HuggingFace under the Mistral AI Non-Production License for research and testing purposes.
- It can be accessed via a dedicated endpoint (codestral.mistral.ai) for free during an 8-week beta period, managed at the personal level without organization rate limits.
- It is also available on the usual API endpoint (api.mistral.ai) for research, batch queries, or third-party application development.
Integration:
- Codestral is integrated into popular tools like LlamaIndex and LangChain for building agentic applications.
- It is also available in VSCode and JetBrains environments through Continue.dev and Tabnine plugins, enabling code generation, interactive conversation, and inline editing.
Community and Feedback
Developer Community:
- Codestral has been well-received by the developer community, with feedback highlighting its speed and quality as a significant advancement in code generation tools.
Interactive Interface:
- An instructed version of Codestral is accessible through Le Chat, a free conversational interface, allowing developers to interact with Codestral naturally.
For detailed setup instructions and examples on various integrations, developers can refer to the provided documentation.