★ Reading this for free? Get 25 structured AI courses + per-chapter AI tutor — the first chapter of every course free, no card.Start free in 30 secondsOr own every course: $149 once

Mistral Nemo 12B: 128K Context Local AI with Ollama

Joint Mistral AI + NVIDIA release: 12.2B params, Tekken tokenizer, Apache 2.0 license
Parameters
12.2B
Decoder-only transformer
Context Window
128K tokens
Full attention, 8 KV heads
MMLU Score
68.0%
5-shot, Mistral's card
Memory (default, 4K ctx)
~8.7GB
Fits a 12GB GPU
$ollama run mistral-nemo
One command to download (7.1 GB, 4-bit) and run Mistral Nemo locally
📅 Published: September 26, 2025🔄 Last Updated: November 2, 2026✓ Manually Reviewed

What Is Mistral Nemo 12B?

Mistral Nemo 12B (also called Mistral NeMo) is a 12.2 billion parameter language model jointly released by Mistral AI and NVIDIA in July 2024. It is a drop-in replacement for Mistral 7B with significantly improved capabilities, most notably a 128K token context window -- one of the longest among models in its parameter class.

The model introduces the Tekken tokenizer, which improves upon the SentencePiece tokenizer used by earlier Mistral models. Tekken is trained on over 100 languages and provides better token efficiency, especially for multilingual text and code. Unlike Mistral 7B, Mistral Nemo does not use sliding-window attention: its config sets sliding_window to null, so every layer attends over the full context, and grouped-query attention (8 key-value heads for 32 query heads) is what keeps the cache manageable.

Key Facts at a Glance

  • Developer: Mistral AI + NVIDIA
  • Released: July 2024
  • Parameters: 12.2 billion
  • Context: 128K tokens (131,072)
  • License: Apache 2.0 (fully open)
  • Tokenizer: Tekken (100+ languages)
  • Architecture: Decoder-only transformer
  • Instruct variant: Mistral-Nemo-Instruct-2407
  • HuggingFace: mistralai/Mistral-Nemo-Instruct-2407
  • Ollama: mistral-nemo

Compared to Mistral 7B v0.3, Mistral Nemo offers stronger reasoning, longer context, and better multilingual performance. However, models like Qwen 2.5 14B and Gemma 2 9B score higher on MMLU. Mistral Nemo's main advantages are its 128K context window (Gemma 2 9B has 8K) and its Apache 2.0 license which allows unrestricted commercial use.

Benchmarks Mistral Published (MMLU, HellaSwag, Winogrande)

Mistral Nemo 12B Benchmark Scores

Source: the base-model card, mistralai/Mistral-Nemo-Base-2407. Mistral's own figures; this site has not run them.

MMLU (5-shot)
68.0%
Massive Multitask Language Understanding
HellaSwag (0-shot)
83.5%
Commonsense reasoning
OpenBookQA (0-shot)
60.6%
Science reasoning (no ARC figure published)
Winogrande (0-shot)
76.8%
Coreference resolution
GSM8K
Not published
Math word problems (not on Mistral's card)
HumanEval
Not published
Code generation (not on Mistral's card)

MMLU Comparison: Mistral Nemo vs Local Alternatives

All models in the 7B-14B local parameter range. Each MMLU figure is the developer's own 5-shot result, so treat small gaps as noise.

Analysis: Mistral Nemo 12B scores 68.0% on MMLU, which places it above Llama 3.1 8B (66.7%) and the original Mistral 7B (60.1%), but below Gemma 2 9B (71.3%), Phi-3 Medium 14B (78.0%), and Qwen 2.5 14B (79.7%). Where Mistral Nemo stands out is that it pairs a native 128K context window with an Apache 2.0 license: Llama 3.1 8B matches the context but not the license, and Gemma 2 9B has an 8K context.

VRAM Requirements by Quantization

Mistral Nemo 12B VRAM usage depends on quantization level and on context length. File sizes below are the Ollama registry's for the mistral-nemo:12b-instruct-2407-* tags; the VRAM column is arithmetic (file + 0.67 GB of KV cache at Ollama's default 4K context + about 1 GB of buffers), not a measurement.

QuantizationVRAM RequiredFile SizeQuality ImpactRecommended For
Q4_K_M~9.2 GB7.5 GBMinor lossBest balance: 12GB GPUs (RTX 3060 12GB / 4070); the default q4_0 (7.1 GB) is similar
Q5_K_M~10.4 GB8.7 GBMinimal lossGood quality: 12GB GPUs
Q8_0~14.7 GB13.0 GBNear losslessHigh quality: 16GB GPUs (RTX 4060 Ti 16GB, RTX 4070 Ti Super)
FP16~26 GB24.5 GBFull qualityNo loss: RTX 5090 (32 GB), A6000; too big for a 24 GB card

Tip: The default Ollama download (ollama run mistral-nemo) is the 7.1 GB q4_0 build, the same file as mistral-nemo:12b-instruct-2407-q4_0. With its cache it needs about 8.7 GB, so an 8 GB card runs it only with some layers on the CPU; a 12 GB card holds it. For Apple Silicon Macs (M1/M2/M3), the model runs in unified memory, so 16GB total RAM is sufficient.

Key Technical Features

128K Context Window

Mistral Nemo was trained with a 128K token context window and uses full attention in every layer. That is enough for a long report or a sizeable codebase in a single prompt -- useful for:

  • -- Analyzing full legal contracts or research papers
  • -- Summarizing entire codebases or documentation
  • -- Long-form conversation with full memory
  • -- Processing multiple documents simultaneously

Note: the KV cache costs 160 KB per token at f16 (40 layers x 8 KV heads x 128 x 2 x 2 bytes), so the full 128K context adds about 21.5 GB on top of the 7.1 GB model: roughly 30 GB in total.

Tekken Tokenizer

Mistral Nemo replaces SentencePiece with the new Tekken tokenizer, trained on over 100 languages. Key improvements:

  • -- Better compression for non-English languages
  • -- More efficient code tokenization
  • -- Improved handling of multilingual documents
  • -- ~30% more efficient on code, Chinese, Italian, French, German, Spanish and Russian; 2x on Korean, 3x on Arabic (Mistral's figures)

This means Mistral Nemo can process more text per context window compared to models using SentencePiece or BPE tokenizers.

Apache 2.0 License

Unlike models with restricted licenses (e.g., Llama 3.1's custom license), Mistral Nemo uses the Apache 2.0 license:

  • -- Full commercial use with no restrictions
  • -- No user count limits
  • -- Can modify, distribute, and sublicense
  • -- No requirement to share model outputs

Mistral + NVIDIA Collaboration

Mistral Nemo is a joint release between Mistral AI and NVIDIA. This collaboration brings:

  • -- Optimized for NVIDIA TensorRT-LLM inference
  • -- Available via NVIDIA NIM microservices
  • -- Pre-built containers for enterprise deployment
  • -- Trained with quantisation awareness for FP8 inference without loss (Mistral)

How to Run Mistral Nemo 12B Locally

The easiest way to run Mistral Nemo 12B is with Ollama. One command downloads the 4-bit q4_0 model (7.1 GB) and starts it.

1

Install Ollama

Download from ollama.com or use the install script

$ curl -fsSL https://ollama.com/install.sh | sh
2

Run Mistral Nemo

Download and run the model (auto-pulls the 7.1 GB q4_0 build)

$ ollama run mistral-nemo
3

Verify the model

List installed models to confirm

$ ollama list
4

Use via API (optional)

Access via Ollama REST API on port 11434

$ curl http://localhost:11434/api/generate -d '{"model":"mistral-nemo","prompt":"Hello"}'

Terminal Example

Terminal
$ollama run mistral-nemo
pulling manifest pulling b559938ab7a0... 100% 7.1 GB verifying sha256 digest writing manifest >>> Send a message (/? for help)
$curl http://localhost:11434/api/generate -d '{"model":"mistral-nemo","prompt":"Explain the 128K context window in Mistral Nemo"}'
{"model":"mistral-nemo","response":"[the answer streams here as JSON chunks]", ...}
$_

Python Integration

import ollama

# Simple chat
response = ollama.chat(
    model='mistral-nemo',
    messages=[{
        'role': 'user',
        'content': 'Summarize the key features of Apache 2.0 license'
    }]
)
print(response['message']['content'])

# Streaming response
for chunk in ollama.chat(
    model='mistral-nemo',
    messages=[{'role': 'user', 'content': 'Explain grouped-query attention'}],
    stream=True
):
    print(chunk['message']['content'], end='')

Ollama Modelfile (Custom Settings)

# Create a Modelfile for custom config
cat > Modelfile << 'EOF'
FROM mistral-nemo

# Set parameters
PARAMETER temperature 0.7
PARAMETER top_p 0.9
PARAMETER num_ctx 8192
PARAMETER stop "</s>"

SYSTEM """You are a helpful assistant
focused on clear, accurate responses."""
EOF

# Build and run custom model
ollama create my-nemo -f Modelfile
ollama run my-nemo

Context Window Note: Ollama picks a default context from your VRAM: 4K under 24 GiB and 32K between 24 and 48 GiB, per its documentation. To change it, set num_ctx in a Modelfile or use /set parameter num_ctx 32768 during a chat session. A 32K context adds about 5.4 GB of KV cache and the full 128K about 21.5 GB.

Local AI Alternatives Comparison

How Mistral Nemo compares to other local models you can run via Ollama in the 7B-14B range. All models listed are free to download and run locally.

ModelDownloadMemorySpeedMMLU (source)Licence
Mistral Nemo 12B (mistral-nemo)7.1 GB~8.7 GB at 4K~51 tok/s ceiling68.0 (Mistral)Apache 2.0
Llama 3.1 8B (llama3.1)4.9 GB~6.4 GB at 4K~73 tok/s ceiling66.7 (Meta, base)Llama 3.1 Community
Gemma 2 9B (gemma2:9b)5.4 GB~7.9 GB at 4K~66 tok/s ceiling71.3 (Google)Gemma Terms
Qwen 2.5 14B (qwen2.5:14b)9.0 GB~10.8 GB at 4K~40 tok/s ceiling79.7 (Qwen, base)Apache 2.0
Phi-3 Medium 14B (phi3:14b)7.9 GB~9.7 GB at 4K~46 tok/s ceiling78.0 (Microsoft)MIT

Speeds are bandwidth ceilings on an RTX 3060 12GB (360 GB/s ÷ file size), not measurements; real runs land below them.

Detailed Local Alternatives

ModelMMLUVRAM (Q4)ContextOllama CommandBest For
Mistral Nemo 12B68.0%~8.7GB128Kollama run mistral-nemoLong documents, multilingual
Llama 3.1 8B66.7%~5GB128Kollama run llama3.1General purpose, coding
Gemma 2 9B71.3%~6GB8Kollama run gemma2:9bReasoning, knowledge tasks
Qwen 2.5 14B79.7%~9GB128Kollama run qwen2.5:14bBest MMLU, coding, math
Phi-3 Medium 14B78%~8GB128Kollama run phi3:14bReasoning, instruction following

When to choose Mistral Nemo 12B over alternatives:

  • -- You need the 128K context window for long documents (Gemma 2 only has 8K)
  • -- You want Apache 2.0 license for unrestricted commercial use
  • -- You work with multilingual content (Tekken tokenizer excels here)
  • -- You already use Mistral models and want a drop-in upgrade from Mistral 7B

Hardware Requirements

System Requirements

▸
Operating System
Windows 10/11, macOS 13+ (Apple Silicon or Intel), Ubuntu 20.04+
▸
RAM
16GB recommended
▸
Storage
8GB free space (default 4-bit build)
▸
GPU
12GB VRAM GPU (RTX 3060 12GB, RTX 4070) or a 16GB+ Apple Silicon Mac; an 8GB card needs CPU offload
▸
CPU
4+ cores (Intel i5/AMD Ryzen 5 or better)

Recommended Hardware Setups

Budget Setup (~$0)

  • -- Any modern CPU (4+ cores)
  • -- 16GB RAM (CPU-only inference)
  • -- 10GB free storage
  • -- No GPU needed
  • -- ~13 tok/s ceiling on dual-channel DDR5-5600

Workable for light use but slow

Recommended Setup

  • -- Intel i5/Ryzen 5 or better
  • -- 16GB RAM
  • -- RTX 3060 12GB (an 8 GB card needs CPU offload)
  • -- NVMe SSD
  • -- ~51 tok/s ceiling on the RTX 3060 12GB

Good performance for daily use

Apple Silicon Mac

  • -- M1/M2/M3 (any variant)
  • -- 16GB unified memory (minimum)
  • -- 24GB+ for larger quantizations
  • -- Built-in GPU acceleration
  • -- ~14 tok/s ceiling on M2/M3 (100 GB/s), ~28 on M1/M2 Pro (200 GB/s)

Great experience on Apple Silicon

Practical Use Cases

Long Document Analysis

The 128K context window makes Mistral Nemo ideal for processing long documents that would exceed context limits of other models:

  • -- Legal contracts and agreements (full document in one pass)
  • -- Research papers and technical documentation
  • -- Book chapters and long-form content summarization
  • -- Codebase analysis and documentation generation

Multilingual Applications

The Tekken tokenizer, trained on 100+ languages, makes Mistral Nemo particularly effective for:

  • -- Translation and cross-language tasks
  • -- Multilingual customer support chatbots
  • -- Processing documents in non-English languages
  • -- Code comments and documentation in any language

Privacy-Sensitive Tasks

Running locally means your data never leaves your machine:

  • -- GDPR-compliant document processing
  • -- Medical and financial document analysis
  • -- Proprietary code review and generation
  • -- Air-gapped deployment for sensitive environments

Development and Testing

Mistral Nemo works well as a development model for:

  • -- Prototyping LLM-powered applications locally
  • -- Testing prompts before deploying to production APIs
  • -- Building RAG (Retrieval Augmented Generation) pipelines
  • -- Offline development without internet dependency

Troubleshooting

Model runs slowly or uses too much RAM

If Mistral Nemo is running slowly, it is likely running on CPU instead of GPU:

# Check if Ollama detects your GPU
ollama ps
# For NVIDIA GPUs, verify CUDA is available
nvidia-smi
# If GPU not detected, reinstall Ollama
# or check NVIDIA driver version (535+ required)
Out of memory when using long context

Using 128K context requires significantly more VRAM. Reduce context if hitting OOM:

# In Ollama chat, set a smaller context window
/set parameter num_ctx 8192
# Or in a Modelfile
PARAMETER num_ctx 8192
# Default 7.1 GB model, approximate totals:
# 8K context = ~9.4 GB
# 32K context = ~13.5 GB
# 128K context = ~30 GB
How to use a specific quantization level

Ollama defaults to the 7.1 GB q4_0 build. To use a different quantization, pull its tag, or load a GGUF:

# Default q4_0 (7.1 GB)
ollama run mistral-nemo
# Q5_K_M (8.7 GB) straight from the Ollama library
ollama run mistral-nemo:12b-instruct-2407-q5_K_M
# For GGUF files from HuggingFace,
# create a Modelfile pointing to the file:
cat > Modelfile << EOF
FROM ./mistral-nemo-instruct-2407.Q5_K_M.gguf
EOF
ollama create mistral-nemo-q5 -f Modelfile
ollama run mistral-nemo-q5
Expose Ollama API on the network

By default, Ollama only listens on localhost. To share with other machines:

# Set the host to 0.0.0.0 to accept external connections
OLLAMA_HOST=0.0.0.0:11434 ollama serve
# Then access from another machine:
curl http://YOUR_IP:11434/api/generate \
-d '{"model":"mistral-nemo","prompt":"Hello"}'
Reading now
Join the discussion

Frequently Asked Questions

What is the difference between Mistral Nemo and Mistral 7B?

Mistral Nemo is a 12.2B parameter model (vs 7.3B for Mistral 7B) with several key improvements: 128K context window (vs 32K), the new Tekken tokenizer (vs SentencePiece), and higher published scores (MMLU 68.0 vs 60.1). It was co-developed with NVIDIA and is designed as a drop-in replacement for Mistral 7B with stronger performance.

How much VRAM does Mistral Nemo 12B need?

The Ollama default is the 7.1 GB q4_0 build, which needs about 8.7 GB with Ollama's default 4K context. That fits GPUs like the RTX 3060 12GB or Apple Silicon Macs with 16GB+ unified memory; an 8 GB card such as the RTX 4060 runs it with some layers on the CPU. Full FP16 is a 24.5 GB file, so it wants a 32 GB card (RTX 5090) or a 48 GB A6000. CPU-only inference works with 16GB system RAM but is significantly slower.

Can I actually use the full 128K context window?

Yes, but it requires much more memory. Ollama defaults to a 4K context on GPUs with under 24 GiB of VRAM. You can increase it via /set parameter num_ctx 131072 in chat, or in a Modelfile with PARAMETER num_ctx 131072. The full 128K context adds about 21.5 GB of KV cache to the 7.1 GB model, so plan on roughly 30 GB. For practical use, 8K-32K context covers most tasks.

Is Mistral Nemo 12B good for coding?

Mistral does not publish a HumanEval score for Nemo, though its announcement calls the model's coding accuracy state-of-the-art for its size at release, and Tekken is ~30% more efficient on source code than Mistral's older tokenizer. For dedicated coding tasks, Qwen 2.5 Coder or DeepSeek Coder would be stronger choices. Mistral Nemo is better suited for general-purpose tasks, long document processing, and multilingual work rather than pure code generation.

Should I choose Mistral Nemo 12B or Qwen 2.5 14B?

If you need the highest MMLU scores and best overall benchmarks, Qwen 2.5 14B (79.7% MMLU, base) outperforms Mistral Nemo (68.0% MMLU) significantly. Both are Apache 2.0, so licence is not the deciding factor; Mistral Nemo has the advantage of a native 128K context, the Tekken tokenizer for better multilingual performance, and strong NVIDIA ecosystem integration. Choose based on your priority: raw benchmark performance (Qwen) or native long context and multilingual focus (Nemo).

Can Mistral Nemo run on a Mac?

Yes. On Apple Silicon Macs (M1, M2, M3), Ollama uses Metal for GPU acceleration via unified memory. A 16GB Mac can run the default 4-bit build comfortably; generation is bound by memory bandwidth, with a ceiling of about 14 tokens/second on an M2 or M3 (100 GB/s) and about 28 on an M1 or M2 Pro (200 GB/s). 24GB or 32GB Macs can run higher quantizations or larger context windows. Install Ollama from ollama.com and run ollama run mistral-nemo.

Sources

Official Sources

Benchmark References

Build Real AI on Your Machine

RAG, agents, NLP, vision, and MLOps - chapters across 25 courses that take you from reading about AI to building AI.

Related Resources

Browse All Local Models

Compare 100+ open-source models you can run locally

Browse all models

Hardware Requirements Guide

Find the best hardware for running AI models locally

Hardware guide

Related Mistral Models

🎯
AI Learning Path

Go from reading about AI to building with AI

25 structured courses. Hands-on projects. Runs on your machine. Start free.

Or own it for life — Lifetime $149 $599, pay once
Barsha Mohapatra

Written by

Barsha Mohapatra

Founder and Editor, Local AI Master · Founder, Little AI Master

Founder of Little AI Master and the editor behind every course and guide on Local AI Master. Years of tutoring students taught her where AI education actually fails.

📅 Published: September 26, 2025🔄 Last Updated: November 2, 2026✓ Manually Reviewed

Related Guides

Continue your local AI journey with these comprehensive guides

More on Local AI Hardware
See the full AI Hardware Guide 2026 guide.
📚
Free · no account required

Grab the AI Starter Kit — career roadmap, cheat sheet, setup guide

No spam. Unsubscribe with one click.

🎯
AI Learning Path

Found your model? Now build something with it.

25 hands-on courses — RAG, agents, fine-tuning — all running locally. First chapter free, no card.

Or own it for life — Lifetime $149 $599, pay once
Free Tools & Calculators