Mistral Nemo
Mistral Nemo is a cutting-edge Language Model (LLM) boasting state-of-the-art reasoning, world knowledge, and coding capabilities within its size category.Learn more in Mistral’s documentation.
Mistral AI has multiple models and capabilities. View the other model options:
Model name | Description |
---|---|
Mistral Large (2407) | Complex tasks requiring advanced reasoning abilities or a high level of specialization (e.g. creative writing, agentic workflows, code generation) |
Mistral Nemo | Streamlined tasks that one can do in bulk (e.g. classification, customer support, text generation) |
Codestral | Code-specific tasks to enhance developer productivity (e.g. autocompletion, automated code review, test suite generation) |
Enable the Vertex AI API.
Authenticate with one of the standard mechanisms documented here.
For all code samples, you will need to set the environment variables GOOGLE_REGION and GOOGLE_PROJECT_ID respectively to the target region and project ids to use. You can find the supported regions here.
You can send a POST request to the specified API endpoint to get a response from the Mistral model. Find here, Mistral's API documentation and more info on parameter settings such as temperature, top_p, max_tokens, etc.
Please be aware that safe_prompt
is the only parameter from Mistral API not supported for now. This will be supported soon. You will be able to set safe_prompt:true
to enable the optional system prompt in order to enforce guardrails on top of Mistral models for chat completion.
You will need to install the httpx and the google-auth packages in your virtual environment. You will also need to set the GOOGLE_REGION and GOOGLE_PROJECT_ID environment variables respectively to the target region and project ids to use. You can find the supported regions here.
Sample Input (POST request payload)
Sample Output
Mistral Nemo Base version (pre-trained)
Context Window | HellaSwag (0-shot) | Winogrande (0-shot) | NaturalQ (5-shot) | TriviaQA (5-shot) | MMLU (5-shot) | OpenBookQA (0-shot) | CommonSense QA (0-shot) | TruthfulQA (0-shot) | |
---|---|---|---|---|---|---|---|---|---|
Mistral Nemo 12B | 128k | 83.5% | 76.8% | 31.2% | 73.8% | 68.0% | 60.6% | 70.4% | 50.3% |
Gemma 2 9B | 8k | 80.1% | 74.0% | 29.8% | 71.3% | 71.5% | 50.8% | 60.8% | 46.6% |
Llama 3 8B | 8k | 80.6% | 73.5% | 28.2% | 61.0% | 62.3% | 56.4 | 66.7% | 43.0% |
Mistral Nemo Instruct version
MT Bench | WildBench | |
---|---|---|
Mistral 7B | 6.48 | 25.55 |
Llama 3 8B | 6.85 | 28.77 |
Mistral Nemo | 7.84 | 42.57 |
Tokenization
Tokenization is a fundamental step in LLMs. It is the process of breaking down text into smaller subword units, known as tokens. Mistral AI recently open-sourced their tokenizer. This guide will walk you through the fundamentals of tokenization, details about the open-source tokenizers, and how to use the tokenizers in Python.
Use cases
Resource ID | Release date | Release stage | Description |
---|---|---|---|
mistral-nemo@2407 | 2024-07-24 | General Availability |
Mistral Nemo Model Card
Mistral’s documentation: Visit Mistral's documentation for a wealth of resources on model capabilities, prompting techniques, use case guidelines, and more.
Mistral Code Cookbook repository: Check out example code for a variety of tasks.
Mistral blog post: https://mistral.ai/news/mistral-nemo/
Google Cloud Console has failed to load JavaScript sources from www.gstatic.com.
Possible reasons are: