Ravindra BagaleCourses & study guides Track your progress

Guides · Generative AI

Run an LLM Locally with Ollama on Windows and Mac (2026): A Beginner's Guide

To run an AI model on your own computer for free, install Ollama from ollama.com/download (Windows 10 22H2 or newer, or macOS 14 Sonoma or newer), open a terminal and type ollama run llama3.2. It downloads a 2.0 GB model once and then chats with no internet and no account. On 8 GB of RAM, stick to small models of 1 to 4 billion parameters; they are slower and less clever than ChatGPT, but your text never leaves your computer.

In my AI classes, the moment students see a model answering on a laptop with the Wi-Fi switched off, they finally understand that an LLM is just a big file plus a program. Ollama makes that a ten-minute job. In this guide we install it on Windows and Mac, run our first model, call it from a script, and use a small picker to choose a model that fits your RAM.

Full course chapter

This guide is about running a model yourself. To understand what an LLM is and why bigger models need more memory, read What Is an LLM? Large Language Models Explained Simply. To build a chatbot on your own PDF, read the guide How to Build a RAG Chatbot from a PDF.

Related guide

Want many cloud models with one key instead of local only? OpenRouter: One API Key for Many AI Models (Beginner) shows OpenRouter credits, a safe .env key and a first Python chat.

What you will learn in this guide

  • What "running an LLM locally" means
  • Installing Ollama on Windows and Mac
  • Your first local chat, offline
  • The 5 commands you will use
  • Calling the model from a script
  • Picking a model for your RAM

1. Suppose Imran cannot paste office notes into ChatGPT

Suppose Imran works at a small accounts firm in Hyderabad. His office does not allow client notes in online chatbots. He still wants AI to tidy up meeting notes and explain error messages. His laptop has 8 GB of RAM and Windows 11. A friend tells him: "Run the AI on your own laptop with Ollama, and nothing goes online."

2. What you need (checked on 19 October 2026)

Windows Mac
System Windows 10 22H2 or newer macOS 14 Sonoma or newer
Install OllamaSetup.exe from ollama.com/download Ollama app from ollama.com/download, dragged into Applications
Space About 4 GB for Ollama, plus each model Space for each model
Account Not needed Not needed

Models are separate downloads. On ollama.com/library, llama3.2:1b is 1.3 GB, llama3.2 (3B) is 2.0 GB, gemma3:1b is 806 MB and gemma3 (4B) is 3.4 GB. A common rule: about 8 GB of RAM for a 7B model and 16 GB for 13B.

Running a local model in five steps Steps from top to bottom: 1 Install Ollama, Only from ollama.com/download; 2 Open a terminal, Command Prompt or Terminal; 3 Run a small model, ollama run llama3.2; 4 Chat offline, Type /bye to leave; 5 Call it from a script, localhost port 11434. 1Install OllamaOnly from ollama.com/download 2Open a terminalCommand Prompt or Terminal 3Run a small modelollama run llama3.2 4Chat offlineType /bye to leave 5Call it from a scriptlocalhost port 11434

Figure 1. Running a local model in five steps: install Ollama from the official site, open a terminal, run a small model, chat offline, then call it from a script on port 11434.

3. Worked example 1: install and run your first model

On Windows:

  1. Download OllamaSetup.exe from ollama.com/download and run it. No admin password is needed.
  2. Open PowerShell or Command Prompt.
  3. Type:
ollama run llama3.2

On Mac: open the downloaded app, drag Ollama into Applications, start it once, then open Terminal and type the same command.

The first time, it downloads the model (2.0 GB). Then you see a >>> prompt. Type:

>>> Explain in 3 lines what a balance sheet is, for a beginner.

Expected output (yours will be similar, not the same):

A balance sheet is a summary of what a business owns and owes on one date.
On one side are assets, like cash, stock and machines.
On the other are liabilities and the owner's capital, and both sides must be equal.

Type /bye to leave the chat. Now switch off the Wi-Fi and run ollama run llama3.2 again: it still answers.

4. Worked example 2: the 5 commands you will use

ollama run llama3.2:1b     download (first time) and chat with a smaller model
ollama ls                  list the models you have downloaded
ollama ps                  show models loaded in memory right now
ollama rm llama3.2:1b      delete a model to free disk space
/bye                       leave a chat

Expected output of ollama ls after both downloads (sizes from ollama.com; IDs and dates will differ):

NAME              ID      SIZE      MODIFIED
llama3.2:1b       ...     1.3 GB    2 minutes ago
llama3.2:latest   ...     2.0 GB    10 minutes ago

Ravindra Bagale's Tip

Start with the smallest model that does your job. A 1B or 3B model answers fast on an ordinary laptop; a big model on too little RAM makes the whole computer slow. Move up one size only when the answers are not good enough.

5. Worked example 3: call the model from a script

Ollama also runs a small local server at localhost:11434, so your own programs can use the model. Type this in Command Prompt on Windows (not PowerShell, which reads the quotes differently) or in Terminal on Mac:

curl http://localhost:11434/api/generate -d "{\"model\": \"llama3.2\", \"prompt\": \"Give 2 tips to write clear meeting notes.\", \"stream\": false}"

Expected output (shortened; the words will differ):

{"model":"llama3.2","created_at":"...","response":"1. Write the decision and the owner for each point. 2. Send the notes the same day.","done":true, ...}

Tools such as n8n and Python libraries can use the same address.

6. Worked example 4: pick a model for your RAM (Python)

Which model should you try first? This script picks the largest model from a short list that fits in about half your RAM, leaving the rest for Windows or macOS and your apps.

# Which Ollama model should I try first? Picks by your computer's RAM (model sizes from ollama.com/library, 19 Oct 2026).
MODELS = [  # name, download size in GB
    ("gemma3:1b", 0.8), ("llama3.2:1b", 1.3), ("llama3.2", 2.0), ("qwen3:4b", 2.5),
    ("gemma3", 3.4), ("qwen3:8b", 5.2), ("gemma3:12b", 8.2),
]
def pick(ram_gb):
    budget = ram_gb * 0.5          # leave about half the RAM for Windows/macOS and your apps
    fits = [m for m in MODELS if m[1] <= budget]
    return fits[-1] if fits else None

for ram in (4, 8, 16, 32):
    m = pick(ram)
    print(f"{ram:>2} GB RAM -> " + (f"ollama run {m[0]}  ({m[1]} GB download)" if m else "too little RAM; use a web chatbot"))

Real output (19 October 2026):

 4 GB RAM -> ollama run llama3.2  (2.0 GB download)
 8 GB RAM -> ollama run gemma3  (3.4 GB download)
16 GB RAM -> ollama run qwen3:8b  (5.2 GB download)
32 GB RAM -> ollama run gemma3:12b  (8.2 GB download)

Imran has 8 GB, so he starts with gemma3 (4B, 3.4 GB). If his laptop feels slow, he drops to llama3.2.

7. Local vs online AI: when to use which

  • Use local (Ollama) for private notes, offline work, learning how models work and building small tools.
  • Use online (ChatGPT, Gemini, Claude) for the best quality, web search, images and long documents.
  • Local is not automatically safe: download Ollama only from ollama.com, and models only from its library or sources you trust.
  • Check answers: small models make more mistakes than big online ones.

8. Beginner mistakes and quick fixes

Mistake What happens Quick fix
Downloading a huge model first Laptop freezes Start with 1B to 4B
Ollama not running "could not connect" error Start the Ollama app, then retry
Old Windows 10 version Install fails Update to 22H2 or newer
Disk full Download stops ollama rm unused models
Expecting ChatGPT quality Weaker answers Use local for private, simple tasks
curl error in PowerShell Quotes read differently Use Command Prompt

9. Try at home

Try at home

  1. Install Ollama.
  2. Run llama3.2.
  3. Ask one question offline.
  4. Try ollama ls and ollama ps.
  5. Call the local API once.
  6. Run the RAM picker script.

Recap

In short

  1. Ollama runs AI models on your own Windows or Mac computer, free and with no account.
  2. Install from ollama.com/download, then type ollama run llama3.2.
  3. Models download once (llama3.2 is 2.0 GB) and then work offline.
  4. Use ollama ls, ollama ps, ollama rm and /bye.
  5. Your programs can call the model at localhost:11434.
  6. On 8 GB of RAM, choose small 1B to 4B models.

An LLM is a file and a program. With Ollama, both sit on your laptop, and your words stay there too.

Understand the model: What Is an LLM? Large Language Models Explained Simply · Next idea: n8n AI Agent Tutorial for Beginners


Ravindra Bagale, trainer: linkedin.com/in/ravindra-bagale. Imran and his office are made up for learning, and the chat and API answers are examples; a real model words them differently. System needs and commands were checked on docs.ollama.com, and model sizes on ollama.com/library, on 19 October 2026. The Python output was produced on 19 October 2026.

Frequently asked questions

What is Ollama?

A free program that downloads and runs AI language models on your own Windows, Mac or Linux computer. After the download, the model works offline and nothing you type goes to the internet.

How much RAM do I need to run an LLM locally?

A 1B to 4B model runs on 8 GB of RAM. As a rough rule, a 7B model needs about 8 GB and a 13B model about 16 GB.

Is Ollama free?

Yes, Ollama and the open models in its library are free to download and run on your computer. No account is needed for local use.

Which model should I run first in Ollama?

Try llama3.2 (3B, 2.0 GB). On a slow or 4 GB laptop, use llama3.2:1b (1.3 GB) or gemma3:1b (806 MB).

How do I stop or remove a model in Ollama?

Type /bye to leave a chat. Use ollama ps to see loaded models, and ollama rm followed by the model name to delete one and free disk space.

Related: Local AI in VS Code (Ollama + Continue)