What Ollama is
Ollama is an open source program, under the MIT license according to its GitHub page, that downloads open AI models and runs them on your own machine. An open model is one whose weights you can download, the large files that hold what the model learned. Ollama is built on llama.cpp, the open source engine that also runs GGUF model files inside LM Studio.
It runs on Windows, macOS and Linux, from a terminal or from a desktop app. Behind both sits a small server on your computer at 127.0.0.1:11434, and the ollama command talks to it. Running local models is free and needs no account. The FAQ says Ollama does not see your prompts or data for them. Cloud models are the exception: they run on ollama.com and need a sign-in.
What Ollama is good for
- A private chat with an open model:
ollama run gemma4:e2b, the model the quickstart starts with, opens a chat in the terminal. - One question, one answer: put a prompt in quotes after the model name and Ollama prints a single answer, which suits scripts.
- Reading pictures: with a model that accepts images, write the file path inside the prompt and ask what the picture shows.
- A local API for your own programs: the server at
127.0.0.1:11434answers requests from curl, Python or any app that can call it. - Text turned into numbers:
ollama run embeddinggemma "Hello world"prints the list of numbers a search tool compares. - Local models for coding agents:
ollama launchsets up OpenCode, Claude Code, Codex, VS Code or Droid against your own server, as the CLI reference lists. - Models from Hugging Face:
ollama run hf.co/{username}/{repository}runs a GGUF repository from the Hub, as Hugging Face's Ollama page describes.
When to use Ollama, and when to pick another tool
Ollama fits when you want a model on your own hardware. When you want the strongest model available, a hosted assistant wins, because the largest models do not fit on a typical computer.
| Your job | Use Ollama? | Or try |
|---|---|---|
| Chat with an open model on your own computer, with no account | Yes, it needs one pull and one run | LM Studio, if you prefer an app with its own window |
| Keep prompts and files off a cloud service | Yes, for local models | Nothing else needed |
| Get the best answers from the largest models | Not on a modest machine, memory runs out first | ChatGPT, Claude, Gemini or DeepSeek |
| Try a model you found on Hugging Face | Yes, when the repository holds GGUF files | Hugging Face, to browse models and read their cards |
| Give your own program a model to call | Yes, through the local server | Hugging Face inference providers, for models too big to run at home |
| Run a coding agent on a local model | Yes, ollama launch sets it up | Claude Code with Anthropic's own models |
How to use Ollama, step by step
Install Ollama first with the one-line command in lesson 1. The five pictures below show what the commands printed on a Windows PC, in order.
Open a new terminal and run
ollama -v. A line that starts with ollama version means Ollama is installed and the terminal can find the command.
Run
ollama pull gemma4:e2bto download a first model, about 7.2 GB, thenollama lsto list the models on your disk. The computer in the pictures already heldqwen2.5:7b, so they show that model. Typegemma4:e2bwherever they show it.
Ask one question without opening a chat:
ollama run gemma4:e2b "Why is the sky blue?". The first answer waits while Ollama loads the model. Leave out the quoted prompt and you get a>>>chat prompt instead, where/byeends the chat.
Run
ollama psstraight afterwards. It lists the models held in memory. The PROCESSOR column says where each one runs, and here it reads96%/4% CPU/GPU, so most of the model sits in system RAM. The last column counts down to when Ollama unloads it.
Free the memory with
ollama stop gemma4:e2b, which prints nothing. A secondollama psthen shows only its header row, so no model is loaded.
Real output of Ollama 0.40.14 on Windows, shown in a terminal frame, taken on 6 November 2026.
The tutorials at the top of this page show these steps on screen. The Windows and macOS installs also include a desktop app, which the Sam Witteveen video covers.
An example to try
These four lines download the quickstart's first model, ask it one question, show where it sits in memory and unload it. The download is large, so start it on a connection you can leave running.
ollama pull gemma4:e2b
ollama run gemma4:e2b "Why is the sky blue?"
ollama ps
ollama stop gemma4:e2b- The answer is a short explanation in plain text. Which model wrote it decides the wording, so yours will differ from the picture.
- The first
ollama pslists the model with a PROCESSOR value such as100% GPU, or a split like48%/52% CPU/GPUwhen part of it did not fit on the card. - The second
ollama ps, after the stop, prints only its header row.
Tips for better results
- Read the size column in Ollama's library before you pull. The gemma4 page lists tags from
e2bup to31b, and the larger ones need far more memory. - Start with a small tag and move up while
ollama psstill shows100% GPU. - Closing the chat does not free memory. Ollama keeps a model loaded for 5 minutes, so run
ollama stopbefore a game or a video export. - To move the model files to a bigger drive, set
OLLAMA_MODELSto the new folder and restart Ollama. - For a long document, raise the context with
OLLAMA_CONTEXT_LENGTHor the slider in the app settings.
Limits to know
- The quickstart's first model wants about 8 GB of free VRAM. With less, part of it runs from system RAM and answers slow down. The hardware lesson works out what fits your machine.
- Cloud models are not local. They need
ollama signin, they run on Ollama's servers and the FAQ says prompts sent to them are processed there. - Local requests need no API key. Setting
OLLAMA_HOST=0.0.0.0:11434with no firewall rule lets anyone who reaches the port use your models. - Deleting a model with
ollama rmis final. It has to be pulled again, download and all.
Learn more about Ollama
- 1Ollama tutorial: run AI models on your own computerAn Ollama tutorial for Windows, macOS and Linux: install it, download and chat with a first local model, then list, stop and remove models and move their files.
- 2Ollama API: call a local model from your codeCall a local model from code with the Ollama API: /api/generate and /api/chat with curl and Python, streaming, the OpenAI-compatible endpoint and a Modelfile.
- 4Local LLM hardware requirements: how much VRAM a model needsLocal LLM hardware requirements, worked out: how parameters and GGUF quantization set a model size, how much VRAM it needs, and what CPU, GPU or a Mac changes.
Frequently asked questions
Is Ollama free?
Yes for local models. The program is open source under the MIT license, and running a model on your own computer costs nothing and needs no account. Cloud models run on ollama.com and need a sign-in, so check Ollama's own pages for their terms.
Does Ollama work offline?
Yes, once a model is on disk. Pulling a model needs the internet, but a local model answers with the network cable out. Cloud models are the exception, since they run on ollama.com.
Do I need a graphics card to run Ollama?
No. A graphics card helps, but without enough video memory Ollama keeps part of the model in system RAM and answers arrive more slowly. Run ollama ps and read the PROCESSOR column to see the split.
Where does Ollama store its models?
On macOS in ~/.ollama/models, on Linux in /usr/share/ollama/.ollama/models and on Windows in C:\Users\%username%\.ollama\models. Set OLLAMA_MODELS to a roomier folder and restart Ollama to move them.
How do I stop Ollama using my memory?
Run ollama stop with the model name. Ollama otherwise keeps a model loaded for 5 minutes after its last request, and OLLAMA_KEEP_ALIVE changes that wait for every model.
Can Ollama run a model from Hugging Face?
Yes, when the repository holds GGUF files. Run ollama run hf.co/{username}/{repository} and add a tag such as :Q8_0 to pick a quantization. Without a tag, Ollama takes Q4_K_M when the repository has it.
What is the difference between Ollama and LM Studio?
Both run open models on your own computer, and both can run GGUF files through llama.cpp. Ollama is driven by commands and a small local server, with an app on Windows and macOS. LM Studio is an app with its own window. The LM Studio page covers it.
Sources
- Ollama Docs: Quickstart https://docs.ollama.com/quickstart
- Ollama Docs: CLI reference https://docs.ollama.com/cli
- Ollama Docs: FAQ https://docs.ollama.com/faq
- GitHub: ollama/ollama https://github.com/ollama/ollama
- Ollama library: gemma4 https://ollama.com/library/gemma4
- Hugging Face Docs: Use Ollama with any GGUF model on the Hub https://huggingface.co/docs/hub/ollama




