Running LLMs Locally Guide: Hardware, Tools and Setup That Actually Works

Running LLMs Locally Guide: Hardware, Tools and Setup That Actually Works

This running LLMs locally guide explains how to download a model and run it on your own computer instead of sending prompts to a hosted API. It gives you privacy, predictable costs and offline use, but only if the hardware, the model size and the runtime match each other. The central question is whether your machine can run a useful model at a usable speed, and the short answer is that most modern laptops can run a capable 7 to 8 billion parameter model, while a single gaming GPU opens up the far stronger 13 to 32 billion range.

Local models have matured quickly. Small models now handle drafting, summarising, code completion and retrieval-augmented question answering well enough for daily work. The hard part is no longer getting a model to run at all. It is choosing the right combination of model, quantisation and runtime for the job.

Key takeaways

  • Running LLMs locally means executing an open-weight model on your own hardware, which keeps prompts private and removes per-token billing.
  • Model size and quantisation decide what hardware you need: a 7B model at 4-bit quantisation needs roughly 6 GB of memory, while a 70B model needs around 40 GB.
  • Ollama is the easiest starting point, llama.cpp offers the most control and portability, and vLLM is built for serving many users from GPUs.
  • Start with one small, well-known model and measure its speed before downloading anything larger.
  • Check the licence of every model you deploy, because open weights do not always mean open source.

What running a model locally actually involves

A large language model is a set of weights, usually several gigabytes of numbers, plus a runtime that loads those weights into memory and generates tokens one at a time. When you run a model locally, your machine does both jobs: it stores the weights and it performs the arithmetic. Nothing leaves your computer unless you choose to send it somewhere. That is the whole appeal, and also the whole constraint, because the quality of the result is bounded by the memory and compute you own.

Two numbers matter more than any others. The first is memory: the model weights must fit in RAM or video memory, and a useful working context needs room on top. The second is speed, measured in tokens per second. Both are shaped by quantisation, the process of shrinking weights from 16-bit precision to 8-bit, 4-bit or lower. A 4-bit model uses roughly a quarter of the memory of its 16-bit original, with a small quality cost that most users never notice.

Hardware: what you need at each model size

Start from the model you want, then buy or allocate the hardware to fit it, not the other way round. A 7B model at 4-bit quantisation needs about 6 GB of memory, which fits on a laptop with 16 GB of RAM or a modest graphics card. A 13B model needs around 10 GB, a 32B model around 20 GB, and a 70B model around 40 GB. Those figures are approximate, because the context window and the runtime add overhead, but they are the right scale to plan around.

Graphics cards matter because they generate tokens far faster than a CPU. A consumer card with 16 to 24 GB of video memory, such as a mid-range gaming GPU, is the sweet spot for serious local use: it runs 13B to 32B models at interactive speeds. Apple Silicon machines are surprisingly capable, because their unified memory lets the GPU share the whole system RAM. Pure CPU inference works, but it is slow, typically a handful of tokens per second, which suits batch jobs rather than chat. Our guide to choosing hardware by workload goes deeper into this trade-off.

Ollama: the easiest way to start

Ollama wraps local inference in a model manager, so ollama pull downloads a model and ollama run starts chatting with it, all behind a background service that exposes both its own API and an OpenAI-compatible endpoint on port 11434. It runs on macOS, Windows and Linux, works on CPU, NVIDIA, AMD and Apple Silicon hardware, and its model library covers the well-known open families. For a developer who wants a local model behind an application, Ollama is the default first choice. Best for: developers who want a working local model in minutes with minimal setup.

Ollama’s engine is built on the llama.cpp ecosystem, with model management, prompt templates and an API layered on top. By default it serves one request per model at a time, which is fine for a single user but a bottleneck if several people share one machine. The fix is a configuration variable that raises the number of parallel requests, and it is worth knowing about before you conclude the tool is slow. If you are weighing local against hosted serving, see our comparison of local LLMs versus cloud APIs for the cost, privacy, latency and scale trade-offs.

llama.cpp: maximum control and portability

llama.cpp is the plain C and C++ inference engine underneath much of the local LLM world, with no heavy dependencies. It runs on almost anything, from a Raspberry Pi to a multi-GPU server, supports CPUs, CUDA, ROCm, Apple Silicon Metal, Vulkan and more, and it defines the GGUF file format that most local models are distributed in, with quantisation levels from 1.5-bit to 8-bit. Its server mode is OpenAI-compatible, so applications written against a hosted API can point at it with a changed base URL. Best for: engineers who need fine control, unusual hardware, or an embedded deployment.

The cost of that control is effort. You build the project, choose the quantisation, set the context length, and tune the number of parallel slots yourself. That is exactly what some teams want: a small model running on a device with no internet connection, or a server where every megabyte of memory is accounted for. For everyone else, Ollama’s defaults are a better use of time. Quantisation choices matter here more than anywhere, and our guide to LLM quantisation techniques explains how models shrink without losing their quality.

vLLM: serving many users from GPUs

vLLM is a serving engine built for throughput rather than for a single user. Its headline features are PagedAttention, a way of managing the key-value cache that wastes far less GPU memory, and continuous batching, which lets one GPU serve many requests at the same time far more efficiently than a runtime designed for one user. It also splits models across GPUs with tensor, pipeline and expert parallelism. It is licensed under Apache 2.0. Best for: teams serving many concurrent users or agents from GPU servers.

Running vLLM is a bigger commitment than running Ollama. It needs NVIDIA, AMD or Intel GPUs, a Python environment, and enough operational attention to tune batching and memory settings. That is the right price when the model sits behind an internal API that dozens of people or agents call at once, and the wrong price for a laptop.

LM Studio: the friendly desktop option

LM Studio is a polished desktop application with a model browser, a chat interface and a local API server. It is the easiest way to try models interactively, compare two models side by side, and see how a model behaves before wiring it into code. It is free to use, but the application itself is not open source, which matters to teams with strict tooling policies. Best for: non-developers and anyone exploring models before committing to one.

LM Studio and Ollama overlap, but they aim at different users. LM Studio is a desktop app for exploring; Ollama is a service for building. Many teams use both: LM Studio to evaluate a model by hand, Ollama to serve it in production.

Comparing local LLM runtimes

Runtime Licence Ease of setup Best at Main weakness
Ollama MIT Easiest Developer use and quick starts One request per model by default
llama.cpp MIT Low to medium Control and odd hardware Manual tuning and setup
vLLM Apache 2.0 Hardest Many concurrent users on GPUs Needs GPUs and operational care
LM Studio Proprietary, free to use Easiest Exploring models interactively Not open source; not a server

The table makes the decision simpler than it first looks. Pick the runtime that matches how many people will use the model, then pick the model that fits the hardware that runtime runs on. If you need help sizing that hardware, our hardware sizing guide walks through matching GPUs to model sizes.

An open desktop computer case showing a graphics card installed inside, on a workbench with tools
A graphics card inside a desktop case is the single most effective upgrade for local inference, turning a slow CPU-bound model into an interactive one.

Choosing a model: size, quality and licence

Model families worth knowing include Llama from Meta, Qwen from Alibaba, Mistral, Gemma from Google and DeepSeek. Small models in the 7 to 8 billion parameter range handle everyday drafting, summarising and question answering, and they run on ordinary laptops. Mid-range models around 13 to 32 billion parameters are noticeably stronger at reasoning and code, and need a good GPU. Large models at 70 billion parameters and above are the strongest open weights available, but they need serious hardware and are usually served from a server.

Licences deserve a careful read, because open weights are not the same as open source. Some models carry permissive licences such as Apache 2.0 or MIT, which allow commercial use with attribution. Others carry custom community licences with conditions, such as a user threshold above which a separate agreement is required, naming rules for derived models, and an acceptable use policy. Read the licence file in the model’s own repository before deploying it, and re-check it when you upgrade, because the licence can change between releases.

Running LLMs locally checklist

  • One model is chosen for one job, and its size fits the memory you actually own.
  • The model runs at an interactive speed on your hardware before it goes into any workflow.
  • Quantisation is set deliberately, not left at whatever the download defaulted to.
  • The runtime exposes an OpenAI-compatible API, so the application is not locked to one tool.
  • Prompts and outputs stay on your machine, with no accidental telemetry to a hosted service.
  • The model licence has been read and its conditions are recorded somewhere the team can find them.
  • A fallback is defined for when the local model cannot answer, such as a smaller model or a human review.

Frequently asked questions

Can I run an LLM on a normal laptop?

Yes. A laptop with 16 GB of RAM can run a 7B model at 4-bit quantisation at usable speeds, and Apple Silicon laptops with more unified memory can run larger models. Expect slower output than a hosted API, and choose a small model rather than fighting the hardware.

How much VRAM do I need for local LLMs?

As a rough guide, a 7B model at 4-bit quantisation needs about 6 GB, a 13B model about 10 GB, a 32B model about 20 GB, and a 70B model about 40 GB. Add headroom for the context window, because long conversations and documents consume extra memory.

Is running LLMs locally private?

Yes, if the model and the runtime are genuinely local and the application does not send prompts elsewhere. Check for telemetry in the runtime and in any chat interface you use, and keep the service bound to your local network unless you deliberately expose it.

Which is better, Ollama or llama.cpp?

Ollama is better for most people because it manages models and exposes an API with almost no setup. llama.cpp is better when you need fine control, unusual hardware, or the smallest possible footprint. They share the same underlying engine family, so switching later is straightforward.

Do local models match hosted models in quality?

For everyday tasks such as drafting, summarising and code completion, a well-chosen local model is close enough that most users will not notice the difference. For the hardest reasoning, long-context analysis and frontier capabilities, hosted frontier models still lead, which is why many teams use both.

Latest articles

Scroll to Top