Local language models need working memory as well as disk space. Ollama loads an installed model when a prompt arrives, then returns its answer to the terminal.
A one-shot prompt suits quick questions and terminal scripts because the CLI returns to the shell after the reply. The model name includes its tag, so similarly named downloads can refer to different model sizes.
The first request can take longer while the model loads into memory. By default, Ollama keeps it loaded for five minutes after a request so another prompt can reuse it without loading the weights again.
Steps to run a model in Ollama:
- List the models installed on the Ollama server.
$ ollama list NAME ID SIZE MODIFIED granite3.2-vision:2b 3be41a661804 2.4 GB 52 minutes ago all-minilm:latest 1b226e2802db 45 MB About an hour ago qwen3:0.6b 7df6b6e09427 522 MB About an hour ago qwen2.5:0.5b a8b0c5157701 397 MB About an hour ago
The qwen2.5:0.5b text model uses a small download. If it is absent, pull it before continuing. For another installed text model, use its full NAME value in place of qwen2.5:0.5b.
Related: How to pull an Ollama modelA connection error means the CLI cannot reach the Ollama server.
Related: How to start the Ollama server - Run the installed qwen2.5:0.5b model with a short arithmetic prompt.
$ ollama run qwen2.5:0.5b "What is 17 plus 25? Answer in one short sentence." 17 plus 25 equals 42.
The answer should express that the sum is 42; wording can vary between requests. A returned answer means the model processed the prompt, whereas a loading indicator or error alone does not.
- Confirm that qwen2.5:0.5b remains loaded in memory.
$ ollama ps NAME ID SIZE PROCESSOR CONTEXT RUNNER UNTIL qwen2.5:0.5b a8b0c5157701 630 MB 100% CPU 4096 llamacpp 4 minutes from now
A row for the model shows its memory use, processor placement, context length and remaining keep-alive time. 100% CPU means the model is loaded in system memory; GPU-capable systems can show GPU or mixed placement. An empty list after the keep-alive interval means Ollama has unloaded the model, while its downloaded files remain installed.
Related: How to list running Ollama models