How to download and run a model with Ollama
Ollama installed and running. Run `ollama list` to confirm the service is responsive before proceeding.
What this does
This guide pulls a language model from the Ollama library and runs an inference session interactively. After completion, prompts sent to the model return generated responses locally with no network dependency for inference.
Steps
Pull a model from the Ollama library. The pull command downloads the model files and registers the model locally. Smaller models like
llama3.2:1bare fastest to download.ollama pull llama3.2:1bExpected output:
pulling <manifest>followed by progress bars for each layer, ending insuccess.Confirm the model is available locally. The model is now registered and can be invoked without a network connection.
ollama listExpected output: Table listing the model name, ID, size, and modification date. Example row:
llama3.2:1b a48c9... 1.3GB 2026-05-29.Run an interactive inference session. This command opens a prompt loop in the terminal.
ollama run llama3.2:1bExpected output: A
>>>prompt appears. Type a question and press Enter. The model returns a generated response.Exit the interactive session. Type
/byeand press Enter to terminate cleanly./byeExpected output: Session terminates and returns to the shell prompt.
Verification
ollama run llama3.2:1b "What is 2+2?"
# Expected: A numerical or textual answer containing "4"
Common failures
- Model pull fails with connection error — Network issue reaching the model registry. Check internet connectivity and DNS resolution for
ollama.com. - Out of disk space during pull — Model download requires temporary space. Free at least the model's size plus 500 MB before retrying.
- Out of memory during inference — Model too large for available RAM. Choose a smaller model variant (e.g.,
1binstead of70b) or close other memory-intensive applications. ollama runhangs with no response — GPU drivers may not be recognized. Check withollama listfirst, then restart the Ollama service withsystemctl restart ollama.- Model not found after pull — Pull may have been interrupted. Re-run
ollama pull <model-name>to complete the download.