Skip to content
AGI Fans

How to run an LLM on your own computer

What you need to run an AI model locally: the tools (Ollama, LM Studio, llama.cpp, MLX), how much memory, what quantization is, and when to rent a GPU instead.

Updated · 5 min read · How guides are written

To run a language model on your own computer you need three things: a model whose weights are published, a program that runs it, and enough memory to hold it. The fastest route is to install Ollama, type one command, and start chatting. The rest of this guide explains what is happening and how to choose a model that fits your machine.

Why run one locally

  • Privacy. Nothing you type leaves your computer.
  • Cost. No subscription and no per-token bill.
  • It works offline and cannot be changed or withdrawn by its maker.
  • You learn how the thing works, which makes the news easier to follow.

The trade-off is capability. The models that fit on a laptop are smaller than the ones behind the big chat apps.

What you need

A model with open weights

Only models whose weights have been released can be run locally. Labs including Meta, Google, Mistral, Microsoft, Alibaba and DeepSeek publish them, mostly on Hugging Face. Each comes with a licence that says what you may do with it; see Open weights vs open source.

Memory, above all

The rule that matters: the model file has to fit in memory, with room to spare. If you have a graphics card, that means its own memory (VRAM). On an Apple silicon Mac, the main memory is shared with the graphics chip, which is why those machines run models well. With neither, the model runs on the processor from ordinary RAM, slowly.

“Room to spare” is for the context: the longer the conversation or document, the more memory it takes on top of the model itself.

You can check before downloading. Model pages list the file size of each version. If the file is 5 GB, you need comfortably more than 5 GB of free memory on whatever will run it.

Quantization, the trick that makes it fit

A model’s weights are numbers. Stored at full precision they take a lot of space. Quantization stores them with fewer bits each, which shrinks the file to a fraction of its size at a small cost in quality. Nearly every model you run locally is quantized.

You will see labels such as Q4 or Q8 on downloads. Lower numbers mean smaller files and slightly worse output. A 4-bit version is the common starting point: much smaller than the original, with quality most people find hard to tell apart in everyday use.

The usual file format is GGUF, a single file containing the quantized weights and everything needed to run them. Hugging Face documents the format and lets you browse models that offer it.

The tools

ToolWhat it isGood for
OllamaA command-line program and local server that downloads and runs modelsGetting started in five minutes; using local models from other apps
LM StudioA desktop app with a chat window and a model browserPeople who prefer not to use a terminal
llama.cppThe open-source engine that many other tools are built onMaximum control; unusual hardware
MLX LMApple’s open-source framework for running models on Apple siliconMacs with M-series chips
Open WebUIA self-hosted chat interface in the browserA ChatGPT-style screen on top of Ollama
vLLMA high-throughput inference serverServing a model to many users from a GPU server

New versions of all of these appear in the Releases lane. Support for a newly announced model usually lands in them within days.

Your first model, in three steps

  1. Install Ollama from ollama.com. It is available for macOS, Windows and Linux.

  2. Run a model. Open a terminal and type the example from Ollama’s own instructions:

    ollama run gemma4
    

    The first time, it downloads the model. Then you get a prompt and can start typing.

  3. Try others. The Ollama library lists what is available, with sizes. Pick the largest that fits your memory.

Ollama also runs a small server on your machine, so editors, note-taking apps and tools such as Open WebUI can use your local model.

Choosing a model that fits

  • Start from your memory, not from the leaderboard. Find how much VRAM or unified memory you have, then look for models whose 4-bit file is comfortably smaller.
  • Bigger is generally better, slower and hungrier. Parameter counts are in the name: a model labelled 4B has about four billion parameters, one labelled 30B about thirty billion.
  • Match the model to the job. There are models tuned for coding, for reasoning, for images as input. A small specialised model often beats a larger general one at its own task.
  • Try two or three. Downloading is free. Your own prompts are the only benchmark that counts; AI benchmarks explained says why.

When your computer is not enough

If the model you want does not fit, there are two honest options.

Rent a GPU by the hour. Cloud GPU providers let you start a machine with a large graphics card, run your model, and shut it down when you are finished. For occasional use, or for trying a large model before deciding to buy anything, this costs far less than hardware. Runpod is one such service; the large cloud platforms offer GPU machines as well. Check the hourly price for the card you need, and remember to stop the machine.

Buy more memory. For running models every day, a graphics card with more VRAM, or a Mac with more unified memory, pays for itself over time. Memory is the specification to compare, ahead of raw speed. You can browse graphics cards with 16 GB or more on Amazon; check current prices and confirm that a card fits your case and power supply before buying.

A third option needs neither: use open models through a hosted API. You lose the privacy of running locally, but keep the choice of model.

What to expect

A local model on a decent machine is quick, private and good at everyday tasks: summarising, rewriting, answering questions about a document you paste in, helping with code. It will be weaker than the largest hosted models on long chains of reasoning and on recent knowledge, and it has no web access unless you add a tool that provides it.

That is still a remarkable thing to have on your own desk. And once you have run one, terms like tokens, context and quantization stop being jargon. Tokens and context windows picks up from here.

Common questions

Can I run an LLM without a graphics card?

Yes. Small models run on an ordinary processor, only slowly. A graphics card, or an Apple silicon Mac, makes the difference between a few words a second and a comfortable reading speed.

Is a local model as good as ChatGPT or Claude?

The models that fit on a typical laptop are less capable than the largest hosted ones, especially on long or difficult tasks. For summarising, drafting, coding help and private documents, a good local model is often enough.

Is it free?

The software named in this guide is free to download, and open-weight models are free to download under their licences. Your costs are the hardware and the electricity.