Run Mistral Large 4: 1T MoE with Reasoning Effort and JSON Schemas
Mistral Large 4 is a 1T-parameter multimodal MoE with 1M context. Serve it with vLLM, set reasoning effort, and enforce strict JSON schemas.
The code in this post comes from the model's docs and hasn't been run in our CI yet. If something breaks, let us know.
Mistral Large 4 is Mistral’s largest model so far: a natively multimodal Mixture-of-Experts model with about 1 trillion total parameters and 49 billion active per token (52 billion including embeddings and output layers). The card says it was trained from scratch on 3,800 NVIDIA Grace Blackwell GPUs in Mistral’s own datacenters in Europe. It folds instruction following, reasoning, coding and agentic work into one set of weights, and you choose how much it reasons per request.
Key specs
| Item | From the model card |
|---|---|
| Parameters | ~1T total, ~52B active (49B active excluding embeddings and output layers) |
| Experts | 128 routed experts, 4 active per token, plus 1 shared expert |
| Context | 1M tokens |
| Input / output | Text and image in, text out |
| Reasoning effort | low, medium, high (default high) |
| Languages | Card lists 160+ languages, including every official EU language |
| Agentic features | Native function calling, JSON output, strict JSON schema enforcement |
| License | Mistral Ecosystem Open-Weight License |
The card also lists a separate NVFP4 checkpoint (mistralai/Mistral-Large-4-1T-A52B-NVFP4) that targets Blackwell GPUs and supports vLLM and SGLang. This post covers the main checkpoint.
Recommended settings
The card recommends temperature=1.0 and top_p=0.95 for all reasoning efforts. For the effort level:
highfor complex prompts and agentic usemediumfor day-to-day uselowfor fast chat replies
It also advises a clear system prompt that describes the environment and use case, and keeping the tool set small.
Serve it with vLLM
The card recommends vLLM and gives an official Docker image.
docker pull vllm/vllm-openai:mistral-large-4docker run --runtime nvidia --gpus all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -p 8000:8000 \ --ipc=host \ vllm/vllm-openai:mistral-large-4 \ --model mistralai/Mistral-Large-4-1T-A52B \ --tensor-parallel-size 8 \ --tool-call-parser mistral \ --reasoning-parser mistral \ --enable-auto-tool-choice \ --gpu-memory-utilization 0.85The two parsers matter: per the card, --tool-call-parser mistral and --reasoning-parser mistral are required for tool use and for separating reasoning from the answer. If you run short of GPU memory, the card suggests lowering --max-model-len and/or --max-num-seqs.
Call it with a reasoning effort
The server speaks the OpenAI-compatible API. Note that max_completion_tokens counts reasoning tokens as well as visible output.
from openai import OpenAI
client = OpenAI(api_key="EMPTY", base_url="http://localhost:8000/v1")model = client.models.list().data[0].id
response = client.chat.completions.create( model=model, messages=[ { "role": "user", "content": "Write me a sentence where every word starts with the next letter in the alphabet - start with 'a' and end with 'z'.", } ], reasoning_effort="low", # Increase with 'medium' or 'high'. temperature=1.0, top_p=0.95, max_completion_tokens=4096,)
print("REASONING")print(response.choices[0].message.reasoning)print("CONTENT")print(response.choices[0].message.content)Enforce a strict JSON schema
The card says the model enforces response formats natively, including strict JSON schemas.
from openai import OpenAI
client = OpenAI(api_key="EMPTY", base_url="http://localhost:8000/v1")model = client.models.list().data[0].id
response = client.chat.completions.create( model=model, messages=[{"role": "user", "content": "What is 1 + 1? Answer as JSON."}], reasoning_effort="medium", temperature=1.0, top_p=0.95, response_format={ "type": "json_schema", "json_schema": { "name": "arithmetic_answer", "strict": True, "schema": { "type": "object", "properties": {"answer": {"type": "string"}}, "required": ["answer"], "additionalProperties": False, }, }, }, max_completion_tokens=16384,)
print(response.choices[0].message.content)Image input with a tool call
The card’s example sends an image plus a calculator tool, runs the tool the model asks for, and sends the results back. This version follows it; the card’s own example reads an equations image from a URL.
import json
from openai import OpenAI
client = OpenAI(api_key="EMPTY", base_url="http://localhost:8000/v1")model = client.models.list().data[0].id
image_url = "https://math-coaching.com/img/fiche/46/expressions-mathematiques.jpg"
def my_calculator(expression: str) -> str: return str(eval(expression)) # demo only: never eval untrusted input
tools = [ { "type": "function", "function": { "name": "my_calculator", "description": "A calculator that can evaluate a mathematical expression.", "parameters": { "type": "object", "properties": { "expression": { "type": "string", "description": "The mathematical expression to evaluate.", }, }, "required": ["expression"], }, }, }]
messages = [ { "role": "user", "content": [ { "type": "text", "text": "Thanks to your calculator, compute the results for the equations that involve numbers displayed in the image.", }, {"type": "image_url", "image_url": {"url": image_url}}, ], }]
response = client.chat.completions.create( model=model, messages=messages, tools=tools, tool_choice="auto", reasoning_effort="high", temperature=1.0, top_p=0.95,)
tool_calls = response.choices[0].message.tool_callsresults = []for tool_call in tool_calls: if tool_call.function.name == "my_calculator": results.append(my_calculator(**json.loads(tool_call.function.arguments)))
messages.append({"role": "assistant", "tool_calls": tool_calls})for tool_call, result in zip(tool_calls, results): messages.append( { "role": "tool", "tool_call_id": tool_call.id, "name": tool_call.function.name, "content": result, } )
response = client.chat.completions.create( model=model, messages=messages, reasoning_effort="high", temperature=1.0, top_p=0.95,)print(response.choices[0].message.content)Speculative decoding (DSpark)
The checkpoint ships with an embedded DSpark draft head: 3 dense MLA draft layers in BF16 that propose blocks of 3 tokens. To turn it on in vLLM, add this to the serve command:
--speculative-config '{"method": "dspark", "num_speculative_tokens": 3}'Mistral says it measured up to 1.9x higher throughput than serving the target model alone, and that outputs are unchanged. Gains depend on hardware and workload.
Other ways to run it
The card also documents SGLang (image lmsysorg/sglang:mistral-large-4, with --tp-size 8 and --speculative-algorithm DSPARK in its example) and Transformers (install from main, launched with torchrun --nproc-per-node 8). It links GGUFs for llama.cpp and fine-tuning guides for Axolotl, Unsloth and TRL. The card also notes that if local serving is subpar, the Mistral API serves the model as mistral-large-4.
Gotchas
- Hardware. Every serving recipe in the card uses eight-way tensor parallelism. Plan for a multi-GPU node, not a single card.
- Parsers are required. The card says both mistral parsers are required for tool use and for separating reasoning from content in vLLM.
- Token budgets.
max_completion_tokensincludes reasoning tokens, so a low limit athigheffort can leave little room for the answer. - Transformers needs
main. The card says to install it from the main branch. - License. It is a modified MIT license for commercial and non-commercial use, but running a Model-as-a-Service business requires a separate commercial license from Mistral.
When to pick it
Pick it if you have a multi-GPU node and want one open-weight model for coding, agent work, strict JSON output, image input and very long context, with a per-request dial for reasoning depth. The card’s headline numbers are 48% on the Artificial Analysis Coding Agent Index (effectively tied with GLM-5.3 while using 47% fewer tokens per task) and 26 on the Intelligence Index v5, which it describes as the highest among western open-weight models, while noting that leading Chinese open-weight models score higher on that aggregate.
Skip it if you need a small local model, or if you plan to sell hosted access to it without a commercial agreement. If you don’t have the hardware, the card says the model is also served on the Mistral API as mistral-large-4.
Related
Self-Host MiMo-V2.6-Pro-RL, Xiaomi's 1T MoE Agent Model
Xiaomi's 1.02T-parameter MoE model has 1M context and omnimodal input, and was trained for agents. Here is how to serve it with vLLM or SGLang.
XiaomiMiMo/MiMo-V2.6-Pro-RL
Kolibri 1: serving Aleph Alpha's 78B MoE with vLLM, reasoning and tool calls
Kolibri 1 is a German–English reasoning model with only 3.5B active parameters. How to serve it, control its thinking effort, and wire up tool calling.
Aleph-Alpha/Kolibri-1
Olala 1.0 Mini: a 1B-Active Hybrid Mamba Model for Chat and Tools
OVHai LLM's Apache-2.0 reasoning model has 6.8B parameters but ~1B active. How to serve it with vLLM, set reasoning effort, call tools and fine-tune it.
OVHaiLLM/Olala-v1.0-mini-7A1B