Skip to main content

1. Model Introduction

Mistral Medium 3.5 is Mistral AI’s first flagship merged model — a single dense 128B checkpoint that handles instruction following, reasoning, and coding in one set of weights. It replaces Mistral Medium 3.1 and Magistral in Le Chat, and replaces Devstral 2 in the Vibe coding agent. Reasoning effort is configurable per request, so the same model can answer a quick chat reply or work through a deep agentic run. The vision encoder was trained from scratch to handle variable image sizes and aspect ratios. Key Features:
  • Dense 128B parameters — no MoE, no MLA, plain GQA (96 heads, 8 KV heads, head_dim=128)
  • 256K context window — YARN RoPE scaling on top of the original 4K base
  • Hybrid Reasoning: Toggle between instant reply and deep reasoning per request via reasoning_effort ("none" or "high")
  • Vision: Accepts text + image input; from-scratch encoder that handles variable image sizes/aspect ratios
  • Function Calling: Native tool calling and JSON output
  • FP8 Native: Released with FP8 e4m3 static-tensor quantization built in
  • Multilingual: 24 supported languages including English, French, German, Spanish, Portuguese, Italian, Japanese, Korean, Russian, Chinese, Arabic, Persian, Indonesian, Malay, Nepali, Polish, Romanian, Serbian, Swedish, Turkish, Ukrainian, Vietnamese, Hindi, and Bengali
  • License: Modified MIT (open for commercial and non-commercial use except for companies with large revenue)
Architecture:
  • Mistral 3 backbone with YARN RoPE for 256K context
  • Dense (no MoE), 128B parameters
  • Standard GQA attention (not MLA)
  • Pixtral-style vision encoder (48 layers, patch_size=14, spatial_merge=2, image_size=1540) trained from scratch
  • Multimodal input: text + image
Models: The HuggingFace repo ships both the mistral native layout (params.json + consolidated-*.safetensors) and the HF layout (config.json + model-*.safetensors). SGLang auto-detects the format — the HF layout is preferred when both are present.

2. SGLang Installation

Refer to the official SGLang installation guide. Docker Image: lmsysorg/sglang:latest covers all the GPUs in this cookbook (H100 / H200 / B200 / B300).

3. Model Deployment

3.1 Basic Configuration

Interactive Command Generator: Use the configuration selector below to generate a launch command for Mistral Medium 3.5.

3.2 Configuration Tips

  • Tensor Parallelism: Mistral Medium 3.5 FP8 (~130 GB) requires --tp 4 on Hopper (H100/H200) and --tp 2 on Blackwell (B200/B300).
  • Reasoning effort: Reasoning depth is configurable per request via reasoning_effort ("none", "high"). No restart required — toggle per call.
  • Recommended temperature: 0.7 when reasoning_effort="high". Anywhere from 0.0 to 0.7 when reasoning_effort="none", depending on the task — lower for to-the-point answers, higher for creative output.
  • Context length vs memory: The model has a 256K context window. If you are memory-constrained, lower --context-length (e.g. 32768) and increase once things are stable.
  • Tool calling: Enable --tool-call-parser mistral to activate native function calling support.
  • Reasoning parser: Enable --reasoning-parser mistral to separate reasoning_content from the main response content.
  • System prompt: The model ships with a recommended system prompt in chat_template.jinja and SYSTEM_PROMPT.txt. If you do not pass a system message yourself, the chat template injects Mistral’s default (model identity, current date, tool-use guidelines). For full fidelity with Mistral’s reference setup, load SYSTEM_PROMPT.txt from the HF repo and substitute {name}, {today}, {yesterday} (see Section 4.6).

3.3 Speculative Decoding (EAGLE)

Mistral ships an EAGLE draft head, mistralai/Mistral-Medium-3.5-128B-EAGLE, that lets you run speculative decoding on top of the dense 128B target. The draft is a 2-layer GQA body sharing the target’s vocab/head, FP8-quantized like the target (~4 GB), and is meant for low-concurrency latency-bound serving.
Command
  • --dtype bfloat16 is required. The draft params.json does not carry a dtype field, so --dtype auto falls back to fp32 and downcasts to fp16, which conflicts with the bf16 target when the embed/head are shared. Setting bf16 explicitly keeps both sides aligned (this is a no-op for the target — it already loads as bf16).
  • The draft uses the same vocab and lm_head as the target. Memory overhead on top of the base model is ~4 GB per TP shard.
  • (num-steps, eagle-topk, num-draft-tokens) = (3, 1, 4) is the recommended starting point. Tune for your workload — wider trees (higher eagle-topk / num-draft-tokens) help high-acceptance (templated) outputs, narrower trees keep latency tight on more diverse text.
  • EAGLE shines at low concurrency. At high concurrency, throughput is dominated by the target’s batched forward pass and the draft’s contribution shrinks; consider running without EAGLE for batch-serving workloads.

4. Model Invocation

4.1 Thinking Mode

Mistral Medium 3.5 is a hybrid reasoning model. By default it does not produce a reasoning trace — pass reasoning_effort="high" to switch on the deep-reasoning path. Mistral recommends temperature=0.7 for reasoning mode.
Example
Output:
Output

4.2 Instruct Mode (Reasoning Off)

To skip the reasoning trace and get a fast direct response, set reasoning_effort="none". For instruct mode, Mistral recommends temperature in the 0.00.7 range depending on how creative the task is:
Example
Output:
Output

4.3 Streaming with Reasoning

Example

4.4 Tool Calling

Mistral Medium 3.5 supports native function calling. Enable with --tool-call-parser mistral:
Example
Output:
Output

4.5 Vision (Image Input)

Mistral Medium 3.5 accepts image inputs alongside text. The vision encoder was retrained from scratch to handle variable image sizes and aspect ratios:
Example
Output:
Output

4.6 Loading the Reference System Prompt

Mistral ships a SYSTEM_PROMPT.txt alongside the weights. The reference setup loads it from the HF repo and substitutes {name}, {today}, and {yesterday} at runtime so the model knows its identity and the current date. SGLang’s chat template will inject a default system prompt if you omit one, but for full parity with Mistral’s reference, load it explicitly:
Example

5. Benchmarks

Validation runs on 4× H200 with --tp 4, served via the /v1/chat/completions endpoint.

5.1 Accuracy Benchmarks

GSM8K

Command
Results:
Output

MMMU

Command
Results:
Output

5.2 Speed Benchmarks

Latency (Low Concurrency)

Command
Results:
Output

Throughput (High Concurrency)

Command
Results:
Output

5.3 EAGLE Speculative Decoding (Latency)

Same 4× H200 setup, EAGLE configuration from Section 3.3. Single-stream latency benchmark (--max-concurrency 1).
Command
Results:
Output
EAGLE delivers ~1.41× output throughput and ~29% lower E2E latency vs. the baseline in Section 5.2 on the same workload. Acceptance length of 1.72 means each draft cycle averages roughly 1.7 accepted tokens.