voidduck
AI guides

Run local AI models with Ollama: hardware, setup and privacy limits

Run a local language model with Ollama, check real memory needs and connect compatible clients. What local inference does and does not protect.

Published: Updated: 5 min read

Computer memory on a motherboard

© Sergei Starostin / Pexels.

Updated: November 26, 2026.

A local model is useful when you need to keep a prompt on your own machine or want predictable, repeated inference without sending every request to a hosted API. It is not automatically private, free or as capable as a hosted model for every task. Check the model tag, the application connected to it and the computer’s actual memory before moving work over.

What runs locally, and what might not

Ollama can run a downloaded model on your computer and expose a local API. A client can still send data elsewhere if it uses cloud features, external search, analytics or a hosted model tag. “I installed Ollama” does not prove the entire data path stays local.

Before using confidential material:

  • confirm the selected model is a local model, not a cloud tag,
  • check the client’s network and data settings,
  • disable external tools that are not needed,
  • test with non-sensitive input first.

This is a technical setup choice, not a compliance guarantee. Your organization may have additional rules for code, customer records or regulated information.

Install Ollama and run a model

Download Ollama from its official download page. The first model run downloads the model files, so keep enough disk space available.

For example:

ollama run qwen3-coder:30b

This asks Ollama to retrieve the tag if needed and start an interactive session. The Ollama model library lists available names and tags. Read the exact model page before downloading: different quantizations of the same model can have different file sizes.

Ollama’s local API is available at http://localhost:11434. Its OpenAI-compatible endpoint supports a subset of the OpenAI API. Existing clients may connect through http://localhost:11434/v1, but verify every feature you rely on. Compatibility does not mean that all API endpoints, tools or structured-output options behave identically.

Check model size against memory

The model file is not the only memory use. Runtime buffers and the context window also need memory. A long context can push a model that loaded successfully into swapping or an out-of-memory error.

Two current Ollama examples:

TagPublished file sizeWhat to remember
gpt-oss:20babout 14 GBOllama says the 20B model can run on systems with as little as 16 GB memory; context and other apps need room too
qwen3-coder:30babout 19 GB for Q4_K_Mthe model page identifies this quantization and size; check available system or GPU memory before loading

The numbers come from the GPT-OSS 20B page and the Qwen3-Coder 30B page. They are model-file figures, not universal minimum hardware guarantees.

Ollama currently defaults to a 4,096-token context, according to its context-length documentation. Increasing context uses more memory. Start with the default, then raise it only if the task needs longer input and the machine has headroom.

Test a model before giving it real work

Use three prompts from the job you want to support:

  1. a normal request,
  2. one with a long input,
  3. one with incomplete or contradictory information.

Measure response time, memory use and how much editing the result needs. For coding, run the project tests and inspect the diff. For document summaries, compare extracted facts against the source. A fluent answer is not a validation result.

Local models are good candidates for repeated bounded jobs such as labeling, extracting a known set of fields or drafting a first pass. For difficult reasoning, current information or a long agentic workflow, compare a hosted model too. Use the same input and acceptance criteria for both.

Privacy depends on the whole application

Local inference can keep prompt processing on your device, but the rest of the workflow still matters. A code editor extension may send context to its own service. A model with a cloud suffix can route inference to a provider. Telemetry may include more than you expect.

If privacy is the reason for going local, inspect the client’s network connections and logs. Do not test with production secrets. Keep credentials out of prompts, restrict file access and avoid mounting directories the model does not need.

Also plan for updates. A local model does not automatically know current prices, documentation or security advisories. Add a retrieval step with trusted sources when the task depends on fresh information.

The cost trade-off

There is no per-token invoice for a model running on your hardware, but the cost moves to the device, power, setup and maintenance. If you use the model occasionally, a hosted free tier may be cheaper overall. If you run the same task many times and already have suitable hardware, local inference can be worth the setup.

Compare the cost of one accepted task, including time spent correcting results. The API pricing guide helps estimate hosted usage. The coding-model guide covers task-level evaluation and agent permissions.

FAQ

Can Ollama run without a GPU?

Yes. CPU inference is possible, but speed depends on the model, quantization and computer. Test response time with the actual task before relying on it.

Does local AI guarantee that data never leaves my computer?

No. The model may run locally while the connected client uses cloud inference, search or telemetry. Check the whole application and selected model.

What is Ollama’s local API address?

The local API uses http://localhost:11434. Ollama also offers an OpenAI-compatible endpoint at http://localhost:11434/v1, with a documented subset of API behavior.

How much memory does a local model need?

It depends on the exact model tag, quantization and context length. Check the published model-file size, then leave extra memory for runtime and other applications.

Sources