Running Local AI With Ollama: Match the Model to Your VRAM

Why local AI models crawl when they outgrow your GPU's VRAM, the 80% rule for picking model sizes, and real 6 GB GPU benchmarks with Ollama.

Updated

The Model Isn't Slow. It's Homeless.

The most common disappointment in local AI goes like this: you install Ollama, pull an impressive-sounding large model, ask it a question — and watch it crawl. The instinct is to blame the software or your GPU. Almost always, the real problem is simpler: the model doesn't fit in your GPU's memory, so most of it is running from system RAM at a fraction of the speed. This guide explains the one number that decides your experience — VRAM versus model size — and how to pick models that make your hardware feel fast.

How Ollama Uses Your Hardware

When Ollama loads a model, it puts as much of it as it can into your graphics card's VRAM and the rest into ordinary system RAM, splitting the work between GPU and CPU. That split is everything:

  • Fully in VRAM — the GPU does what it's built for. Generation is fast and responsive.
  • Partially in RAM — every token has to stream the RAM-resident portion of the model across the system bus. The GPU spends its time waiting. Speed falls off a cliff.
  • The bigger the model relative to VRAM, the worse the split. A model twice your VRAM isn't half as fast — it can be five times slower.

You can watch this yourself: while a model is loaded, ollama ps shows how much of it sits in VRAM versus RAM.

The Rule of Thumb

A model's download size is roughly what it needs in memory, plus overhead for its context (conversation memory). Practical guidance for the common quantization (Q4, the default for most Ollama models):

  • Model file ≤ ~80% of your VRAM → fully GPU-resident, fast. This is the sweet spot.
  • Model file ≈ your VRAM → borderline; small contexts may fit, long chats spill.
  • Model file > your VRAM → expect a big slowdown, plus slow loads every time the model goes cold.

Concrete example, from real hardware — a gaming laptop GPU with 6 GB of VRAM (RTX 3060 Laptop):

  • A 26B model (an 18 GB file) ran at about 17 tokens/second once warm, took 15–45 seconds just to load, and — being a reasoning model — spent a long silent stretch "thinking" before any text appeared. Usable for patient batch work; miserable for chat.
  • An 8B model (a 4.9 GB file) on the same machine ran at about 23 tokens/second, loaded instantly when warm, and answered immediately. Still not 100% in VRAM (desktop apps hold some), but a completely different feel.

Scale that example to your card: on an 8 GB GPU, 7–9B models are the sweet spot. On 12 GB, you can run 14B models comfortably. On 24 GB, 32B models come into play. The pattern never changes — fit first, size second.

Setting Up Ollama in Five Minutes

  1. Install Ollama on the machine with the GPU (Windows, macOS, or Linux — the experience is the same).
  2. Pull a model sized for your VRAM: ollama pull llama3.1:8b
  3. Chat with it: ollama run llama3.1:8b
  4. Check the split while it runs: ollama ps — if the VRAM share is low, go a size smaller.

Using It From Other Machines

Ollama serves a local API on port 11434, which is how front-ends like Open WebUI and other tools talk to it. Two things to know if you want to reach it from another machine:

  • By default Ollama only listens on localhost. To serve your network, set the environment variable OLLAMA_HOST=0.0.0.0:11434 (on Windows, set it as a user environment variable) and restart Ollama. On Windows you'll also need an inbound firewall rule for TCP 11434.
  • Treat that port like any other service: fine on your LAN or over a VPN like Tailscale, not something to forward to the open internet.

And a Windows-specific survival tip: processes started remotely (for example over SSH) die when the session ends — including Ollama. If you manage a Windows box headlessly, run ollama serve from a Scheduled Task at logon instead, so it stays up. A tiny wrapper script that sets OLLAMA_HOST and launches ollama.exe serve is all it takes.

Choosing Models Without Regret

  • Start at 8B. For most people, most of the time, a good 8B model that fits entirely on the GPU beats a 26B model strangled by RAM spill — faster answers, and in a chat, responsiveness is quality.
  • Keep one big model for special occasions. Nothing stops you storing several models and loading the big one when you genuinely need its best work and can wait. Just know the first question after a cold start pays the load time.
  • Watch context length. Longer contexts (bigger documents, longer chats) grow the memory overhead. If a model that "should fit" spills to RAM, a smaller context setting is often the fix.
  • Reasoning models feel slower than they are. Models that think before answering spend tokens you can't see. For quick questions, a plain instruct model feels dramatically faster even at identical tokens/second.

The Bottom Line

Local AI speed is a memory problem before it's a compute problem. Match the model to your VRAM — around 80% of it at most — and even a modest gaming GPU delivers a responsive private assistant that costs nothing per question. Chase parameter counts your card can't hold, and you'll conclude local AI is slow. It isn't. It was just homeless.