Run a Private AI Model on Your Laptop With LM Studio or Ollama
A non-developer's guide to local open-weight models: the hardware you need, LM Studio and Ollama step by step, and settings that keep data on your machine.
Key figures
- 16 GB
- RAM recommended by LM Studio
- 11434
- Ollama's default local port
- 4,096
- Ollama default context (tokens)
Every prompt you send to a hosted chatbot travels to someone else's servers. For most tasks that's fine. For a confidential contract, patient notes, unreleased financials or a journalist's source list, it may not be. Running an open-weight model on your own laptop removes that question: the model, your documents and the conversation never leave the machine, and it works on a plane.
The trade-off is capability. Laptop-sized models are good at summarising, rewriting, drafting and answering questions about documents you give them, but weaker than frontier cloud models at complex reasoning. This tutorial covers two free tools: LM Studio, a graphical app, and Ollama, a lightweight runner you control from the terminal. Instructions reflect each project's documentation in November 2026 (LM Studio 0.4.29).
Step 1: Check your hardware
| Platform | Requirement (LM Studio) |
|---|---|
| Mac | Apple Silicon (M1 or later), macOS 14 or newer; Intel Macs not supported |
| Windows | x64 with AVX2 support, or ARM (Snapdragon X Elite) |
| Linux | x64 or ARM64; Ubuntu 20.04 or newer |
| Memory | 16 GB+ RAM recommended; 4 GB+ dedicated VRAM for GPU use on PCs |
Ollama suggests 8 GB of available VRAM, or unified memory on a Mac, for comfortable speeds; it falls back to system RAM, more slowly, if you have less. An 8 GB Mac can work with small models and short conversations.
Step 2: Pick a model that fits
Model files come in sizes. A useful rule: choose one whose download is comfortably below your total memory, leaving room for the operating system and your documents. Google's Gemma 4 family, as listed in Ollama's model library, illustrates the range:
| Ollama tag | Download size | Context window |
|---|---|---|
gemma4:e2b | 4.6–7.5 GB | 128K |
gemma4:e4b | 6.6–9.5 GB | 128K |
gemma4:12b | 7.7–8.0 GB | 256K |
gemma4:26b | 16–19 GB | 256K |
On a 16 GB laptop, start with e4b or 12b. All accept text and images.
Step 3, option A: LM Studio (no terminal)
- Download the installer from lmstudio.ai and open it. Choose the User interface mode if asked.
- Search for a model inside the app — it pulls from Hugging Face — and download a size that fits your machine. On Apple Silicon, MLX versions are optimised for Macs; elsewhere, GGUF versions run via llama.cpp.
- Load the model and start a chat.
- To work with files, attach documents to a message; LM Studio can answer questions about them fully offline.
- Once your models are downloaded, you can disconnect from the internet entirely. LM Studio's docs state it can run fully offline as long as you have model files.
LM Studio is free to download; if you plan to use it at work, read its terms of use on the site.
Step 3, option B: Ollama (terminal)
Install Ollama from ollama.com/download, open the app once, then in a terminal:
# download and chat with a local model (type /bye to exit)
ollama run gemma4:e4b
# download without starting a chat
ollama pull gemma4:12b
# see what's installed, and remove what you don't need
ollama list
ollama rm gemma4:e2bImportant for privacy: Ollama also offers cloud models, with tags ending in cloud (for example gemma4:31b-cloud). These run on Ollama's servers, not your laptop. Ollama says cloud prompts are not stored or used for training, but if your goal is that nothing leaves the device, turn cloud features off. Set the environment variable OLLAMA_NO_CLOUD=1, or add "disable_ollama_cloud": true to ~/.ollama/server.json, then restart Ollama. You lose cloud models and web search; local models keep working.
Tips and pitfalls
- Raise the context for long documents. Ollama's default context window is 4,096 tokens, roughly a few pages. Set
OLLAMA_CONTEXT_LENGTH(for example to 32768) if you plan to paste long reports, and expect higher memory use. - Keep the server private. Ollama listens on
127.0.0.1port11434by default, meaning only your own computer can reach it. Don't changeOLLAMA_HOSTto expose it on a network unless you understand who else could connect. - Protect the laptop itself. Local models move the risk from a vendor's servers to your device. Turn on FileVault (Mac) or BitLocker (Windows).
- Check model licences. Open-weight does not always mean unrestricted; read the licence on the model card before commercial use.
- Verify outputs. Smaller models make confident mistakes more often. Use them for drafts and summaries you will check, not for facts you can't verify.
Next steps
Both tools can expose an OpenAI-compatible local server, so other apps on your laptop — note-taking tools, writing assistants — can use your private model instead of a cloud one. Try one workflow first, such as summarising meeting notes, and judge quality against what you'd get from a hosted assistant.
Researched and drafted with AI assistance under editorial review. Report errors to support@aiseeker.dev.
Sources
This report synthesises the sources below. Primary sources are marked.
- [1]System Requirements
LM Studio Docs2026.11.28Primary
- [2]LM Studio Docs
LM Studio2026.11.28Primary
- [3]Quickstart
Ollama Docs2026.11.28Primary
- [4]FAQ
Ollama Docs2026.11.28Primary
- [5]gemma4
Ollama Library2026.11.28Primary