Skip to main content
Assuming you’ve already installed the Ollama application and CLI on your machine, this guide walks you through running your first large language model (LLM)—Meta’s Llama 3.2—entirely offline. Ollama supports many popular models, so feel free to substitute your preferred one.

Prerequisites

  • Ollama CLI installed and configured
  • At least 4 GB of free RAM
  • ~2 GB of disk space for the Llama 3.2 model
  • A modern terminal (macOS, Linux, or WSL on Windows)
Downloading and storing LLMs locally can consume significant disk space and memory. Ensure you have adequate resources before proceeding.

1. Pulling and Running the Model

Open your terminal and execute:
Since this is your first run, Ollama will fetch the model from the registry—similar to Docker pulling an image:
Once the download completes, Ollama verifies integrity, writes the manifest, and presents an interactive >>> prompt.
All inference happens locally—your data remains on your device and no internet connection is needed after download.

2. Basic Interaction

At the >>> prompt, type any message:
You should see a response like:

3. Experimenting with Prompts

Try a creative prompt:
The model generates a multi-paragraph poem in seconds. To discover built-in session commands, enter:

Available Session Commands

Use triple quotes (""") to start a multi-line message.

4. Resetting Context

To clear memory of previous interactions:
Now the model won’t recall what you asked before clearing. This is useful for isolated tests or debugging prompts.

5. Performing Calculations

Ollama LLMs can even handle simple math. For example:
Sample response:

6. Exiting the Session

When you’re finished, leave the chat with:
You’ll return to your normal terminal prompt.
You’ve now run and interacted with a large language model locally using Ollama. Explore other models, tweak prompts, and enjoy full offline inference for enhanced privacy and performance. Happy experimenting!

Watch Video