Mistral AI Models Guide: Architectures & Pricing (2026)
Compare Mistral Large 4, Large 3, Small 4 (119B MoE), Ministral 3, and Codestral specs, API pricing, NVFP4 VRAM sizing, and vLLM/Ollama deployment.
Modern Mistral AI models span compact 3B edge checkpoints up to the 1.05-trillion-parameter Mistral Large 4 flagship, combining sparse Mixture-of-Experts (MoE) throughput with permissive Apache 2.0 open-weight checkpoints. Because sparse routing activates only 5% to 6% of weights per token on Mistral Large 4 (52B active) and Mistral Small 4 (6.5B active), teams achieve frontier multimodal reasoning alongside a 90% prompt caching discount.
Understanding Mistral’s consolidated model tiers helps engineers balance API economics against self-hosted GPU clusters. Selecting the right checkpoint lets teams match 256K-to-1M context lengths cleanly to local workstations or multi-GPU serving infrastructure.
Key Takeaways
- Mistral Large 4 introduces a 1.05T-total / 52B-active multimodal MoE architecture with a 1M-token context window ($0.70/M input, $0.07/M cached, $2.10/M output), superseding Mistral Large 3 (675B total / 41B active, 256K context).
- Mistral Small 4 unifies instruction, coding, vision, and toggleable test-time reasoning in a 119B-total / ~6.5B-active Apache 2.0 MoE model ($0.15/M input, $0.60/M output), while Ministral 3 (3B, 8B, 14B) targets edge devices.
- Standalone Pixtral, Magistral, and Devstral product lines have been consolidated directly into unified multimodal tiers, leaving Codestral (128K FIM) and Leanstral 1.5 (Lean 4 formal proofs) for specialized workloads.
- Production deployments connect the official
mistralaiPython SDK to La Plateforme or localvLLM/Ollamaservers, guarding against Code 3054 (temperature=0withouttop_p=1), JSON whitespace loops, and org-wide429rate limits.
Sparse Mixture-of-Experts Architecture and Lineup Consolidation
Mistral AI models rely on sparse Mixture-of-Experts routing rather than dense transformer stacks, activating only a tiny subset of specialized expert sub-networks per generated token. This design preserves trillion-parameter knowledge capacity while keeping decoding latency and FLOPs low enough for real-time enterprise agents.
Figure 1: Sparse Mixture-of-Experts routing activates roughly 5% to 6% of network parameters per token while sharing prefix-cached KV memory across requests.
How Sparse MoE Routing Cuts Active Inference Compute
Traditional dense transformers multiply every prompt token against 100% of stored model weights on every forward pass. Under a mistral mixture of experts architecture, a lightweight gating router inspects each incoming token and dispatches it exclusively to the top-K experts.
On Mistral Large 4, only 52B of the 1.05 trillion total parameters fire per token; on Mistral Small 4, roughly 4B to 6.5B of 119B total parameters activate. Teams planning self-hosted clusters should pair these active compute profiles with dedicated GPU hardware requirements to avoid memory-bandwidth bottlenecks.
Consolidating Pixtral, Magistral, and Devstral Into Unified Models
As documented in the Mistral AI Official Models Documentation, Mistral simplified its catalog by folding previously separate brands into unified generations. Native vision from Pixtral, chain-of-thought reasoning from Magistral, and agentic coding from Devstral now ship inside Mistral Large 4, Mistral Small 4, and Ministral 3.
Mistral Small 4 also introduces a toggleable reasoning mode that lets developers adjust test-time compute per API call instead of maintaining separate reasoning and chat endpoints. Only specialized workloads such as low-latency IDE autocomplete (Codestral) and Lean 4 formal mathematical verification (Leanstral 1.5) remain distinct models.
Mistral AI Model Lineup: Specs, Licenses, and API Pricing
Selecting a Mistral checkpoint requires evaluating parameter counts, license terms, context windows, and La Plateforme token pricing side by side. Teams tracking broader open ecosystems can also benchmark these tiers against our open-weight foundation models ranking.
Flagship Tiers: Mistral Large 4 vs. Mistral Large 3
Mistral Large 4 is the primary multimodal flagship, scaling to 1.05 trillion total parameters (52B active), fluency in 160+ languages, and a 1 million token context window. It replaces Mistral Large 3 (675B total / 41B active, 256K context), which enters deprecation ahead of April 2027 API retirement.
Licensing separates these two flagships sharply for self-hosters. Mistral Large 3 remains available under the permissive Apache 2.0 license, whereas Mistral Large 4 ships under the Mistral Ecosystem Open Weight License (which restricts commercial Model-as-a-Service resale without an enterprise agreement).
Workhorse & Edge Tiers: Mistral Small 4 and Ministral 3
Published via the Mistral Small 4 119B Model Card on Hugging Face, Mistral Small 4 (Mistral-Small-4-119B-2603) pairs 119B total MoE parameters (128 experts, ~6.5B active) with a 256K Mistral Small 4 context window and companion Eagle speculative decoding heads. Released under a permissive Mistral Apache 2.0 license, Small 4 is Mistral’s core open-weight workhorse for high-throughput enterprise RAG and coding agents.
For edge devices and single consumer GPUs, the Ministral 3 series (3B, 8B, and 14B) offers Apache 2.0 Base, Instruct, and Reasoning checkpoints with native image understanding.
Specialized Models: Codestral FIM and Leanstral 1.5
Codestral targets low-latency IDE code synthesis across 80+ programming languages with a 128K context window and native Codestral Fill-in-the-Middle (FIM) completion endpoints. Meanwhile, Leanstral 1.5 (~119B total / 6B active) specializes in proof engineering and formal mathematical verification inside Lean 4.
According to the Mistral AI La Plateforme Pricing Schedule, hosted API calls include prompt caching discounts of up to 90% on repeated prefixes:
| Model | Architecture | Total / Active Params | Context Window | License | API Pricing (In / Cached / Out per 1M) |
|---|---|---|---|---|---|
| Mistral Large 4 | Multimodal Sparse MoE | 1.05T / 52B active | 1M tokens | Mistral Ecosystem Open Weight | $0.70 / $0.07 / $2.10 |
| Mistral Large 3 | Multimodal Sparse MoE | 675B / 41B active | 256K tokens | Apache 2.0 | $0.50 / $0.05 / $1.50 |
| Mistral Small 4 | Hybrid Multimodal MoE | 119B / 6.5B active | 256K tokens | Apache 2.0 | $0.15 / $0.015 / $0.60 |
| Codestral | Code FIM Transformer | Specialized Code | 128K tokens | Mistral Commercial | $0.30 / $0.03 / $0.90 |
| Ministral 3 (14B) | Dense Multimodal Edge | 14B / 14B active | 128K tokens | Apache 2.0 | $0.20 / $0.02 / $0.20 |
| Ministral 3 (8B / 3B) | Compact Edge Models | 8B / 3B active | 128K tokens | Apache 2.0 | $0.15 / $0.10 (flat in & out) |
Mistral vs. Llama 4 and DeepSeek: Architectural Trade-Offs
Comparing Mistral Large 4 and Small 4 against Meta Llama 4 Scout and DeepSeek-V4.1-Flash highlights clear trade-offs in licensing, active FLOPs, and multilingual enterprise governance. Engineers auditing raw benchmark tables across open-weight releases should follow our guide on evaluating LLM model cards and benchmarks.
Comparing Open-Weight Licensing and Multilingual Support
Meta’s Llama 4 Maverick and Scout use custom Llama 4 licenses with monthly active user thresholds for massive platforms, whereas Mistral Small 4, Ministral 3, and the Mistral Large 3 675B Model Card on Hugging Face use standard Apache 2.0 licensing with zero revenue caps. Mistral Large 4’s native support across 160+ languages also gives European enterprises strong non-English extraction performance compared to English-centric baselines.
Latency, Context Scaling, and Tool-Calling Reliability
| Architectural Dimension | Mistral Large 4 | Mistral Small 4 | Meta Llama 4 Scout | DeepSeek-V4.1-Flash |
|---|---|---|---|---|
| Parameter Efficiency | 1.05T total / 52B active MoE | 119B total / 6.5B active MoE | 17B active MoE | Asymmetric MoE |
| Max Context Window | 1M tokens | 256K tokens | Up to 10M tokens | 128K to 1M tokens |
| Permissive License | Mistral Ecosystem Open Weight | Apache 2.0 | Meta Llama 4 License | MIT Open Weights |
| Primary Enterprise Edge | 160+ languages, GDPR EU hosting | High-RPS Apache 2.0 agents + reasoning | Ultra-long multi-repo context | Low-cost batch code & reasoning |
Choose Mistral Small 4 when you need Apache 2.0 ownership, toggleable reasoning, and high RPS concurrency on mid-sized GPU clusters. Choose Llama 4 Scout for 2M-to-10M token full-repository ingestion, or DeepSeek-V4.1-Flash for MIT-licensed low-cost reasoning APIs.
Deploying Mistral Locally with Ollama, vLLM, and the Python SDK
Self-hosting open-weight Mistral checkpoints guarantees strict data residency and predictable flat infrastructure costs. Developers typically prototype locally with Ollama before moving multi-user serving onto vLLM or SGLang clusters.
Local Prototyping with Ollama vs. Production Serving on vLLM
Official weights and NVFP4/FP8 quantized checkpoints live on the Hugging Face Mistral Organization Hub, while production engine compatibility is tracked in the vLLM Supported Models Documentation. Selecting between desktop runners and batched engines maps directly to trade-offs covered in our local LLM inference runners guide.
Use Ollama for single-user workstation testing, and deploy vllm serve with --enable-prefix-caching for multi-user APIs requiring PagedAttention throughput:
# 1. Local single-user execution with Ollama
ollama run ministral-3:8b
ollama run codestral
# 2. High-concurrency production server with vLLM (FP8 + Prefix Caching)
vllm serve mistralai/Mistral-Small-4-119B-2603 \
--tensor-parallel-size 2 \
--quantization fp8 \
--enable-prefix-caching \
--max-model-len 65536 \
--port 8000
Passing --enable-prefix-caching lets vLLM reuse computed KV cache blocks across shared system prompts and RAG instructions, cutting time-to-first-token sharply under concurrent traffic.
Connecting the Official mistralai Python SDK to Local and Cloud Endpoints
The official mistralai Python SDK supports switching cleanly between Mistral La Plateforme (including the regional GDPR gateway https://api.eu.mistral.ai) and local vLLM or Ollama servers via the server_url parameter.
The script below configures exponential backoff for 429 rate limits, sets top_p=1.0 whenever temperature=0.0 to prevent Code 3054 errors, and parses structured outputs through Pydantic:
import os
import time
from mistralai import Mistral
from pydantic import BaseModel, Field
class ClusterSizingPlan(BaseModel):
recommended_model: str = Field(..., description="Selected Mistral model ID")
quantization: str = Field(..., description="BF16, FP8, NVFP4, or Q4_K_M")
estimated_vram_gb: int = Field(..., ge=4)
def query_mistral_with_resilience(prompt: str, use_local: bool = False) -> ClusterSizingPlan:
server_url = "http://localhost:8000/v1" if use_local else "https://api.eu.mistral.ai"
api_key = "local-vllm" if use_local else os.environ["MISTRAL_API_KEY"]
client = Mistral(api_key=api_key, server_url=server_url)
for attempt in range(4):
try:
response = client.chat.parse(
model="mistral-small-latest",
messages=[
{"role": "system", "content": "Return valid JSON matching the schema."},
{"role": "user", "content": prompt},
],
response_format=ClusterSizingPlan,
temperature=0.0,
top_p=1.0, # Required by Mistral API when temperature=0.0 (avoids Code 3054)
)
return response.choices[0].message.parsed
except Exception as exc:
if "429" in str(exc) and attempt < 3:
time.sleep(2 ** attempt)
continue
raise
raise RuntimeError("Exceeded retry budget for Mistral endpoint.")
Calling client.chat.parse with response_format=ClusterSizingPlan guarantees typed Pydantic validation while server_url keeps local vLLM and EU cloud inference API-compatible.
Codestral Fill-in-the-Middle (FIM) Code Completion
IDE plugins and automated refactoring bots invoke Mistral’s dedicated client.fim.complete endpoint rather than standard chat completions so the model completes code cleanly between an existing prompt prefix and suffix tail. Keeping FIM requests isolated on codestral-latest reduces IDE autocomplete latency while reserving larger MoE endpoints for multi-file architectural planning:
import os
from mistralai import Mistral
client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])
fim_response = client.fim.complete(
model="codestral-latest",
prompt="def compute_kv_cache_gb(seq_len: int, layers: int, kv_heads: int) -> float:\n",
suffix="\n return round(bytes_total / (1024 ** 3), 2)",
temperature=0.0,
top_p=1.0,
max_tokens=128,
)
print(fim_response.choices[0].message.content)
Pairing FIM endpoints with explicit stop sequences keeps single-function completions deterministic inside automated developer tooling.
Hardware Sizing: BF16, FP8, and 4-Bit VRAM Requirements
Sizing GPU memory accurately for Mistral models prevents silent out-of-memory crashes and PCIe swap thrashing. Reference tokenizer scripts and model architecture utilities are also maintained in the Mistral Inference GitHub Repository.
Quantization Profiles: BF16 vs. FP8 vs. NVFP4 and Q4_K_M
Full 16-bit (BF16) weights preserve raw pretraining fidelity at 2 bytes per parameter plus KV cache overhead. Compressing checkpoints to 4-bit (NVFP4 or Q4_K_M) achieves roughly a 65% VRAM reduction while retaining over 98% of baseline reasoning and coding scores on standard evaluations.
| Model Checkpoint | Architecture | BF16 VRAM | FP8 VRAM | 4-Bit (NVFP4 / Q4_K_M) | Recommended Hardware Target |
|---|---|---|---|---|---|
| Ministral 3 (8B) | Dense Edge | ~16 GB | ~9 GB | 4 GB to 8 GB | Laptop GPU (RTX 4060) or 16GB Mac |
| Codestral / Small 24B | Dense Code / Agent | ~48 GB | 28 GB to 32 GB | 14 GB to 16 GB | Single RTX 4090 / RTX 5090 (24GB-32GB) |
| Mistral Small 4 (119B) | 6.5B Active MoE | ~240 GB | ~120 GB+ | ~64 GB | 2x A100/H100 (80GB) or Mac Studio 96GB+ |
| Mistral Large 3 (675B) | 41B Active MoE | 1.3 TB+ | ~680 GB | ~350 GB | Multi-node H100 / H200 cluster |
For compact single-workstation deployments running 8B to 24B checkpoints locally, engineers on Apple hardware can review unified memory on Apple Silicon sizing trade-offs.
Why Sparse MoE Models Still Demand Full Weight Residency
A frequent sizing mistake is assuming that Mistral Small 4 (6.5B active) or Mistral Large 3 (41B active) fits inside VRAM sized only for the active parameter count. Because the token router can select any of the 128 experts dynamically across a single sentence, all 119B or 675B weights must remain pinned in high-bandwidth GPU VRAM or unified RAM to prevent catastrophic expert-swapping latency.
Speculative Decoding and Multi-GPU Tensor Parallelism
Self-hosted deployments running Mistral Small 4 (119B MoE) can pair companion Eagle speculative decoding heads with vLLM or SGLang to accelerate single-stream token generation without altering output distributions. Because speculative draft heads predict multiple candidate tokens verified in one parallel forward pass, interactive coding and RAG streams gain lower inter-token latency on dual-GPU nodes.
For high-volume asynchronous pipelines such as document classification or offline synthetic evals, teams can offload non-interactive workloads from real-time GPU clusters to La Plateforme Batch processing endpoints. Separating synchronous chat traffic from batch inference prevents KV cache saturation while cutting hosted API token spend significantly.
[!TIP] Always size cluster VRAM for 100% of total MoE parameters plus KV cache context headroom, rather than sizing for active parameters per token.
Production Troubleshooting: Code 3054, Rate Limits, and GDPR Routing
Production pipelines calling La Plateforme or self-hosted vLLM nodes encounter distinct runtime failure modes that require explicit middleware guards.
Figure 2: A five-tier Mistral production stack enforces quantized VRAM budgets, EU regional routing, greedy sampling parameters, and org-wide rate backoff.
Fixing Code 3054 Greedy Sampling Mismatches and JSON Whitespace Loops
Two payload errors commonly break automated Mistral integrations:
400 Bad Request(Code 3054 - Greedy Sampling Mismatch): Mistral validation rejects requests that settemperature=0without explicitly settingtop_p=1. Standardize every client wrapper to pairtemperature=0.0withtop_p=1.0.400 Bad Request(Code 1500 - Invalid Model or Regional Mismatch): Passing retired aliases or mismatched regional model identifiers returns an immediate parameter error. Pin explicit versioned model IDs (such asmistral-small-latestor exact dated checkpoints) inside environment configuration rather than hardcoding legacy preview names.- JSON Mode Whitespace Loops: Using raw
response_format={"type": "json_object"}without mentioning"JSON"and explicit keys in the prompt can trigger endless whitespace or newline loops. Prefer schema-enforcedclient.chat.parseor strict schemas documented in the Mistral AI Function Calling Documentation, keeping tool lists compact because all 128 max tool definitions consume input TPM on every turn.
Handling Organization-Wide 429 Rate Pools and Regional GDPR Gateways
La Plateforme enforces RPS, RPM, and TPM limits across the entire organization rather than per individual API key. If CI test suites, staging workers, and production agents share one organization account, burst tests immediately starve production traffic with 429 Too Many Requests errors (and new free-tier accounts default to a strict 1 RPS cap until paid billing is activated).
Separate staging and production organizations, enable exponential backoff with jitter on HTTP 429 responses, and point European compliance workloads directly to https://api.eu.mistral.ai so inference payloads stay strictly inside EU data-residency boundaries.
Frequently Asked Questions
What is the latest Mistral AI model released in 2026?
Mistral Large 4 is the flagship multimodal Mixture-of-Experts model with 1.05 trillion total parameters, 52 billion active parameters, and a 1M-token context window. It supersedes Mistral Large 3 alongside Mistral Small 4 (119B MoE) and the Ministral 3 edge series.
What is the difference between Mistral Large 4, Mistral Large 3, and Mistral Small 4?
Mistral Large 4 scales to 1.05T total parameters and 1M context under the Mistral Ecosystem Open Weight License, while Mistral Large 3 offers 675B total / 41B active parameters and 256K context under Apache 2.0. Mistral Small 4 delivers high-throughput efficiency with 119B total parameters, ~6.5B active weights, and toggleable reasoning under Apache 2.0.
Can Mistral AI models be used commercially for free?
Models released under the Apache 2.0 license, including Mistral Small 4, Mistral Large 3, and Ministral 3, can be self-hosted and modified commercially without royalty fees. Mistral Large 4 uses the Mistral Ecosystem Open Weight License, which places restrictions on commercial Model-as-a-Service (MaaS) hosting.
How much VRAM is required to run Mistral models locally?
Quantized Ministral 3 8B checkpoints fit inside 4GB to 8GB of VRAM, while 24B dense coding models require 14GB to 16GB in 4-bit quantization or 28GB to 32GB in FP8. Serving large MoE models like Mistral Small 4 (119B) or Mistral Large 3 (675B) requires pinning all total weights in 64GB to 350GB+ of multi-GPU or unified memory.
How does Codestral differ from general Mistral models?
Codestral is specialized for low-latency IDE code completion and Fill-in-the-Middle (FIM) generation across 80+ programming languages with a 128K context window. General models such as Mistral Small 4 and Large 4 absorb broader agentic coding and multimodal workflows across unified endpoints.
How do you connect the Mistral Python SDK to a local vLLM or Ollama server?
Initialize the official mistralai Python client with server_url set to http://localhost:8000/v1 for vLLM or http://localhost:11434/v1 for Ollama. Applications can then swap cleanly between La Plateforme cloud endpoints and private GPU clusters without altering request code.
Why does Mistral API return a 400 error when temperature is set to 0?
Mistral’s inference validation throws a 400 Bad Request (Code 3054) if temperature is set to 0 while top_p is omitted or set below 1. Explicitly passing top_p=1.0 alongside temperature=0.0 resolves greedy-sampling validation errors.
What happened to Mistral Pixtral, Magistral, and Devstral models?
Mistral consolidated standalone vision (Pixtral), reasoning (Magistral), and coding agent (Devstral) brands directly into unified multimodal model generations. Capabilities from all three lines now ship natively inside Ministral 3, Mistral Small 4, and Mistral Large 4.