How to Use Ollama: Run AI Models Locally on Your PC
2026.12.01
Here is how to use Ollama in short: install it with one PowerShell command, pick a model whose download size fits in your graphics card's memory, and chat with it in the Ollama app or with ollama run in the terminal. Local models are free and unlimited, your prompts never leave your computer, and once a model is downloaded it even works offline. This guide covers the install, choosing a model, the app, the commands you'll use every day, your own assistant with a Modelfile, the settings that matter and the local API.
Shown with Ollama 0.40.17 on Windows 11 (November 2026). Model names and sizes change often, so check the library before you download.
Go to ollama.com/download. Windows is already selected, and the page gives you a single command. Open PowerShell from the Start menu, paste it and press Enter:
irm https://ollama.com/install.ps1 | iex
The script downloads the official installer, checks its signature and installs Ollama for your user account. You don't need administrator rights. Prefer a classic installer? Click Download manually to get OllamaSetup.exe, or use winget. All three give you the same thing.
winget install Ollama.Ollama
When it's done, check the version:
ollama --version
Ollama now runs quietly in the background, with a little llama in your system tray. Your models live in a hidden folder inside your user folder, C:\Users\YOUR-NAME\.ollama\models. Models are big, so remember where that is.
This is the one decision that matters most. The rule: the model's download size should fit in your graphics card's memory (VRAM), with a little room to spare. If it doesn't fit, Ollama spills over into normal RAM and the processor. That still works, but it's much slower.
Get 50% off on your first month with Stockimg AI Pro
AI Design Tool
50% off first month
All In One AI Design Tool
Faster than any designer
All models in one place
Nano Banana, Flux, Kling...
No design skills needed
Create with AI
Special Offer
Get 50% off on your first month with Stockimg AI Pro
AI Design Tool
50% off first month
qwen3.8:27b (18 GB)
On ollama.com/library every model lists its sizes, plus small tags for what it can do:
vision: it understands images.
tools: it can work with agents.
thinking: it reasons step by step before it answers.
Click a model and then View all to see longer tags with parts like Q4_K_M or Q8. Those are compression levels: smaller numbers mean smaller files and slightly lower quality. The default tags are a good balance, so start there.
Open the Ollama app from the Start menu. It opens on the Apps page; click Chat in the sidebar.
The model picker sits next to the message box. Recommended models are at the top. Ones with a cloud icon run on Ollama's servers; ones with a download arrow run on your own PC. Search for a model, for example qwen3.5:4b, pick it and type a message like "Plan a three day trip to Lisbon on a small budget."
The first time you use a model, the app downloads it right in the chat. That's a one-time wait; after that it loads in seconds. Every chat is saved in the sidebar under Today, and clicking Chat again starts a fresh one.
To prove it's local, turn off Wi-Fi and ask another question. It still answers. The globe button next to the model adds web search; that one does go online and needs an Ollama account.
Images and thinking. Qwen 3.5 has the vision tag, so you can drag an image from File Explorer into the message box or paste one with Ctrl + V, then ask "What can I cook tonight with this?" If a model can't handle images, the app says "This model does not support images". Thinking models show a line like "Thought for 9.2 seconds" above the answer; click it to read the reasoning. Thinking helps with math and logic, but takes a little longer.
The real power of Ollama is the command line. Open a terminal.
ollama pull gemma4:12b
ollama run qwen3.5:4b
ollama pull downloads a model without starting it. Always add the size after a colon. ollama run starts a chat in the terminal; type /bye when you're done. Inside that chat, /? lists the commands, and three quote marks (""") let you paste text with several lines.
Put the prompt right after the model name for one-shot answers (handy in scripts), and add --verbose to see the speed in tokens per second:
ollama run qwen3.5:4b "Explain what a context window is in two short sentences." --verbose
With thinking models the reasoning streams first. Add --hidethinking to see only the answer, or --think=false to turn reasoning off. To use an image in the terminal, put its path in the prompt:
ollama run qwen3.5:4b "What is in this image? C:\Users\YOUR-NAME\Pictures\photo.jpg"
Managing models:
ollama list
ollama ps
ollama stop qwen3.5:4b
ollama show qwen3.5:4b
ollama rm gemma4:12b
ollama list shows every model you've downloaded, with its size.
ollama ps shows what's loaded right now and whether it runs on the GPU or the CPU.
A model stays in memory for five minutes after you use it. ollama stop frees that memory right away.
ollama show prints a model's details, like its context size and capabilities.
In any folder, create a text file called Modelfile with no extension:
FROM qwen3.5:4b
PARAMETER temperature 0.3
SYSTEM """You are Chef Remy, a friendly cooking helper.
Always answer in three short, numbered steps."""
FROM is the base model. A temperature of 0.3 gives focused answers. SYSTEM holds your instructions. You can also set the context size here with PARAMETER num_ctx 8192. To learn from other models, ollama show --modelfile prints the Modelfile of any model you have.
ollama create chef -f Modelfile
ollama run chef
ollama create reuses the base model's files, so it only takes a few seconds. Your new model follows the instructions every time, and it shows up in the app's model picker too.
Context length is how much of the conversation the model can remember. With less than 24 GB of video memory, Ollama starts at only 4k tokens. For long documents or coding agents, Ollama recommends at least 64k. More context needs more memory. Drag the slider, and a small Saved badge confirms it; the new size is used the next time a model loads. Inside a terminal chat you can also type /set parameter num_ctx 8192.
Model location moves your models to a bigger drive: click Browse and pick a folder.
Expose Ollama to the network lets other devices use this Ollama. Leave it off unless you need it.
Cloud turns cloud models and web search on or off.
To check a change worked, run ollama ps. The CONTEXT column shows the size the model actually got.
Ollama runs a local server at http://localhost:11434. Open it in your browser and it says "Ollama is running". Any program can send it requests. In PowerShell:
Invoke-RestMethod http://localhost:11434/api/chat -Method Post -Body '{"model":"qwen3.5:4b","messages":[{"role":"user","content":"Say hello in one sentence."}],"stream":false,"think":false}'
"stream":false returns the whole answer at once. Leave it out and the reply arrives piece by piece.
Ollama also speaks the OpenAI format. In any tool or library made for OpenAI, set the base URL to http://localhost:11434/v1 and the API key to any text, like ollama. It's required but ignored. That means a huge number of existing apps and code samples work with your local models.
If your PC is too small for the model you want, cloud models run on Ollama's servers with nothing downloaded. Their names end in :cloud:
ollama signin
ollama run gemma4:cloud
Cloud usage needs an Ollama account and is paid per token or with a plan (Pro was 20 dollars a month in November 2026, with usage credits). Local models stay free and unlimited. To keep everything on your PC, switch Cloud off in Settings.
To start a coding agent on a local model, ollama launch claude --model qwen3.5 points the app at your model and starts it. Type ollama launch alone to pick an app and model from a menu. Agents need the bigger context length.
Slow answers? Run ollama ps. Anything less than 100% GPU means the model is too big for your card. Pick a smaller size.
Always use a size tag. Without one you get the default version, which may be bigger than you expect: qwen3.5 without a tag is twice the size of the 4B version.
Watch your disk space. Delete models you don't use with ollama rm.
Stay up to date. Ollama downloads updates by itself. Click the llama in the system tray and choose Restart to update. New models often need the latest version.
Bonus: Ollama starts with Windows. To stop that, open Task Manager → Startup apps → Ollama → Disable.
Pick a model whose download size fits in your graphics card memory with some room to spare, for example qwen3.5:4b (3.3 GB) on an 8 GB card. Bigger models still run, but spill into normal RAM and the CPU, which is much slower.
The default context length is 4k tokens on cards with less than 24 GB of memory. Raise it in Settings → Context length (64k is recommended for agents and coding tools), if your memory allows.