Run an LLM on Your Own Laptop with Ollama: A Practical 2026 Guide

By Sheng Pang · Published · Updated · 4 min read

AI in practice ollama local llm open weights

You can run downloaded language models on your laptop with Ollama. Choose a model that fits the available memory, then check its answers on tasks you know how to verify.

Local inference, cloud inference and the tools connected to a model have different data paths. Check which one you are using before sharing private information.

Why bother

  • Privacy. Local inference processes prompts on your machine. Ollama also offers cloud models, which send prompts to its service. Follow your organisation's data rules before using customer information or confidential code.
  • Cost. Zero per token. Useful if you are building something that calls a model thousands of times, or just do not want another subscription.
  • Offline. Works on a plane or behind a firewall.
  • Control. You choose which downloaded model to run. Use ollama list to check what is installed.
  • Learning. Running a model yourself demystifies it. You see the memory it takes, the speed it runs at and how it degrades when starved.

Hardware: what you actually need

Memory determines what you can load; compute and memory bandwidth also affect speed. Start with the model's weights, then leave room for context, runtime buffers and other applications.

The table counts only raw weights at four bits per parameter, using decimal gigabytes. Quantization metadata and runtime memory add to these calculated values.

ParametersRaw weights at four bitsWhat this excludes
4 billion2 GBContext, buffers and quantization metadata
8 billion4 GBContext, buffers and quantization metadata
14 billion7 GBContext, buffers and quantization metadata
30 billion15 GBContext, buffers and quantization metadata
70 billion35 GBContext, buffers and quantization metadata

Apple Silicon shares memory between the CPU and GPU, but macOS and other applications need part of it. Installed memory is not all available to the model.

Ollama's FAQ explains how to check CPU and GPU placement with ollama ps. Our local AI memory and compute guide separates fitting a model from running it at a useful speed.

Install and run

For local only use, set OLLAMA_NO_CLOUD=1 for the Ollama server and restart it, following the official cloud settings. Download the model before going offline.

Download Ollama from its site or use your package manager, then:

ollama run qwen3:8b

That downloads the model and opens a chat. Type a question and measure the response on your hardware. The Qwen3 model page lists the current download size. Type /bye to leave.

Use the Ollama model library to check available tags, downloads and model cards. Read the licence and supported features before choosing a model for your application.

Run ollama list to see what you have, ollama pull to fetch more, ollama rm to delete. Models are just files in a cache directory.

Using it from code

Ollama runs a local server on port 11434. Its OpenAI compatibility documentation lists the supported endpoints and fields. Check that subset before reusing a client.

curl http://localhost:11434/v1/chat/completions -d '{
  "model": "qwen3:8b",
  "messages": [
    {"role": "system", "content": "You reply only with valid JSON."},
    {"role": "user", "content": "Give me three fruit names and their colours."}
  ],
  "response_format": {"type": "json_object"}
}'

The response is a JSON document with the model's reply inside it. For a supported client, set the base URL to http://localhost:11434/v1 and supply a nonempty API key value if the client requires one. Ollama does not use that key for local authentication.

Ollama also has native endpoints and JSON Schema constrained output, covered in how to get reliable JSON from an LLM. Test response shape and quality before switching an existing application.

Check the model on your own tasks

Test these points before using a local model for your work:

  • Reasoning depth. Check a model on the debugging and planning tasks you need. Parameter count alone does not establish its accuracy.
  • Knowledge. Local models can invent details. Give them relevant documents and verify important claims against those sources.
  • Context length. Long contexts eat memory fast. A model that runs well with a 4,000 token window may not fit with 32,000.
  • Speed. Measure prompt processing and generation separately. Model architecture, quantization, hardware and context all affect response time.
  • Battery and heat. Local inference uses your CPU or GPU. Check power use and thermal behavior during the work you plan to run.

Compare local and hosted models on tasks you can check. Keep confidential data within your approved environment, including any editor extensions, tools and logs connected to the model.

Beyond Ollama

Other options include LM Studio for a graphical workflow, llama.cpp for inference controls and vLLM for model serving. Compare supported models and hardware before changing runtimes.

To see what a model weight is, read our post on how neural networks learn. Our guide to tokens explains why the context window is measured the way it is.

← More AI in practice articles  ·  All articles

↑ Top