How to run an LLM locally: runners, memory, and local vs hosted
How to run an LLM locally: what a runner such as Ollama or LM Studio does, how much memory a model needs, whether local is private, and local vs hosted.
By Unrestricted team · Editorial standards
To run an LLM locally, you need a runner such as Ollama, LM Studio or llama.cpp, and a model file small enough for your computer's memory. You install the runner, download a model (from under 1GB to tens of GB, depending on its size) and start chatting. With a local model, your prompts stay on your own machine.[1][2]
A local LLM is a large language model that runs on your own computer instead of a company's servers. The models people run this way are open-weights models, uncensored ones included; our guide to what an uncensored LLM is and how it's made covers those. This guide covers the hardware, three runners (Ollama, LM Studio and llama.cpp), whether local is private, and how local compares with a hosted chat.
What you need: a runner, a model file and enough memory
A runner is the program that loads a model file and generates text from it. Each of the three runners here can fetch a model for you: Ollama downloads the model and starts a chat when you run it,[3] LM Studio has a built-in downloader for models on Hugging Face,[4] and llama.cpp can download and run a model file straight from a Hugging Face repository.[5] The steps are the same whichever you choose:
- 01
Check your memory
Look up how much RAM your computer has, and how much video memory (VRAM) its graphics card has, if it has one. That sets the largest model you can run.
- 02
Install a runner
Download Ollama or LM Studio from its website, or install llama.cpp.
- 03
Pick a model that fits
Choose a model whose download is well under your memory. A 4-bit version is a sensible place to start.
- 04
Start a chat
In Ollama, typing ollama run and a model name in a terminal downloads the model and opens a chat. The Ollama and LM Studio desktop apps have a chat window instead.
All three runners support macOS, Windows and Linux, with limits on the Mac: LM Studio needs an Apple Silicon Mac, and Ollama needs macOS 14 or newer.[3][6][7][5]For the models in the table below, Ollama's default download is the 4-bit q4_K_M version,[8][9][10][11] and LM Studio suggests a 4-bit option or higher if your machine can run it.[4] Each model also comes with its own license; our guide to open-source LLM models compares the main families and what their licenses let you do.
How much memory a model needs
A model runs from memory, so it has to fit in your RAM, your graphics card's VRAM, or the two combined. Its size depends on two numbers: how many parameters it has (the 8B in Llama 3.1 8B means 8 billion) and how many bits each one is stored in.
The second number is what quantization changes. Hugging Face's documentation describes quantization as storing a model's weights in fewer bits so it needs less memory: an 8B model needs about 16GB for its weights at 16-bit (bf16) precision, about 8GB at 8 bits and about 4 to 5GB at 4 bits. Fewer bits cost some accuracy, and each quantization method trades memory, speed and accuracy differently.[12]
GGUF is a file format created by llama.cpp's developer, built for quick loading, that stores the weights together with the model's metadata,[13] so one file holds the weights, the config and the tokenizer.[12]Hugging Face's GGUF docs list llama.cpp, LM Studio, GPT4All and Ollama as tools that use it.[13] Quantized files carry names such as Q4_K_M or Q8_0, and llama.cpp measures Llama 3.1 8B at about 4.9 bits per weight in Q4_K_M, 6.6 in Q6_K and 8.5 in Q8_0.[14] LM Studio describes these as copies of the same model at varying degrees of fidelity.[4]
Real download sizes from Ollama's library show the effect. The same model is roughly half the size at 8-bit and about a third at 4-bit, compared with 16-bit:
| Model | 4-bit (q4_K_M) | 8-bit (q8_0) | 16-bit (fp16) |
|---|---|---|---|
| Llama 3.2 3B[8] | 2.0GB | 3.4GB | 6.4GB |
| Llama 3.1 8B[9] | 4.9GB | 8.5GB | 16GB |
| Gemma 3 12B[10] | 8.2GB | 13GB | 24GB |
| Mistral Small 24B (2501)[11] | 14GB | 25GB | 47GB |
| Gemma 3 27B[10] | 17GB | 30GB | 55GB |
| Llama 3.1 70B[9] | 43GB | 75GB | 141GB |
Dividing each size by the parameter count in the model's name gives about 2 bytes per parameter at 16-bit, a little over 1 byte at 8-bit and roughly 0.6 to 0.7 bytes at 4-bit. The 4-bit figure sits at the top of Hugging Face's range, or a little above it, because Q4_K_M uses about 4.9 bits per weight rather than 4.[14]The file size is the floor, not the total. The model also needs memory for its context, the text of the conversation it is working with: Ollama's FAQ says the RAM a model needs scales with its context length and the number of requests it handles at once.[1]Ollama picks its default context by VRAM: 4k tokens below 24GiB, 32k at 24 to 48GiB and 256k at 48GiB or more. You can change it with the slider in the app's settings, and a larger context needs more memory.[15]
What the runners recommend. LM Studio recommends 16GB of RAM or more on a Mac, and at least 16GB of RAM plus 4GB of dedicated VRAM on Windows. It says you may still be able to use it on an 8GB Mac if you stick to smaller models and modest context sizes.[6]Ollama's docs list operating systems but no RAM minimum, and warn that models can be tens to hundreds of GB on disk.[7][16]
Published examples.Ollama's page for OpenAI's gpt-oss says the smaller (20B) model can run on systems with as little as 16GB of memory, while the larger (120B) model fits on a single 80GB GPU.[17] Mistral AI says its 24B Mistral Small 3, once quantized, can run on a single RTX 4090 or a MacBook with 32GB of RAM.[18]
Where the model loads. If a model fits on one GPU, Ollama loads it there; if not, it spreads it across the available GPUs, and ollama ps shows whether a model is on the GPU, in system memory or split between them (for example, 48%/52% CPU/GPU).[1]llama.cpp can split a model between CPU and GPU to partially accelerate models larger than the card's VRAM.[19] On a Mac, Ollama uses both the CPU and GPU of Apple M-series chips, but only the CPU on Intel Macs.[7]
Ollama, LM Studio and llama.cpp compared
Ollama and llama.cpp are open source under the MIT license,[20][19] while LM Studio is a proprietary app: its terms make the software the exclusive property of Element Labs (the company behind it) and its suppliers.[21] LM Studio has always been free for personal use and became free for work on July 8, 2025,[22] though its terms say certain features may be offered for a fee.[21]Here is how the three compare, from each project's own docs:
| Ollama | LM Studio | llama.cpp | |
|---|---|---|---|
| Platforms | macOS 14 Sonoma or newer (Apple M series, or Intel with CPU only), Windows 10 22H2 or newer, and Linux[7][16][3] | macOS 14 or newer on Apple Silicon (Intel Macs aren't supported), Windows on x64 with AVX2 or on ARM (Snapdragon X Elite), and Linux on x64 or ARM64 as an AppImage (Ubuntu 20.04 or newer)[6] | macOS and Linux through an installer or Homebrew, Windows through WinGet, Docker, or built from source; it can also be built for Android[5][23] |
| Interface | A desktop app with a chat window on macOS and Windows, the ollama run command line, and a local API at localhost:11434[24][3] | A desktop app with chat and a model downloader, the lms command line, and a local server with OpenAI-like endpoints[25][4] | Command-line tools (llama cli) and a server (llama serve, documented as llama-server) with a web UI and OpenAI-compatible chat completions, responses and embeddings routes[5][26] |
| Model formats | Models from Ollama's library, plus GGUF files or Safetensors weights you import with a Modelfile[27] | GGUF models (run with llama.cpp) on all three systems, plus MLX models on Apple Silicon Macs[25][13] | GGUF files, which it can download straight from Hugging Face[5] |
| License | Open source (MIT). Optional cloud models need a sign-in[20][28] | Proprietary; free for home and work use. Its terms license it for personal and internal business use[22][21] | Open source (MIT)[19] |
Which one suits you depends on how you like to work. LM Studio is built around browsing and downloading models in a window. Ollama gets a model downloaded and chatting with one command, and its local API is there for other apps that want to use your models. llama.cpp is the most hands-on: you pick the GGUF file and the settings yourself, and it is also one of the engines LM Studio runs models with.[25]
Is a local LLM private?
As far as your prompts go, yes. With a local model and no connected tools, your prompt doesn't leave your machine. Ollama says it doesn't see your prompts or data when you run locally,[1] and LM Studio says nothing you enter when chatting leaves your device, and documents you attach stay on your machine.[2] A few things still reach outside:
Downloads and updates.Searching for models, downloading them and updating the app all use the network; LM Studio's Discover tab, for example, sends requests to Hugging Face.[2]
Cloud features. Ollama also offers cloud models and web search.[1]Ollama says it processes cloud prompts and responses to answer your requests and doesn't use them to train models,[28] and you can run it in local-only mode by turning its cloud features off.[1] If you want everything on your machine, use local models only.
Tools and plugins. LM Studio can connect MCP servers to your local models, including remote ones, and warns that some MCP servers can run arbitrary code, access your local files and use your network connection.[29] With tools connected, what the model passes to them can leave your machine.
Your own computer. LM Studio, for example, saves chats as JSON files in ~/.lmstudio/conversations (%USERPROFILE%\.lmstudio\conversations on Windows), so they are only as private as your computer is.[30] And if you serve a model to other devices (LM Studio, for one, can serve models on your network[25]), then unless you turn on authentication (LM Studio's is off by default), anything that can reach that server can send it prompts.[31]
A hosted chat works the other way round: your prompt goes to whoever serves the model. That is the main trade in the comparison below.
Local vs hosted
A hosted chat runs the model on someone else's hardware and sends you the answer. Here is how that compares with running a model yourself. The hosted column uses Unrestricted as one labeled example, based on how our product works today and our Terms.
| Local (Ollama, LM Studio, llama.cpp) | Hosted (example: Unrestricted) | |
|---|---|---|
| Where your prompt goes | Stays on your computer when you use a local model with no connected tools[1][2][29] | To the third-party inference provider that serves the model. Saved chats are stored on our servers. On the web, incognito (new text-only chats) isn't saved to our database, but the prompt still goes to the model provider. |
| Hardware | Your memory sets the model size; LM Studio recommends 16GB of RAM or more[6] | No GPU and no model download. You chat on the web or in the iPhone app (iOS 18 or later). |
| Devices | LM Studio has desktop apps for macOS, Windows and Linux, and Ollama has one for macOS and Windows (on Linux it runs from the command line). llama.cpp runs from the command line or its server's web UI, and can be built for Android[25][24][3][26][23] | A web browser, and an iPhone app (iOS 18 or later). |
| Setup | Install a runner and download a model, from under 1GB for the smallest models (gemma3:1b is 806MB) to tens of GB for a large one[10][9] | On the web, sign in with Google or a verified email. The iPhone app doesn't ask for an account. |
| Web search | Not from the model itself. Ollama's web search is a cloud feature, and it goes away in local-only mode. LM Studio can connect MCP tools, which may use your network connection[1][29] | Web search with citations is included at no extra cost. |
| Works offline | Yes, once the model is downloaded[2] | No. Every prompt goes to the third-party inference provider that serves the model. |
| Which model | Any model your runner supports: Ollama runs whichever model you name in ollama run, and LM Studio downloads any supported model from Hugging Face[3][4] | One uncensored open-weights model based on Dolphin-Mistral-24B. |
| Refusals | With a local model, only what the model was trained to refuse; no service sits in between[1][2] | We add no filter or classifier of our own, but the model provider still refuses some prompts, and our Terms ban some uses. |
| Usage limits | None set by a service when you run a local model: it runs on your own machine, even offline[2] | A free allowance to try it, then Pro. On the web, Pro removes the message quota; per-minute rate limits still apply. |
Uncensored models to run
Uncensored models, open-weights models with their refusal behavior trained or edited out (explained in our guide to uncensored LLMs), run in these runners like any other model, and Ollama's library includes some, such as dolphin-mistral.[32] Our guide to Ollama uncensored models lists them with their download sizes, and our comparison of the best uncensored LLMs lines up the main families by size, license and method.
Frequently asked
What is a local LLM?
A local LLM is a large language model that runs on your own computer instead of a company's servers. You download the model file and run it with a program such as Ollama, LM Studio or llama.cpp. Once the model is downloaded, it can work without an internet connection.
Can I run an LLM on my laptop?
Yes, if the model fits in its memory. LM Studio recommends 16GB of RAM or more, and says you may still be able to use it on an 8GB Mac if you stick to smaller models and modest context sizes. Small models are small downloads: in Ollama's library, Llama 3.2 3B is 2.0GB at its default 4-bit quantization.
How much RAM do I need to run an LLM locally?
Enough for the model file plus its context. Hugging Face's documentation puts an 8B model at about 16GB for its weights at 16-bit, about 8GB at 8 bits and about 4 to 5GB at 4 bits. LM Studio recommends at least 16GB of RAM, and Ollama notes that the memory a model needs grows with its context length.
Is running an LLM locally private?
With a local model and no connected tools, your prompt doesn't leave your machine. Ollama says it doesn't see your prompts when you run locally, and LM Studio says nothing you enter in a chat leaves your device. Downloading models still uses the internet, and Ollama's cloud models and web search, or tools you connect such as remote MCP servers, can send data out, so turn those off if you want everything local.
Is Ollama or LM Studio better for beginners?
Both have a desktop app with a chat window, Ollama's on macOS and Windows. LM Studio is built around browsing and downloading models in the app, while Ollama starts a chat with a model in one terminal command and is open source under the MIT license. Either is an easier start than llama.cpp, which leaves the files and settings to you.
Sources
Checked November 2026.
- Ollama FAQ, Ollama docs
- Offline operation, LM Studio docs
- Quickstart, Ollama docs
- Download an LLM, LM Studio docs
- GGUF usage with llama.cpp, Hugging Face Hub docs
- System requirements, LM Studio docs
- Ollama on macOS, Ollama docs
- llama3.2 tags, Ollama library
- llama3.1 tags, Ollama library
- gemma3 tags, Ollama library
- mistral-small tags, Ollama library
- Quantization overview, Hugging Face Transformers docs
- GGUF, Hugging Face Hub docs
- llama.cpp quantize README (Llama 3.1 8B measurements), ggml-org on GitHub
- Context length, Ollama docs
- Ollama on Windows, Ollama docs
- gpt-oss, Ollama library
- Mistral Small 3 (announcement, January 2025), Mistral AI
- llama.cpp (README and license), ggml-org on GitHub
- Ollama license (MIT), Ollama on GitHub
- App terms of use (version August 23, 2026), LM Studio
- LM Studio is free for use at work (July 2025), LM Studio blog
- llama.cpp on Android, ggml-org on GitHub
- Ollama's new app (July 2025), Ollama blog
- LM Studio docs (overview), LM Studio docs
- llama.cpp server README, ggml-org on GitHub
- Importing a model, Ollama docs
- Cloud, Ollama docs
- Use MCP Servers, LM Studio docs
- Manage chats, LM Studio docs
- Authentication, LM Studio developer docs
- dolphin-mistral, Ollama library
Keep reading
Is ChatGPT safe? Privacy, accuracy and fake-app scams, explained
Is ChatGPT safe to use? What OpenAI keeps, when ChatGPT gets things wrong, how to spot fake ChatGPT apps and scams, and how to secure your account.
Open-source LLM models: open weights, the main families and their licenses
What 'open source' means for LLM models, how open weights differ from open source, the main model families, and what their licenses let you do.
Ollama uncensored models: what's in the library and how to run one
Which uncensored models are in the Ollama library, such as dolphin-mistral, what each is based on, download sizes, licenses, and how to pull and run one.