How to Run an AI Model on Your Own Computer with Ollama (Step by Step)

These steps come from Ollama's official docs (checked Oct 30, 2026). MetaPatchAI hasn't tested them.
Steps (do these first)
- Install Ollama.
- macOS / Windows: download the installer from https://ollama.com/download
- Linux: run
curl -fsSL https://ollama.com/install.sh | sh(this is the official install script) - Run a model. In a terminal, type
ollama run gemma4:e2b. Ollama's quickstart uses this example. It downloads the model the first time, then opens a chat prompt. Ollama's quickstart says the gemma4:e2b download is about 7.2 GB and recommends 8 GB of available VRAM (or unified memory on a Mac); larger context windows need more memory, and with less VRAM Ollama can fall back to system RAM, but responses may be slower. - Chat. Type your question at the prompt. Type
/byeto exit. - Manage your models.
ollama lsshows the models you've downloaded,ollama psshows which ones are running, andollama rm <model>deletes one (see the official CLI reference). - Use it from your own code. Ollama serves a local API at
http://localhost:11434/api(for example,/api/chat). It also has OpenAI-compatible endpoints athttp://localhost:11434/v1(/v1/chat/completions,/v1/responses) and an Anthropic-style/v1/messagesendpoint, all listed in the official docs (API introduction, OpenAI compatibility, Anthropic compatibility, checked Oct 30, 2026). - Pick a model that fits your hardware. Smaller tags such as
e2bare meant for lighter machines. Ollama's quickstart gives a memory figure only for gemma4:e2b (8 GB of available VRAM recommended); for other models, check the download size on the model's page in the Ollama library.
Confirmed / Not confirmed
Confirmed (official docs): the install methods, the Linux install command, the ollama run gemma4:e2b quickstart example, local API port 11434, and the /api and OpenAI-compatible /v1 endpoints.
Not confirmed: download sizes and memory needs for models other than gemma4:e2b, speed on any hardware, the exact list of CLI subcommands in the current version (check with ollama --help), and whether /bye behaves the same in every version.
Sources
- Primary: Ollama Quickstart: https://docs.ollama.com/quickstart
- Ollama CLI reference: https://docs.ollama.com/cli
- Ollama API introduction: https://docs.ollama.com/api/introduction
- Ollama download page: https://ollama.com/download
Related
Up: AI