The maximum number of tokens to generate. Shorter token lengths will provide faster performance.
A decimal number that determines the degree of randomness in the response
An alternative to sampling with temperature, where the model considers the results of the tokens with top_p probability mass.
A system prompt sets the behavior and context for an AI assistant in a conversation, such as modifying its personality.
ResetGenerate
Output
Submit a prompt for a response.
Notes
Mistral Medium Model
Mistral AI's medium-sized model. Supports a context window of 32k tokens (around 24000 words) and is stronger than Mixtral 8x7B and Mistral-7b on benchmarks across the board.
Run Mistral Medium with an API
You can run the Mistral Medium Instruct Model using Clarifai’s Python SDK.
Check out the Code Below:
Export your PAT as an environment variable. Then, import and initialize the API Client.
export CLARIFAI_PAT={your personal access token}
from clarifai.client.model import Model
prompt ="What’s the future of AI?"inference_params =dict(temperature=0.7, max_tokens=200,top_p=0.95, system_prompt ="You are a helpful assistant.")# Model Predictmodel_prediction = Model("https://clarifai.com/mistralai/completion/models/mistral-medium").predict_by_bytes(prompt.encode(),"text")
You can also run Mistral Medium API using other Clarifai Client Libraries like Java, cURL, NodeJS, PHP, etc here.
The following tables gather results on a suite of commonly used benchmarks for each of the Mistal models. Check out model selection guide to explore further the performance, and speed, and discuss how to select the appropriate model for different use cases.
Here is a brief overview on the types of use cases we see along with their respective Mistral model:
• Simple tasks that one can do in bulk (Classification, Customer Support, or Text Generation) are powered by Mistral Small.
• Intermediate tasks that require moderate reasoning (Data extraction, Summarizing a Document, Writing emails, Writing a Job Description, or Writing Product Descriptions) are powered by Mistral Medium.
• Complex tasks that require large reasoning capabilities or are highly specialized (Synthetic Text Generation, Code Generation, RAG, or Agents) are powered by Mistral Large
ID
Model Type ID
Text To Text
Input Type
text
Output Type
text
Description
Mistral AI's medium-sized LLM. Supports a context window of 32k tokens and outperforms Mixtral 8x7B and Mistral-7b on almost all benchmarks.