HOW-TO · SET

How to download and run a model with Ollama

beginner10 minBy Eruo Fredoline
Target environment
Ubuntu 24.04 · Ollama 0.4.xWindows 11 · Ollama 0.4.xmacOS 15 · Ollama 0.4.x
PREREQUISITES

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

  1. Pull a model from the Ollama library. The pull command downloads the model files and registers the model locally. Smaller models like llama3.2:1b are fastest to download.

    ollama pull llama3.2:1b
    

    Expected output: pulling <manifest> followed by progress bars for each layer, ending in success.

  2. Confirm the model is available locally. The model is now registered and can be invoked without a network connection.

    ollama list
    

    Expected output: Table listing the model name, ID, size, and modification date. Example row: llama3.2:1b a48c9... 1.3GB 2026-05-29.

  3. Run an interactive inference session. This command opens a prompt loop in the terminal.

    ollama run llama3.2:1b
    

    Expected output: A >>> prompt appears. Type a question and press Enter. The model returns a generated response.

  4. Exit the interactive session. Type /bye and press Enter to terminate cleanly.

    /bye
    

    Expected 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., 1b instead of 70b) or close other memory-intensive applications.
  • ollama run hangs with no response — GPU drivers may not be recognized. Check with ollama list first, then restart the Ollama service with systemctl restart ollama.
  • Model not found after pull — Pull may have been interrupted. Re-run ollama pull <model-name> to complete the download.

Related guides

RELATED GUIDES