Run Llama 4 Locally: Scout and Maverick Setup With Ollama
Want to go deeper than this article?
Free account unlocks the first chapter of all 25 courses — RAG, agents, MCP, voice AI, MLOps, real GitHub repos.
Ollama’s running. Here’s what to build with it. Go from “ollama run” to RAG apps, agents, and fine-tuned models — structured and hands-on. First chapter free.
Llama 4 Model Comparison
Quick Start (needs ~80GB+ of memory):
ollama pull llama4:scout
ollama run llama4:scout
Can you run Llama 4 locally? Yes, but it is a big-memory job. Llama 4 Scout is a 67GB download in Ollama (llama4:scout, Q4_K_M) and Maverick is 245GB (llama4:maverick). Both are Mixture-of-Experts models with only 17B parameters active per token, which keeps them fast for their size, but every expert must be loaded, so you need memory for the whole file: a 96-128GB Mac or Strix Halo machine for Scout, a 256GB+ workstation for Maverick. On a 16-24GB GPU with 64GB+ of system RAM, llama.cpp can run Scout by keeping the experts in RAM.
What's New in Llama 4
Meta released Llama 4 on April 5, 2025 (Llama 4 model card). The headline changes:
Key Features
| Feature | Llama 4 | Llama 3.1 |
|---|---|---|
| Architecture | Mixture of Experts | Dense |
| Multimodal | Yes (image + text in, text out) | Text only |
| Context Window | 10M tokens (Scout), 1M (Maverick) | 128K tokens |
| Efficiency | 17B active params | Full model active |
| Languages | 12 supported (200 in pre-training) | 8 |
Model Variants
Llama 4 Scout - The one most people can actually run
- 109B total parameters, 17B active, 16 experts
- 10M-token context window
- 67GB download at Q4_K_M in Ollama
- MoE: no tok/s figure published here (speed depends on how experts are placed)
Llama 4 Maverick - The stronger model
- 400B total parameters, 17B active, 128 experts
- 1M-token context window
- 245GB download at Q4_K_M in Ollama
- MoE: no tok/s figure published here
Llama 4 Behemoth - The teacher model
- About 2T total parameters, 288B active
- Previewed by Meta as the teacher for Scout and Maverick
- Weights not released
- Not something you can run locally
To see how 17B active parameters can sit inside a 400B model, read our Mixture of Experts explainer.
Reading articles is good. Building is better.
Free account = the first chapter of all 25 courses, with a per-chapter AI tutor. No card.
Local Setup Guide
Step 1: Install Ollama
# macOS/Linux
curl -fsSL https://ollama.com/install.sh | sh
# Windows - download from ollama.com
Step 2: Pull Llama 4
# Scout (67GB download; needs ~80GB+ of RAM/VRAM/unified memory)
ollama pull llama4:scout
# Maverick (245GB download; workstation/server class)
ollama pull llama4:maverick
The explicit tags are llama4:17b-scout-16e-instruct-q4_K_M and llama4:17b-maverick-128e-instruct-q4_K_M; Q8_0 and FP16 builds are also listed (sizes below).
Step 3: Run and Test
ollama run llama4:scout
Test multimodal:
>>> Describe this image: /path/to/image.jpg
Then check where the model loaded:
ollama ps
# PROCESSOR shows how much is on GPU vs CPU
Step 4: Configure for Performance
Create a custom Modelfile:
cat > Llama4Modelfile << 'EOF'
FROM llama4:scout
# Keep the context modest: the KV cache comes on top of 67GB of weights
PARAMETER num_ctx 8192
PARAMETER temperature 0.7
PARAMETER top_p 0.9
SYSTEM "You are Llama 4, a helpful AI assistant with vision capabilities."
EOF
ollama create llama4-custom -f Llama4Modelfile
Smaller GPU, lots of RAM? llama.cpp can keep the MoE expert weights in system RAM while attention runs on the GPU:
# Keep all expert weights on the CPU side
llama-server -m Llama-4-Scout-17B-16E-Instruct-Q4_K_M.gguf -ngl 99 --cpu-moe -c 8192
# Or only the experts of the first N layers, if part of them fits in VRAM
llama-server -m Llama-4-Scout-17B-16E-Instruct-Q4_K_M.gguf -ngl 99 --n-cpu-moe 30 -c 8192
Hardware Requirements
VRAM Requirements
Download sizes from Ollama's llama4 tags (registry, November 2, 2026). Add a few GB for context.
| Model | Q4_K_M | Q5_K_M | Q8_0 | FP16 |
|---|---|---|---|---|
| Scout | 67GB | not offered by Ollama | 117GB | 217GB |
| Maverick | 245GB | not offered by Ollama | 428GB | 803GB |
| Behemoth | not released | not released | not released | not released |
Recommended Configurations
| Budget | GPU | Model | Performance |
|---|---|---|---|
| 16GB VRAM + 64GB RAM | RTX 4060 Ti 16GB | Scout Q4 with experts in RAM (--cpu-moe) | Runs; MoE, not measured |
| 16GB VRAM + 96GB RAM | RTX 4070 Ti Super 16GB | Scout Q4, more headroom for context | Runs; MoE, not measured |
| 24GB VRAM + 96GB RAM | RTX 4090 24GB | Scout Q4 (--n-cpu-moe, more experts on GPU) | Runs; MoE, not measured |
| 32GB VRAM + 128GB RAM | RTX 5090 32GB | Scout Q4 or Q8; Maverick does not fit | Runs; MoE, not measured |
Apple Silicon
| Mac | Memory | Best Model | Performance |
|---|---|---|---|
| M2 Pro 16GB | 16GB | Scout does not fit (67GB) | Use a dense model such as Gemma 3 or Llama 3.1 8B |
| M3 Pro 36GB | 36GB | Scout does not fit | Use a dense 14B-27B model |
| M3 Max 64GB | 64GB | Scout does not fit with room for the OS | Use a dense 32B or a smaller MoE (Qwen3 30B-A3B) |
| M3 Max 128GB | 128GB | Scout Q4 (67GB) | Runs; MoE, not measured |
Using Vision Capabilities
Image Analysis
import ollama
response = ollama.chat(
model='llama4:scout',
messages=[{
'role': 'user',
'content': 'What do you see in this image?',
'images': ['./chart.png']
}]
)
print(response['message']['content'])
Document Processing
# Analyze a PDF page as image
from pdf2image import convert_from_path
import ollama
pages = convert_from_path('document.pdf')
pages[0].save('page1.png', 'PNG')
response = ollama.chat(
model='llama4:scout',
messages=[{
'role': 'user',
'content': 'Extract and summarize the key information from this document.',
'images': ['page1.png']
}]
)
Code Understanding from Screenshots
response = ollama.chat(
model='llama4:scout',
messages=[{
'role': 'user',
'content': 'Explain what this code does and identify any bugs.',
'images': ['code_screenshot.png']
}]
)
Run this on your own machine and stop paying every month
Pay once and keep it. No renewal, no per-token bill, and nothing you feed it ever leaves your hardware.
Benchmark Results
All figures below are Meta's, from the Llama 4 model card (instruction-tuned models, 0-shot). We have not run them ourselves. Meta compares against its own earlier models, so that is the comparison shown.
Language Understanding
| Benchmark | Llama 4 Maverick | Llama 4 Scout | Llama 3.3 70B |
|---|---|---|---|
| MMLU Pro | 80.5 | 74.3 | 68.9 |
| GPQA Diamond | 69.8 | 57.2 | 50.5 |
| MGSM (multilingual math) | 92.3 | 90.6 | 91.1 |
Coding
| Benchmark | Maverick | Scout | Llama 3.3 70B |
|---|---|---|---|
| HumanEval | not in Meta's instruct table | not in Meta's instruct table | not in Meta's instruct table |
| LiveCodeBench (Oct 2024 - Feb 2025, pass@1) | 43.4 | 32.8 | 33.3 |
Vision
| Benchmark | Maverick | Scout | Llama 3.3 70B |
|---|---|---|---|
| MMMU | 73.4 | 69.4 | no image input |
| ChartQA | 90.0 | 88.8 | no image input |
| DocVQA (test) | 94.4 | 94.4 | no image input |
Integration Examples
LangChain Integration
from langchain_ollama import ChatOllama
llm = ChatOllama(
model="llama4:scout",
temperature=0.7
)
response = llm.invoke("Explain quantum computing simply")
print(response.content)
Open WebUI Setup
docker run -d -p 3000:8080 \
--add-host=host.docker.internal:host-gateway \
-v open-webui:/app/backend/data \
ghcr.io/open-webui/open-webui:main
Access http://localhost:3000 and select llama4:scout.
Llama 4 vs Competition
| Feature | Llama 4 Maverick | DeepSeek R1 | GPT-4o |
|---|---|---|---|
| License | Llama 4 Community License (open weights) | MIT (open weights) | Closed |
| Multimodal | Yes (image input) | No (text only) | Yes |
| Local Run | Yes, with 256GB+ memory | Yes, with ~400GB+ (or its small distills) | No |
| API Cost | Free locally | Free locally | Paid per token |
| Best For | General + Vision | Reasoning | Everything |
Key Takeaways
- Llama 4 brings image input to Meta's open-weight models
- MoE architecture keeps compute per token at 17B, but memory must hold the full 109B or 400B
- Scout is the realistic local model: 67GB at Q4, for 96-128GB machines or a GPU plus lots of RAM
- Maverick is workstation/server class at 245GB
- Vision benchmarks are strong on Meta's own card (DocVQA 94.4, ChartQA 90.0 for Maverick)
Next Steps
- Compare to DeepSeek R1 for reasoning tasks
- Understand MoE memory vs speed before buying hardware
- Size Llama 4 for your machine with the MoE calculator
- Build multimodal agents with Llama 4
- Set up RAG with vision-enhanced retrieval
- Pick hardware for large models
Llama 4 puts a strong multimodal model in open weights. With enough memory, Scout runs on a single high-capacity machine; for everyone else, its MoE design is the reason a GPU-plus-RAM setup can still run it.
Ollama’s running. Here’s what to build with it.
Go from “ollama run” to RAG apps, agents, and fine-tuned models — structured and hands-on. First chapter free.
Stop piecing Ollama together from blog posts
Ollama Mastery is 15 chapters end to end — install, model choice, Modelfiles, GPU offload, the API, and the 20 errors that actually happen. Plus 24 more courses.
Liked this? 25 full AI courses are waiting.
From fundamentals to RAG, agents, MCP servers, voice AI, and production deployment with real GitHub repos. First chapter free, every course.
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.
Want the structured version?
Hands-on courses on local AI, from $8.99 a month. The first chapter of each is free.
Keep going
Comments (0)
No comments yet. Be the first to share your thoughts!
