Ollama is the easiest way to run large language models on your own computer: one installer, one command to download a model, and a local API that most AI apps can talk to. It is also easy to get wrong. The default context is small, models silently fall back to the CPU, and the models folder grows until your drive is full. I have written a separate deep guide for each of those jobs. This page puts them in order, gives you the short answer for each step, and links to the full walkthrough when you need it.
- Install: Windows
irm https://ollama.com/install.ps1 | iex, Linuxcurl -fsSL https://ollama.com/install.sh | sh, macOS: drag the app to Applications. - First model:
ollama run gemma4:e4bon an 8 GB GPU,ollama run qwen3.8:27bon 24 GB. - Check the GPU:
ollama ps. The PROCESSOR column should say 100% GPU. - Bigger context: set
OLLAMA_CONTEXT_LENGTH=32768, or/set parameter num_ctx 32768in the chat. - API:
http://localhost:11434, with native/api/chatand an OpenAI-style/v1/chat/completions. - Clean up:
ollama rm <model>deletes a model;ollama stop <model>only frees VRAM.
What Is Ollama?
Ollama is a free, open-source program that downloads, runs and serves local LLMs. Under the hood it uses llama.cpp to run GGUF models on NVIDIA, AMD and Apple GPUs (or the CPU), and it wraps that engine in a simple command line, a background service and an HTTP API on port 11434. You type ollama run plus a model name, and Ollama pulls the right file, loads it onto your GPU and opens a chat.
Why people use it instead of a cloud chatbot: it is private (prompts never leave your machine), it costs nothing per token, it works offline, and it plugs into coding assistants, chat front-ends and automation tools that expect an OpenAI-style API.
What it is not: Ollama does not make a model smarter than its size allows, and model tags ending in -cloud run on Ollama’s servers, not on your PC.
The Ollama Roadmap: Which Guide Do You Need?
| I want to… | Guide |
|---|---|
| Install Ollama and make sure it uses my GPU | Install Ollama on Windows, Mac and Linux + GPU fix |
| Run it in Docker with GPU support | Ollama in Docker with GPU |
| Know which model to download for my VRAM | Best Ollama models by VRAM |
| Understand Q4_K_M, Q8_0 and other quant names | GGUF quantization explained |
| Look up a command, Modelfile option or environment variable | Ollama commands cheat sheet |
| Call Ollama from Python, curl or an OpenAI SDK | Ollama API guide |
| Get a ChatGPT-style web interface | Open WebUI + Ollama setup |
| Free up disk space or remove Ollama | Delete models and uninstall Ollama |
| Keep models on another drive | Move Ollama models to another drive |
| Decide between Ollama, LM Studio and llama.cpp | Ollama vs LM Studio vs llama.cpp |
| Serve many users or batch requests | vLLM vs llama.cpp vs Ollama |
Step 1: Install Ollama
- Windows 10 22H2 or newer: run
irm https://ollama.com/install.ps1 | iexin PowerShell, or downloadOllamaSetup.exe. No admin rights are needed. NVIDIA users need driver 551.61 or newer. - macOS 14 Sonoma or newer: download the app and drag it into Applications. Apple silicon Macs use the GPU; Intel Macs run on the CPU only.
- Linux:
curl -fsSL https://ollama.com/install.sh | sh. It installs a systemd service that starts on boot. - Docker: the official image works with NVIDIA and AMD GPUs once the container toolkit is set up. See Ollama in Docker, which also includes an Open WebUI compose file.
Full steps, screenshots of what to expect and the GPU checks are in How to Install Ollama on Windows, Mac and Linux.
Step 2: Check Your Hardware
The rule that decides everything: the model file plus its context (KV cache) should fit in your GPU’s VRAM. If it does not, Ollama moves part of the model to system RAM, and speed drops sharply. A rough guide:
| VRAM | Comfortable model size (Q4_K_M) | Examples of cards |
|---|---|---|
| 8 GB | up to ~9-12B | RTX 4060, RTX 3060 Ti |
| 12 GB | up to ~14B | RTX 3060 12GB |
| 16 GB | ~14-24B fully, 27B with a little offload | RTX 5060 Ti 16GB, RTX 5080 |
| 24 GB | ~27-32B | RTX 4090, RTX 3090 |
| Mac unified memory | about 60-70% of total RAM | M-series Macs |
System RAM matters too, especially for big mixture-of-experts models that run partly on the CPU. See how much RAM you need for local AI. Intel Arc owners should read Intel Arc for local AI.
Step 3: Pick a Model
Short version from my best Ollama models list:
- 8 GB GPU:
mimo-v2.6:9bfor coding and agents,gemma4:12bfor chat and vision. - 12-16 GB GPU:
gemma4:12borgranite4.2:8bfully on the GPU;qwen3.8:27bwith a little CPU offload is the smartest model most people can run. - 24 GB GPU:
qwen3.8:27bas the all-rounder,gemma4:31bfor reasoning and maths. - 64-128 GB RAM: big MoE models such as
gpt-oss:120brun with CPU offload.
Any GGUF on Hugging Face also works directly: ollama run hf.co/USER/REPO-GGUF:Q4_K_M. If you are unsure which quant to pick, start with Q4_K_M; the GGUF guide explains the rest. Looking for a specific model family? I have walkthroughs for running DeepSeek locally and many others in the Local LLM category.
Step 4: Learn the Commands
You only need eight commands day to day:
| Command | What it does |
|---|---|
ollama run <model> |
Download (if needed) and chat |
ollama pull <model> |
Download or update a model |
ollama ls |
List downloaded models |
ollama ps |
Show loaded models and whether they are on the GPU |
ollama stop <model> |
Unload a model from memory |
ollama rm <model> |
Delete a model from disk |
ollama show <model> |
Show its parameters, template and licence |
ollama create <name> -f Modelfile |
Build a custom model with your own settings |
Slash commands inside the chat, Modelfile options, every environment variable and the API endpoints are in the Ollama commands cheat sheet.
Step 5: Settings That Matter
- Context length. Ollama’s default context is small on most GPUs, which is why long chats and documents “forget” things. Set
OLLAMA_CONTEXT_LENGTH=32768(or whatever fits your VRAM) as an environment variable, or/set parameter num_ctx 32768inside a chat. - KV cache quantization.
OLLAMA_KV_CACHE_TYPE=q8_0roughly halves the memory used by the context, with flash attention (automatic on supported GPUs). - Keep models loaded.
OLLAMA_KEEP_ALIVEcontrols how long a model stays in memory after the last request. - Listen on your network.
OLLAMA_HOST=0.0.0.0lets other devices reach the API. Only do this on a trusted network. - Models folder.
OLLAMA_MODELSmoves storage to another drive.
How to set these on each OS (Windows environment variables, launchctl on macOS, systemd overrides on Linux) is covered in the cheat sheet.
Step 6: Add a Chat Interface or Connect Apps
- Web chat: Open WebUI gives you a ChatGPT-style interface with history, documents and multiple users.
- Your own code: the Ollama API guide shows Python, curl and OpenAI-SDK examples against
http://localhost:11434. - Coding assistants: VS Code extensions such as Cline and Continue can point at Ollama. You can even route Claude Code to a local model with the Claude Code Router.
Step 7: Manage Storage
Models are big (a 27B model at Q4 is about 17 GB), and they add up fast. Default folders: Windows C:\Users\<you>\.ollama\models, macOS ~/.ollama/models, Linux service /usr/share/ollama/.ollama/models.
- Delete one model with
ollama rm <name>, or all of them with the one-liners in delete Ollama models and uninstall Ollama. - Move the whole library to a bigger drive with
OLLAMA_MODELS: move Ollama models to another drive. - The Windows uninstaller does not remove moved models or
%USERPROFILE%\.ollama; delete those by hand for a full clean-up.
Ollama vs LM Studio, llama.cpp and vLLM
Pick Ollama for one-command setup and a stable API that apps support. Pick LM Studio for a desktop app with a model browser and sliders, especially on a Mac (MLX models). Pick llama.cpp for full control over offload, multi-GPU splits and the newest models first. On the same GGUF and GPU, the three are usually within about 10% of each other, because Ollama and LM Studio use llama.cpp for GGUF. Settings matter more than the tool. Full comparison: Ollama vs LM Studio vs llama.cpp. For serving many users at once, see vLLM vs llama.cpp vs Ollama. LM Studio users with load errors can check LM Studio not loading models.
Common Problems and Fixes
| Problem | Likely cause | Fix |
|---|---|---|
ollama ps shows CPU or a CPU/GPU split |
Model + context too big for VRAM, or old driver | Smaller model or quant, smaller context, update the GPU driver; GPU fixes |
| Very slow replies | Partial CPU offload | Lower num_ctx, use OLLAMA_KV_CACHE_TYPE=q8_0, pick a model that fits |
| Model forgets earlier parts of a long chat | Small default context | Raise OLLAMA_CONTEXT_LENGTH |
| Apps on another device cannot connect | Ollama only listens on localhost | Set OLLAMA_HOST=0.0.0.0 and restart |
| Drive full | Old models still on disk | ollama rm or move the folder |
| Env variable has no effect | Ollama not restarted, or set for the wrong user/service | Quit Ollama from the tray (Windows/Mac) or systemctl restart ollama (Linux) |
Frequently Asked Questions
Is Ollama free?
Yes. Ollama is free and open source, and local models cost nothing to run beyond electricity. Only the optional -cloud models use Ollama’s paid servers.
Does Ollama need a GPU?
No, but it is much faster with one. Small models (1-4B) run acceptably on a modern CPU; anything bigger really wants an NVIDIA, AMD or Apple silicon GPU.
Is Ollama private?
Local models run entirely on your machine, so prompts and files stay on it. Cloud model tags send requests to Ollama’s servers.
Where does Ollama store models?
In .ollama/models in your user folder on Windows and macOS, and /usr/share/ollama/.ollama/models for the Linux service, unless OLLAMA_MODELS points elsewhere.
Which model should I start with?
gemma4:e4b on 8 GB cards and qwen3.8:27b on 24 GB cards are safe first picks. See the best Ollama models list for more.
Can Ollama run Hugging Face GGUF files?
Yes: ollama run hf.co/USER/REPO-GGUF:Q4_K_M, or import a local file with a Modelfile.
Final Thoughts
Install it, run one model that fits your VRAM, check ollama ps says GPU, then raise the context to what you actually need. That covers most of what makes Ollama feel fast and reliable. When you want more, add Open WebUI for a proper interface or the API for your own tools. I keep this page updated as I add Ollama guides, so bookmark it.




