Best Free Local AI Models to Run 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.
Published November 6, 2025 · Updated August 2026 · 12 min read
Ten free, open-weight models cover almost everything people run locally: Llama 3.1 8B for general work, Mistral 7B for speed, Phi-3 Mini when you only have 4 GB of RAM, Gemma 2 9B for analysis, and CodeLlama 13B or DeepSeek Coder for programming. Each one installs with a single ollama pull command — no account, no API key, no subscription — and runs fully offline. Which one is right for you is settled by how much RAM you have, and that is arithmetic you can do in ten seconds (formula below).
Which free local AI model should you install first?
Ten models, the exact command to install each, and the weight footprint computed from the parameter count. Nothing here costs money, and nothing here needs an internet connection once the download finishes.
| # | Model | Params | Weights at Q4_K_M | Practical RAM | Best for | Install command |
|---|---|---|---|---|---|---|
| 1 | Llama 3.1 8B | 8.0B | ~4.8 GB | 8 GB | General use, first install | ollama pull llama3.1:8b |
| 2 | Mistral 7B v0.3 | 7.2B | ~4.3 GB | 8 GB | Fast replies, summaries | ollama pull mistral:7b-instruct-v0.3 |
| 3 | Phi-3 Mini | 3.8B | ~2.3 GB | 4 GB | Old laptops, 4 GB machines | ollama pull phi3:mini |
| 4 | Gemma 2 9B | 9.2B | ~5.5 GB | 8 GB | Analysis, longer reasoning | ollama pull gemma2:9b |
| 5 | Qwen 2.5 7B | 7.6B | ~4.6 GB | 8 GB | Multilingual, code | ollama pull qwen2.5:7b |
| 6 | CodeLlama 13B | 13B | ~7.8 GB | 16 GB | Programming | ollama pull codellama:13b |
| 7 | DeepSeek Coder 6.7B | 6.7B | ~4.0 GB | 8 GB | Code completion on 8 GB | ollama pull deepseek-coder:6.7b |
| 8 | Solar 10.7B | 10.7B | ~6.4 GB | 16 GB | Long-form analysis | ollama pull solar |
| 9 | Vicuna 13B | 13B | ~7.8 GB | 16 GB | Conversational style | ollama pull vicuna:13b |
| 10 | OpenHermes 2.5 | 7.2B | ~4.3 GB | 8 GB | Structured / instruction output | ollama pull openhermes |
The "Weights at Q4_K_M" column is computed, not measured — the formula is in the next section. Ollama's model library lists the exact download size for every tag if you want the byte-accurate figure before you pull.
If you are choosing blind: install Llama 3.1 8B. It is the most widely used general-purpose open model, it fits in 8 GB, and every guide, quantization and integration on this site assumes it works. Swap later once you know what you actually do with it.
Quick Start Checklist
- • Install Ollama from ollama.com
- • Download a model: `ollama pull llama3.1:8b`
- • Start chatting: `ollama run llama3.1:8b`
- • Check our GPU guide if you want to move off CPU inference
Reading articles is good. Building is better.
Free account = the first chapter of all 25 courses, with a per-chapter AI tutor. No card.
How much RAM does each free model need?
You do not need a chart for this. Quantized weights are roughly linear in parameter count, and at Q4_K_M — the default quantization Ollama pulls for most tags — the rule of thumb is:
weights in GB ≈ 0.6 × (parameters in billions)
then add ~1-2 GB for the KV cache at a 4K-8K context,
plus whatever your operating system is already using.
Worked examples, so you can check the arithmetic:
| Model | Params | 0.6 × params | Practical system RAM |
|---|---|---|---|
| Phi-3 Mini | 3.8B | 2.3 GB | 4 GB |
| DeepSeek Coder 6.7B | 6.7B | 4.0 GB | 8 GB |
| Mistral 7B | 7.2B | 4.3 GB | 8 GB |
| Qwen 2.5 7B | 7.6B | 4.6 GB | 8 GB |
| Llama 3.1 8B | 8.0B | 4.8 GB | 8 GB |
| Gemma 2 9B | 9.2B | 5.5 GB | 8 GB |
| Solar 10.7B | 10.7B | 6.4 GB | 16 GB |
| CodeLlama 13B | 13B | 7.8 GB | 16 GB |
| Phi-4 | 14B | 8.4 GB | 16 GB |
| DeepSeek Coder 33B | 33B | 19.8 GB | 32 GB |
The "practical system RAM" column is the next common memory tier above weights + cache + OS. It is guidance, not a hard floor: a model can run in less if you shorten the context or drop to a harsher quant, and it will run badly if the weights spill to disk.
Heavier quants change the multiplier, not the method. Q8_0 is roughly 1.0 GB per billion parameters, Q5_K_M about 0.7, Q3_K_M about 0.5. Our quantization comparison covers what you give up at each step.
How fast will these models run on your hardware?
Generating one token requires reading every weight once, so throughput has a hard arithmetic ceiling:
tokens/sec ceiling = memory bandwidth (GB/s) ÷ model size (GB)
That is an upper bound, not a prediction. Real output lands well below it — prompt processing, sampling, context growth and background load all take time — but the ceiling tells you instantly whether a model is viable on a machine. If the ceiling is 6 tok/s, no amount of tuning makes that model feel interactive.
Where the bandwidth column comes from: the GPU and Apple rows are the vendors' published memory specifications. The DDR rows are computed from the JEDEC data rate, MT/s × 8 bytes per channel × number of channels — so DDR4-3200 in dual channel is 3200 × 8 × 2 = 51.2 GB/s, and DDR5-5600 in dual channel is 89.6 GB/s. Every tok/s cell is then just bandwidth ÷ model size. It is all arithmetic, not a benchmark run.
| Memory / GPU | Bandwidth (vendor spec) | Phi-3 Mini (2.3 GB) | Llama 3.1 8B (4.8 GB) | CodeLlama 13B (7.8 GB) |
|---|---|---|---|---|
| DDR4-3200, dual channel | 51.2 GB/s | ≤22 tok/s | ≤11 tok/s | ≤7 tok/s |
| DDR5-5600, dual channel | 89.6 GB/s | ≤39 tok/s | ≤19 tok/s | ≤11 tok/s |
| Apple M4 (base) | 120 GB/s | ≤52 tok/s | ≤25 tok/s | ≤15 tok/s |
| NVIDIA RTX 3060 12GB | 360 GB/s | ≤156 tok/s | ≤75 tok/s | ≤46 tok/s |
| NVIDIA RTX 4090 | 1008 GB/s | ≤438 tok/s | ≤210 tok/s | ≤129 tok/s |
Two things fall straight out of this table. First, GPU offload is worth far more than a faster CPU — the gap between system RAM and GDDR6X is roughly an order of magnitude. Second, on a CPU-only box the smaller model is not a compromise, it is the only interactive option. That is why Phi-3 Mini keeps its place in the list.
For the bandwidth number for your specific card, see our GPU memory bandwidth guide; if things are slower than the ceiling suggests they should be, why local LLMs run slow walks the usual causes.
What is each free model actually good at?
1. Llama 3.1 8B — the default choice
Install: ollama pull llama3.1:8b
Meta's Llama 3.1 8B is the most-pulled general-purpose open model, which matters more than it sounds: tooling, quantizations, fine-tunes and troubleshooting answers all exist for it first. Released under Meta's Llama 3.1 Community License, which permits commercial use below 700M monthly active users.
- RAM: 8 GB · Storage: ~4.8 GB · GPU optional
- Good for: writing, summarizing, general Q&A, light coding
- Full breakdown in our 8 GB RAM model guide
2. Mistral 7B v0.3 — smallest model that still feels general
Install: ollama pull mistral:7b-instruct-v0.3
Mistral 7B is Apache 2.0 — the most permissive licence of anything in this list, with no user-count clause and no acceptable-use rider. v0.3 added a larger vocabulary and function-calling support over v0.2. Slightly smaller than Llama 3.1 8B, so its bandwidth ceiling is slightly higher on the same machine.
3. Phi-3 Mini — the 4 GB option
Install: ollama pull phi3:mini
Microsoft's Phi-3 Mini is 3.8B parameters under an MIT licence, trained on a heavily filtered "textbook quality" corpus rather than raw web scrape. At ~2.3 GB quantized it is the only model here with a usable ceiling on DDR4 laptops and older desktops.
4. Gemma 2 9B — Google's open-weight model
Install: ollama pull gemma2:9b
Gemma 2 9B uses interleaved local/global attention and knowledge distillation from a larger teacher model. Distributed under Google's Gemma Terms of Use — free for commercial use, but with a use-restriction policy attached, so read it if you are shipping a product.
5. Qwen 2.5 7B — multilingual and code-capable
Install: ollama pull qwen2.5:7b
Alibaba's Qwen 2.5 7B is Apache 2.0 and documented for 29 languages. The Qwen family also ships coder and math variants at the same size, so you can swap specialization without changing your RAM budget. Newer generation: our Qwen 3 setup guide.
6. CodeLlama 13B — code-specialized
Install: ollama pull codellama:13b
CodeLlama 13B is Llama 2 further-trained on code, with infilling support that makes it usable for editor autocomplete rather than just chat. Needs 16 GB. Pair it with Continue.dev for an in-editor assistant.
7. DeepSeek Coder 6.7B — code on an 8 GB machine
Install: ollama pull deepseek-coder:6.7b
DeepSeek Coder 6.7B is trained on a code-heavy corpus with repository-level context, and its 33B sibling exists if you have 32 GB to spend on it. The 6.7B is the practical pick when CodeLlama 13B will not fit.
8. Solar 10.7B — depth up-scaled 10.7B
Install: ollama pull solar
Upstage's Solar 10.7B was built by depth up-scaling a 7B base — duplicating and re-training layers rather than training a larger model from scratch. Apache 2.0.
9. Vicuna 13B — conversational fine-tune
Install: ollama pull vicuna:13b
Vicuna 13B is LMSYS's Llama 2 fine-tune on shared conversation data. Older than everything else here; kept in the list because its chat style is distinctive and a lot of existing prompts assume it.
10. OpenHermes 2.5 — instruction and structured output
Install: ollama pull openhermes
OpenHermes 2.5 is a Mistral 7B fine-tune aimed at instruction following and structured (JSON-shaped) responses. Same RAM footprint as base Mistral.
For the ranked, task-by-task view across the whole Ollama library, see our best Ollama models roundup.
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.
What do free local models save against paid AI subscriptions?
The comparison is only honest as arithmetic on published list prices. ChatGPT Plus and Claude Pro both list at $20/month; GitHub Copilot Pro lists at $10/month. Multiply by twelve:
| Subscription | List price | Annual | Local alternative |
|---|---|---|---|
| ChatGPT Plus | $20/mo | $240/yr | Llama 3.1 8B |
| Claude Pro | $20/mo | $240/yr | Gemma 2 9B or Mistral 7B |
| GitHub Copilot Pro | $10/mo | $120/yr | CodeLlama 13B or DeepSeek Coder |
| All three | $50/mo | $600/yr | $0 in licence fees |
Check the vendors' current pricing before quoting those figures anywhere — they move.
What that table does not include is electricity and hardware. A local model is free to licence, not free to run, and a frontier cloud model is still better at hard reasoning than an 8B running on your laptop. The honest case for local is privacy, offline availability, no rate limits and no per-token meter — see local AI vs ChatGPT on cost for the full comparison.
How do you install a free model with Ollama?
1. Install Ollama
# macOS / Linux
curl -fsSL https://ollama.com/install.sh | sh
# Windows: download the installer from ollama.com
2. Pull a model
ollama pull llama3.1:8b
3. Run it
ollama run llama3.1:8b
That is the whole flow. Windows users who want the step-by-step version have our Ollama Windows installation guide; if you would rather have a browser chat interface than a terminal, set up Open WebUI.
Housekeeping worth knowing on day one:
ollama listshows what you have downloaded and how much disk it usesollama rm <model>deletes one — models are large, this mattersollama psshows what is currently loaded in memory- Set
OLLAMA_KEEP_ALIVEto control how long a model stays resident after a request
How do you pick a model for your machine?
Start with your RAM, not with a ranking. Run the 0.6 × parameters calculation above against what you actually have free, and the shortlist writes itself.
- 4 GB RAM: Phi-3 Mini. It is the list.
- 8 GB RAM: Llama 3.1 8B for general use, Mistral 7B if you want faster replies, DeepSeek Coder 6.7B for code.
- 16 GB RAM: anything up to 13-14B. CodeLlama 13B for programming, Solar 10.7B or Gemma 2 9B with a long context.
- 32 GB RAM or a 24 GB GPU: DeepSeek Coder 33B and the 30B-class general models. See what a 24 GB card actually holds in our RTX 3090 local AI guide.
Second question: CPU or GPU. Every model here runs on CPU, and the bandwidth table shows exactly what that costs you. If you are on CPU only, stay at 8B or below and expect single-digit to low-double-digit tokens per second.
Frequently asked questions
Are these models really free?
Yes, all ten are free to download and run. "Free" is not the same as "unrestricted", though — Mistral 7B, Qwen 2.5 and Solar are Apache 2.0 with no strings; Phi-3 Mini is MIT; Llama 3.1 and CodeLlama carry Meta's Community License with a 700M-monthly-active-user threshold; Gemma 2 carries Google's use policy. Read the licence text on the model's Hugging Face card before you build a product on one.
How do these compare to ChatGPT?
An 8B model running on your laptop is not a frontier model and will not match one on hard reasoning, long-context work or breadth of world knowledge. What it does match is availability: no rate limits, no per-token cost, no outage, and nothing sent to a third party. For drafting, summarizing, reformatting, code completion and Q&A over your own files, that trade is usually worth it.
Do I need a GPU?
No. All ten run on CPU. The throughput formula above tells you what to expect: divide your memory bandwidth by the model size. A GPU raises the ceiling roughly tenfold because GDDR6X bandwidth is roughly ten times dual-channel DDR5 — it is not a small difference, but it is not a requirement either.
Can I run several models at once?
You can install as many as your disk allows and switch instantly. Running them simultaneously is limited by memory — each loaded model holds its full weights resident. Use ollama ps to see what is loaded and OLLAMA_KEEP_ALIVE to unload idle models.
Which quantization should I download?
Q4_K_M unless you have a reason not to. It is Ollama's default for most tags and the best quality-per-gigabyte point in common use. Go to Q5_K_M or Q8_0 if you have memory to spare and want fewer errors; drop to Q3 only when the alternative is not running the model at all.
Your next steps
- Browse the best Ollama models — ranked by task
- Set up Open WebUI — a browser chat interface for your models
- Install your first local AI — complete beginner walkthrough
- Understand quantization — why models come in different sizes
- Set up AI coding — a free in-editor assistant
- Try GPT-OSS — OpenAI's open-weight release
- Run Llama 4 Scout — Meta's MoE with a very long context window
- Run Qwen3-Coder locally — the coding-specialized Qwen
- Set up Qwen 3 locally — full install for Alibaba's newer flagship
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
- PILLARBest Ollama Models 2026: 15 Ranked (Coding, Reasoning, Chat)
- AI on Steam Deck: Run Local LLMs with Ollama on SteamOS
- Air-Gapped AI Deployment: Install Ollama With No Internet
- Best Ollama Embedding Models Compared for Local RAG
- Best Ollama Models for 8GB RAM 2026: 12 Tested Local Picks
- Best Ollama Models for AI Agents 2026: Ranked by Tool Use
- Best Uncensored Local LLMs: Abliterated Ollama Models
- Browser-Use + Ollama: A Local Web-Browsing Agent
- Build a Local AI Slack & Discord Bot with Ollama + Python
- Build a Local RAG Pipeline: Ollama + ChromaDB Step-by-Step
Comments (0)
No comments yet. Be the first to share your thoughts!