Your Own Private AI: The Complete 2026 Guide to Running a Local LLM on Your PC

Step-by-step guide to running a local LLM on your PC in 2026 using Ollama. Covers hardware requirements, model selection, Open WebUI setup, and VS Code integration.

Your Own Private AI: The Complete 2026 Guide to Running a Local LLM on Your PC
Photo by Igor Omilaev / Unsplash

Let me be direct about something: I'm not neutral on this topic.

I use AI tools for coding, debugging, writing, and research. I have opinions about which tools are worth using and which are security risks dressed up as productivity features. And I think the developer community is collectively underestimating how much control they're handing over when they paste code into ChatGPT or Claude.

I've covered the r/programming LLM ban debate, Amazon shipping AI-generated code without adequate review, and AI agents hammering infrastructure to the point of outages. Most of that coverage is about AI as a systemic force on the industry.

This article is different. This is practical. This is: your code stays on your machine, you pay $0 per token after the hardware cost, and the model works at 3AM when you're debugging something with a deadline. Here's how to set it up properly, from scratch, with enough understanding of the stack to tune it and troubleshoot it yourself.

By the end of this guide you will have:

  • A local LLM running fully offline on your hardware
  • A polished web chat interface in your browser (no terminal-only interaction)
  • A VS Code setup that gives you AI code completion and inline chat without sending a line of your code anywhere external
  • Enough understanding of the model landscape to make your own decisions about which models to run
    I've been running local setups on my own machines for a while. The tooling in 2026 is good enough that I can point any developer at this guide without apologizing for rough edges. Let's build.

What Does the Local LLM Stack Actually Look Like?

Before touching an install command, you need a mental model of what you're building. A local LLM setup has three layers, and understanding each one determines how you troubleshoot when something breaks.

Layer 1: The model. A collection of files — usually one large binary in GGUF format — containing billions of numerical parameters. These are the trained weights. The model "knows" things because these weights encode statistical patterns from its training data. A 7-billion-parameter model at 4-bit quantization weighs around 4.5GB. A 70B model at the same quantization is about 40GB.

Layer 2: The runtime. Software that loads the model into memory and performs inference against it. Ollama is what we're using. It wraps a library called llama.cpp behind a clean REST API and a CLI, handles GPU memory allocation automatically, and makes switching between models a one-liner. Think of it the way you think of Docker: you pull a model, you run it. Ollama manages the rest. The runtime listens on localhost:11434 once started.

Layer 3: The interface. Anything that talks to the runtime API. A curl command. Python code. A VS Code extension. A web app running in your browser. The runtime doesn't care what's on the other end. It receives a prompt over HTTP and returns a streamed response.

That's the whole stack. Model on disk. Runtime loads it into memory and exposes an API. Interface talks to the API. You can replace any layer without touching the others.

Why Run a Local LLM Instead of Using ChatGPT or Claude?

Three reasons, in order of importance to me personally.

Your data doesn't leave your machine. If you work on proprietary systems, client code, security tooling, or anything you'd be uncomfortable pasting into a third-party's input box, a local model is the right answer. Every character you type into ChatGPT's interface is transmitted to OpenAI's servers, retained according to their data policies, and potentially used for training unless you've explicitly opted out. We've covered exactly this problem in the Vercel breach breakdown — a single OAuth token exposed because credentials left the controlled environment. The same principle applies to code pasted into external AI services. That's a real and underappreciated risk, not a theoretical one.

No per-token cost. GPT-4-class API access runs $15 per million input tokens. If you're processing codebases, generating documentation, or running any kind of automated pipeline, that adds up fast. A local model costs $0 per token after hardware. The hardware pays for itself quickly if you use AI tools regularly.

No rate limits, no outages, no deprecation. You're not dependent on someone else's infrastructure. The model doesn't get deprecated behind you without notice. It doesn't go down when OpenAI has an incident. It runs as fast as your hardware runs it, whenever you want it.

The case against local: cloud models are still ahead on the hardest tasks. GPT-4o, Claude Sonnet, and Gemini 1.5 Pro outperform any model you can run locally on tasks that require broad reasoning, complex multi-step planning, or domain knowledge at the frontier. If you need the absolute ceiling of capability on a genuinely hard problem, the cloud is still the right call. Local is better for the 90% of day-to-day coding and research work where a capable 32B model is more than enough.

What Hardware Do You Need to Run a Local LLM?

This is the section most guides get wrong in both directions: either overselling what weak hardware can do or making it sound like you need server-grade equipment.

Why Is VRAM the Single Most Important Spec for Local AI?

Local LLM inference is a memory bandwidth problem. The model weights need to be read from storage into fast memory to be used during inference. The speed at which you can move weights around memory determines how fast you generate tokens.

The hierarchy:

  • NVIDIA/AMD GPU: VRAM. The model needs to fit entirely into GPU VRAM, or you pay a severe speed penalty as it spills into system RAM. A model running 50% in VRAM and 50% in RAM might run at 60% of the VRAM-only speed. Sometimes less.
  • Apple Silicon: Unified memory. The M-series architecture shares RAM between CPU and GPU at the hardware level. All your system RAM is effectively VRAM at memory bus speeds. This is why a MacBook Pro with 36GB of unified memory competes with a desktop running an RTX 3090.
  • CPU only: System RAM. Works for small models (3B to 7B parameters) at conversational speeds. Anything larger becomes painfully slow — we're talking 3 to 5 tokens per second, which makes it nearly unusable for coding assistance.
    CPU speed, RAM speed, and SSD speed all matter secondarily. VRAM capacity is the primary constraint.

Which Hardware Tier Is Right for Your Use Case?

Hardware VRAM / RAM Models You Can Run Approx. Speed
GPU: 6-8GB VRAM 6-8GB 7B models at Q4 20-40 tokens/sec
GPU: 12-16GB VRAM 12-16GB 13B at Q4, 7B at Q8 30-60 tokens/sec
GPU: 24GB VRAM (RTX 3090/4090) 24GB 32B at Q4, 13B at Q8 40-80 tokens/sec
Apple M3/M4 Pro (36GB) 36GB unified 32B, 70B with spill 25-45 tokens/sec
Apple M3/M4 Max (64-96GB) 64-96GB unified 70B at Q4, 32B at Q8 35-55 tokens/sec
CPU only (32GB+ RAM) System RAM 7B Q4, slowly 5-15 tokens/sec
Dual RTX 3090/4090 48GB VRAM 70B at Q4 60-100+ tokens/sec

The practical minimum for useful coding work: An 8GB GPU running a 7B coding model gives you 20 to 40 tokens per second. That reads faster than most developers can process. It's useful.

My actual recommendation if you're buying hardware for this: Either an RTX 4090 (24GB VRAM) or an Apple M-series Mac with 36GB+ unified memory. The RTX 4090 runs 32B models well and is the ceiling for single-GPU consumer setups. The Apple Silicon path is more expensive but eliminates the VRAM ceiling issue — 64GB or 96GB of unified memory can run 70B models, which is where the gap between local and cloud genuinely starts to close.

The RTX 3090 is still competitive. 24GB VRAM at a lower price point than the 4090 if you buy used. The 4090 is faster, but the 3090 runs the same models. For local LLM work specifically, the 3090 is an excellent value pick in 2026.

Should You Use NVIDIA, AMD, or Apple Silicon for Local LLMs?

NVIDIA: Best-supported across all software. CUDA is the standard that everything targets first. Drivers on Windows and Linux both work well. If you're buying dedicated hardware for AI, NVIDIA is the safe choice. Driver version 550+ is recommended; 525+ is the minimum for Ollama.

AMD: Linux with ROCm 6.x works well and is genuinely competitive. Windows AMD GPU acceleration is not officially supported in Ollama as of early 2026 — if you're on Windows with an AMD card, use WSL2 (experimental) or accept CPU-only speeds. On Linux with a 7900 XTX (24GB VRAM), you get performance competitive with an RTX 3090. AMD is good on Linux. It's not the right choice if you're on Windows. If you're running Windows and hitting driver oddities, our Windows Secure Boot certificate expiration explainer covers common driver signing issues that block GPU recognition in 2026.

Apple Silicon: The unified memory architecture makes this legitimately excellent for local AI. A 36GB M3 Pro outperforms an 8GB or 12GB GPU for large models. Ollama uses Metal acceleration automatically with no configuration needed. The trade-off: you're buying a Mac, which costs more than an equivalent PC setup. If you're already on a Mac and it has 36GB+ unified memory, you already have a solid local AI workstation.


We recommend reading Run Your Own AI Image Generator Locally: Stable Diffusion Complete Setup Guide (2026) to continue reading our selection of local AI content. Once your LLM stack is running, Stable Diffusion is the natural next step — same hardware, same local-first philosophy, same privacy guarantees.

How Much Storage Do You Need for Local AI Models?

Plan for at least 100GB of free NVMe SSD space if you want to keep several models around. Specific sizes at Q4 quantization:

  • 3B-4B model: 2-3GB
  • 7B-8B model: 4-5GB
  • 13B-14B model: 8-9GB
  • 32B model: 18-22GB
  • 70B model: 38-42GB
    Use NVMe SSD. A spinning disk makes model load times 5-10x slower. Loading a 20GB model from NVMe takes 5-10 seconds. From a spinning disk, plan for 45-60 seconds. That's not a dealbreaker if you're keeping models loaded, but cold starts become annoying fast.

How Do You Install Ollama on Linux, macOS, and Windows?

Ollama is the runtime layer. It wraps llama.cpp behind a clean CLI and REST API, handles GPU detection automatically, and manages model storage. Think of it as the Docker Engine for AI models — and if you haven't used Docker before, our What is Docker primer covers the concepts that carry over directly.

How Do You Install Ollama on Linux?

curl -fsSL https://ollama.com/install.sh | sh

The installer sets up the Ollama systemd service automatically. Verify:

ollama --version
systemctl status ollama

NVIDIA GPU users: Confirm your driver is version 525 or newer before installing.

nvidia-smi

The first output line shows your driver version. If it's below 525, update it through your distro's package manager or the NVIDIA website before proceeding.

AMD GPU users on Linux: Ollama requires the ROCm v7 driver.

# Ubuntu/Debian
sudo apt install rocm-opencl-runtime
 
# Arch
sudo pacman -S rocm-opencl-runtime

After the ROCm install, verify that Ollama detects your GPU with:

ollama run llama3.1:8b "test"

The first run output will indicate whether GPU layers are being used. If you see 0 GPU layers, something is wrong with the driver setup.

How Do You Install Ollama on macOS?

Download the macOS app from ollama.com/download. Install it like any other Mac app. Ollama runs as a menu bar application and handles Metal GPU acceleration automatically.

One common mistake: if you install the macOS app, do not also run ollama serve in your terminal. The app already manages the server process. Running both causes a port conflict on 11434. Use the menu bar icon if you need to restart the server.

How Do You Install Ollama on Windows?

Download the Windows installer from ollama.com/download. It runs as a background system service. NVIDIA GPUs are well-supported on Windows. AMD GPUs are not — use a Linux VM or WSL2.

In 2026, Ollama ships a native Windows ARM64 build. If you're on a Snapdragon X laptop or similar ARM-based Windows machine, you get native performance instead of x86 emulation overhead, which meaningfully improves inference speed on those machines.

How Do You Verify Ollama Is Running Correctly?

Open a terminal and run:

ollama list

An empty list without errors means the daemon is running and ready. If you get a connection error, the service isn't running — restart it with systemctl restart ollama on Linux or through the menu bar app on macOS.

For GPU verification specifically:

ollama run llama3.1:8b "say hello"
ollama ps

ollama ps shows loaded models and GPU layer allocation. The output looks like:

NAME              ID              SIZE    PROCESSOR    UNTIL
llama3.1:8b       365c0bd3109b    6.7 GB  100% GPU     4 minutes from now

100% GPU is what you want. If you see 100% CPU on a machine with a compatible GPU, the driver setup needs attention.

How Do You Download and Run Your First Local AI Model?

Ollama's model management is identical to Docker's:

ollama pull model-name:tag

Models download as content-addressed layers and Ollama resumes interrupted downloads automatically. Layers shared between model variants don't download twice.

Which Local LLM Models Should You Use in 2026?

I'm going to give you my actual opinions here, not a safe "it depends" answer. These are based on running these models for real coding and research work.

For coding: Qwen2.5-Coder is the answer.

The Qwen2.5-Coder family from Alibaba DAMO Academy is, in my opinion, the most practically useful family of local models for software development in 2026. It was specifically fine-tuned on code, not just exposed to code during general training. The difference shows. If you're curious about how to use AI coding tools responsibly — keeping what it generates reviewed and audited — our piece on why developers use AI tools but still don't trust them covers exactly that workflow.

# 7B -- fits in 8GB VRAM, genuinely useful for autocompletion and refactoring
ollama pull qwen2.5-coder:7b
 
# 14B -- if you have 16GB VRAM, this is meaningfully better on harder tasks
ollama pull qwen2.5-coder:14b
 
# 32B -- this is where local and cloud start to look competitive for coding
ollama pull qwen2.5-coder:32b

On the HumanEval Python benchmark: Qwen2.5-Coder-7B scores around 68%. The 14B hits roughly 85%. For reference, GPT-3.5 was around 72% when it launched. You can run a model locally that beats 2022-era GPT-3.5 on coding tasks, on an 8GB GPU, for $0 per token.

Qwen3-Coder-Next (Mixture-of-Experts architecture, 80B total but only ~3B active parameters per token) is worth checking the Ollama library for availability:

ollama pull qwen3-coder

MoE models are interesting: they have the parameter count of a large model but the inference cost of a small one, because most parameters stay inactive per token. If it's available and you have the VRAM for the full model size, try it.

For general chat and research: Llama 3.1 or Llama 3.3.

Meta's Llama family is well-tested, widely supported, and has a large community producing fine-tunes and variants. For general-purpose use:

# 8B -- the workhorse for 8GB GPU setups
ollama pull llama3.1:8b
 
# 70B -- if you have the VRAM, this is the ceiling for local general-purpose models
ollama pull llama3.3:70b

For complex multi-step reasoning and debugging: DeepSeek R1.

DeepSeek's R1 models use chain-of-thought reasoning — they "think out loud" before answering, similar to OpenAI's o1. For debugging logic errors, working through multi-step algorithm problems, or any task that benefits from systematic step-by-step analysis, R1 is noticeably better than standard models.

ollama pull deepseek-r1:7b    # 8GB VRAM
ollama pull deepseek-r1:14b   # 16GB VRAM
ollama pull deepseek-r1:32b   # 24GB VRAM -- this one is good

You'll see <think>...</think> tags in the output before the final answer. That's the reasoning step. It's not a bug. It's why the model is better at hard problems — it works through them before committing to an answer.

If you have minimal hardware (4-8GB system RAM, no GPU):

Microsoft's Phi-4 Mini (3.8B parameters) and Gemma 3 1B are worth trying. Small models with above-average quality for their size.

ollama pull phi4-mini
ollama pull gemma3:1b

Expect 5-15 tokens per second on CPU only. Usable for occasional queries. Not practical for real-time coding assistance.

How Do You Test That Your Local Model Is Working?

Run a quick smoke test immediately after pulling a model:

ollama run qwen2.5-coder:7b "Write a Python function to check if a string is a valid IPv4 address"

You should see a response streaming to your terminal within a few seconds. If the model is already in VRAM, it's near-instant. A cold start (model loading from disk) takes 5-15 seconds on NVMe.

Exit the interactive prompt with /bye.

To check what's running and how GPU resources are allocated:

ollama ps

If you see 0 GPU layers when you expect GPU acceleration, stop here and fix the driver setup before moving forward. Running a 7B model on CPU when you have a compatible GPU is the difference between 35 tokens/second and 5 tokens/second.

What Is Quantization and Which Setting Should You Use?

Most guides tell you to use Q4_K_M and move on. Let me explain what quantization actually is, because understanding it determines which quality level makes sense for your hardware and use case.

Model weights are originally stored at full floating-point precision: FP32 (32-bit) or FP16 (16-bit). Quantization reduces this precision to save memory and increase inference speed at the cost of some accuracy. The key insight: for inference, you don't need the same precision as training. Reducing weight precision from FP16 to 4-bit reduces the model's memory footprint by 75% with surprisingly modest quality loss.

The naming scheme in GGUF files:

  • Q4: 4-bit quantization. ~75% smaller than FP16. Best bang-for-buck on consumer hardware.
  • Q5: 5-bit. Better quality than Q4, about 10-15% more VRAM. Use when you have headroom.
  • Q8: 8-bit. Excellent quality, close to FP16 output. Roughly double the VRAM of Q4.
  • K_M suffix (e.g., Q4_K_M): A mixed quantization scheme that preserves more precision in the layers that matter most for output quality. Q4_K_M is the current gold standard for consumer hardware — it outperforms naive Q4 in quality with nearly identical memory usage.
    My recommendation: Start with Q4_K_M, which is what Ollama pulls by default. If you have VRAM headroom (more than 2-3GB spare after the model loads), try Q5_K_M. The quality difference on coding tasks is real but not dramatic. Q8 is worth it only if you have plenty of headroom and are doing tasks where nuanced reasoning matters more than speed.

To pull a specific quantization variant:

# Default (Q4_K_M for most models)
ollama pull qwen2.5-coder:7b
 
# Specific quantization -- check the model page at ollama.com/library for available tags
ollama pull qwen2.5-coder:7b-instruct-q8_0

One more thing: the Q4_K_M variant of a 14B model often outperforms the Q8 variant of a 7B model on the same hardware budget. More parameters at lower precision beats fewer parameters at higher precision, up to a point. If you're deciding between a 7B at Q8 and a 14B at Q4 for a 12GB VRAM budget, run the 14B at Q4.


We recommend reading The Complete Self-Hosted Productivity Stack: Nextcloud, Vaultwarden, Immich, Jellyfin, and Paperless in 2026 to continue reading our selection of content. If you're running AI locally for privacy reasons, the logical next question is what else you're still sending to Google and Dropbox. That guide covers the full stack.

How Do You Set Up a Local Web Interface for Your LLM?

Running models from the terminal works for quick tests. For extended conversations, research, and document analysis, you want a proper web interface. Open WebUI is the best option I've found — it gives you persistent chat history, model switching, file uploads, and a UI that looks and feels like ChatGPT, all running entirely on your machine.

How Do You Install Open WebUI with Docker?

If you don't have Docker installed, read our What is Docker primer first. Open WebUI's recommended installation is a single Docker command:

docker run -d \
  -p 3000:8080 \
  --add-host=host.docker.internal:host-gateway \
  -v open-webui:/app/backend/data \
  --name open-webui \
  --restart always \
  ghcr.io/open-webui/open-webui:main

Breaking down each flag:

  • -p 3000:8080 maps your machine's port 3000 to the container's internal port 8080. Access Open WebUI at http://localhost:3000.
  • --add-host=host.docker.internal:host-gateway lets the container reach Ollama on your host machine. Without this, the container can't find Ollama's API.
  • -v open-webui:/app/backend/data creates a named Docker volume for persistent storage. Your chat history, user account, and settings survive container restarts and updates.
  • --restart always starts Open WebUI automatically when Docker starts.
    Navigate to http://localhost:3000. The first time, you'll create a local admin account — this is stored entirely on your machine, no external registration involved. After that, you land in a chat interface connected to your Ollama backend.

How Do You Connect Open WebUI to Ollama?

Open WebUI auto-detects Ollama at http://host.docker.internal:11434. Go to Admin Panel (gear icon) → SettingsConnections to verify or change the Ollama URL. You should see your downloaded models already listed in the model selector.

If auto-detection fails, manually set the Ollama URL to http://host.docker.internal:11434 on macOS and Windows, or http://172.17.0.1:11434 on Linux (the default Docker bridge gateway IP).

How Do You Integrate a Local LLM into VS Code?

This is where the local setup pays for itself for developers. The Continue extension turns VS Code into a local AI-powered coding environment with inline completions, chat, and codebase context. Zero code leaves your machine. If you're evaluating editors more broadly, it's also worth knowing that Zed 1.0 ships with native Ollama integration out of the box — a faster alternative to VS Code for developers who want the same local AI capability with less Electron overhead.

Installing and Configuring the Continue Extension

Install Continue from the VS Code marketplace:

ext install Continue.continue

Or search "Continue" in the Extensions panel. After installation, a Continue icon appears in the left sidebar.

Configure it to use Ollama. Open the Continue configuration file (~/.continue/config.json):

{
  "models": [
    {
      "title": "Qwen2.5-Coder 14B",
      "provider": "ollama",
      "model": "qwen2.5-coder:14b",
      "apiBase": "http://localhost:11434"
    },
    {
      "title": "DeepSeek R1 14B (Reasoning)",
      "provider": "ollama",
      "model": "deepseek-r1:14b",
      "apiBase": "http://localhost:11434"
    }
  ],
  "tabAutocompleteModel": {
    "title": "Qwen2.5-Coder 7B (Fast Autocomplete)",
    "provider": "ollama",
    "model": "qwen2.5-coder:7b",
    "apiBase": "http://localhost:11434"
  },
  "contextProviders": [
    {"name": "code"},
    {"name": "docs"},
    {"name": "diff"},
    {"name": "terminal"},
    {"name": "open"}
  ]
}

The split between autocomplete and chat models is deliberate. Autocomplete fires on every keystroke — you want a fast 7B model there. Chat interactions are explicit requests where you've already paused — the 14B or 32B model is worth the slightly slower response.

After saving the config, Continue connects to Ollama and you'll see the model names appear in the Continue sidebar.

How Do You Use Continue Effectively for Coding?

The key shortcuts:

  • Tab — accept an inline suggestion
  • Cmd/Ctrl + I — open inline chat at your cursor position. Ask for a refactor, explain this code, fix this bug.
  • Cmd/Ctrl + Shift + L — open the Continue sidebar chat and add selected code to the context
  • @codebase — in the chat, this indexes your project and adds codebase context to the conversation
    The @codebase context provider is where local LLMs genuinely earn their keep for development work. You can ask "find all places in this codebase where we're not handling the error from the database call" and the model will search your code and give you a real answer. You couldn't do that with a cloud model unless you were sending your entire codebase to their servers — which is exactly the situation many companies prohibit.

A workflow that actually works for code review:

  1. Make your changes on a branch
  2. In Continue's chat: @diff Summarize the changes in this diff and identify any potential bugs or security issues
  3. The model reads your git diff and gives you a code review against your local code
    No third party ever sees your code. The model runs on your hardware. The diff stays local.

How Do You Write Effective System Prompts for Local Models?

Local models are more sensitive to system prompts than cloud models, which have been fine-tuned with extensive RLHF to follow implicit instructions. With a local model, explicit system prompts meaningfully change output quality.

For coding assistance:

You are an expert software engineer. When asked to write or review code:
- Prefer clear, readable code over clever one-liners
- Always handle errors explicitly -- no silent failures
- Add comments explaining non-obvious design decisions
- Flag any security concerns before writing the code
- Use the language and frameworks already present in the context
Never write pseudocode when actual code was requested.

For debugging sessions:

You are a senior developer helping debug a specific problem.
- Ask clarifying questions before proposing solutions
- Reason through the problem step by step before giving an answer
- Identify the root cause, not just the symptom
- Explain why the proposed fix works, not just what to change

These system prompts go in Open WebUI under Admin PanelSettingsModels → select your model → System Prompt. Or set them in Continue's config under "systemMessage" for each model entry.

How Do You Troubleshoot Common Local LLM Problems?

Model loaded but 0 GPU layers are being used.

Ollama didn't detect your GPU. Check:

# NVIDIA: verify driver
nvidia-smi
 
# AMD (Linux): verify ROCm
rocm-smi
 
# Both: check Ollama logs
journalctl -u ollama -n 50

The Ollama logs will show the GPU detection attempt and the specific error if it failed. Common causes: driver version below the minimum, missing ROCm on AMD Linux, or a GPU not in Ollama's supported list.

Model generates garbled or incoherent output.

The most common cause: the model partially loaded into VRAM and partially into RAM. Check ollama ps — if GPU usage is not 100%, you're running a split configuration. Either pull a smaller model that fully fits in VRAM, reduce the model size with a lower quantization (Q4 instead of Q8), or accept the degraded speed.

Open WebUI can't connect to Ollama.

Verify Ollama is running and listening:

curl http://localhost:11434/api/tags

This should return a JSON list of your downloaded models. If it fails, Ollama isn't running. If it succeeds but Open WebUI still can't connect, the Docker networking is misconfigured — verify the --add-host=host.docker.internal:host-gateway flag is present in your Docker run command.

Context window exceeded — model starts forgetting earlier conversation.

Local models have context window limits: 4K to 128K tokens depending on the model. When you exceed the context window, the model either truncates old context (most Ollama models) or degrades in quality. To extend the context window beyond Ollama's default (4096 tokens for most models), set:

ollama run qwen2.5-coder:14b --context-size 32768

Or through the Ollama API. Larger context windows use more VRAM — a 32K context uses roughly 50% more VRAM than a 4K context for the same model.

Generation is extremely slow even with GPU.

Check whether another process is competing for VRAM. On Linux:

nvidia-smi --loop=1

Watch VRAM usage. If another process (another model, a gaming GPU, browser GPU acceleration) is occupying VRAM, your model is partially running in system RAM. Close competing processes or use ollama stop model-name to unload models you're not actively using.

When Is Local NOT the Right Choice?

I told you I'd be honest. Here's when the cloud is the better call.

The task requires genuinely frontier reasoning. Tasks like decompiling obfuscated code, architectural design for complex distributed systems, or analyzing a subtle race condition across a large codebase — these benefit from GPT-4o-class models or Claude Sonnet. Local models are catching up fast, but they're not there yet on the hardest tasks. The Claude Mythos Firefox 150 breakdown is a good illustration of the frontier capability gap — 271 zero-days found in a single release is not something a local 32B model is doing today.

You need a 70B-class model and don't have the hardware. Running a 70B model at Q4 on an 8GB GPU is painful: spilling into system RAM drops you to 5-10 tokens per second. The cloud gives you GPT-4-class capability at whatever speed their infrastructure provides.

You need the absolute latest models immediately. Cloud providers deploy new model versions continuously. Ollama's library has strong coverage but lags behind cloud availability by days to weeks.

You're building a product that serves customers. Running a local model on your development machine is great. Running one to serve production traffic requires provisioning inference infrastructure, which is a separate and substantial problem.

For day-to-day coding assistance, code review, research, documentation writing, and technical Q&A: local is the right choice. For the frontier edge cases: use the cloud and know what data you're sending.


Frequently Asked Questions

Can you run a local LLM without a GPU?

Yes. On a machine with 32GB system RAM and no dedicated GPU, a 7B model at Q4 runs at roughly 5-15 tokens per second. Usable for research and occasional queries. Painful for real-time coding assistance. An 8GB GPU changes that to 25-40 tokens per second on the same model.

What is the best local LLM for coding in 2026?

Qwen2.5-Coder is my recommendation for most hardware budgets. The 7B version runs on 8GB VRAM and handles everyday coding tasks well. The 14B version is meaningfully better on complex refactoring and debugging. If you have 24GB VRAM and want the best local coding experience, the 32B version closes a lot of the gap with cloud models.

Does Ollama support AMD GPUs?

On Linux with ROCm 6.x, yes. AMD GPU support on Windows is not officially available in Ollama as of early 2026. Windows AMD users should use WSL2 or accept CPU inference speeds.

How do you run a local LLM completely offline?

Pull the model while you have internet access:

ollama pull qwen2.5-coder:7b

After that, Ollama runs entirely offline. Open WebUI also runs locally. The whole stack works with no internet connection once everything is downloaded. Useful for flights, remote offices, or security-sensitive environments.

What is the difference between Ollama and LM Studio?

Ollama is API-first: you get a CLI and a REST API at localhost:11434. The right choice for developers who want to integrate local models into VS Code, Python scripts, or other tooling. LM Studio is GUI-first: a polished desktop app for chatting with models. The right choice if you just want to run a model and talk to it without building integrations. Both use llama.cpp as the inference backend.

How often should you update your models?

When you have a reason to. The Ollama library receives updates as model providers release new versions and quantizations. A useful workflow: every few weeks, run ollama list to see what you have and check the Ollama model library for whether a newer version of your model is available. The Qwen and Llama families in particular have had meaningful quality improvements across minor versions in 2025 and 2026.


For more on the local AI landscape — what it's doing to development workflows, how companies are responding, and where the technology is heading — check out the AI topic section on CoderOasis. If you set up a local image generator after getting the LLM working, the Stable Diffusion setup guide covers the same approach for image generation. And if the r/programming LLM debate got you thinking about how the developer community is actually processing all of this — that's worth a read too.