
How to Run an AI Model Locally—And Why You Might Want To
Decrypt guide to running open-weight AI models locally with Ollama and LM Studio. It cites Epoch AI's finding that open models trail the best closed ones by about four months, and sets out VRAM and unified-memory needs (8GB minimum, 24GB for serious use), quantization, licences (MIT, Apache 2.0), install commands and Gemma 4 download sizes. It also notes that the largest open models, such as Qwen3.8-Max, exceed consumer hardware.
What it claims
The guide's practical content goes past its headline figures. It lists exact Ollama commands, LM Studio's minimum specs, memory figures for OpenAI's gpt-oss models and Ollama's local API port. It also flags a privacy trap: some Ollama model names run remotely. On capability, it cites Epoch AI's May 29, 2026 analysis that open-weight models have trailed the best closed models by an average of four months since January 2026. It adds that closed models won 24 of 31 tests in Alibaba's own comparison.
How to use it
Ollama install, as listed on Ollama's download page:
curl -fsSL https://ollama.com/install.sh | shOn Windows, in PowerShell:
irm https://ollama.com/install.ps1 | iexTo download and chat with a model (type /bye to exit):
ollama pull gemma4:e2b
ollama run gemma4:e2bOllama exposes a local API at http://localhost:11434, so other apps on the same machine can call the model.
Names ending in :cloud, such as gemma4:cloud, run on Ollama's servers and need no download. They do not keep prompts local. The article states that these API calls are not stored or used for training, but gives no source for that claim.
LM Studio installs from lmstudio.ai and searches Hugging Face for models inside the app. Its documented requirements are:
- Apple Silicon: macOS 14 or newer with 16GB+ RAM. 8GB Macs can run smaller models.
- Windows: at least 16GB RAM, 4GB dedicated VRAM and a CPU with AVX2.
- Intel Macs: not supported.
LM Studio added MCP (Model Context Protocol) support in version 0.3.17, which gives local models web search and file access. It can run fully offline once model files are downloaded, including for documents attached to a chat.
Memory figures by model:
| Model | Memory needed | Licence |
|---|---|---|
| Gemma 4 26B (Ollama) | 16 to 19GB | Apache 2.0 |
| Gemma 4 31B (Ollama) | 19 to 20GB | Apache 2.0 |
| gpt-oss-20b | 16GB | Apache 2.0 |
| gpt-oss-120b | within 80GB | Apache 2.0 |
DeepSeek R1 is under MIT, and its model card permits commercial use and derivative works. Google's Multi-Token Prediction drafters for Gemma 4 are on Ollama under Apache 2.0. They speed up generation by up to 3x through speculative decoding: a small model drafts several tokens, and the target model accepts the whole sequence in one forward pass if it agrees, adding one token of its own in that pass.
Limits
Gemma 4's small models have a 128K-token context window and the larger ones 256K. Longer contexts need more memory. When a model spills from VRAM into system RAM, responses slow down a lot.
Qwen3.8-Max has 2.4 trillion total parameters with 95 billion active, far beyond consumer hardware. The four-month gap figure applies to the most capable open models, which are the ones that do not fit on local machines.
The 3x drafter speedup is Google's "up to" figure. The article gives no benchmark setting for it.
Organisations named here
- Epoch AI
- Alibaba
- OpenAI
- DeepSeek
- Hugging Face
- Ollama
- LM Studio
- NVIDIA
- Decrypt
- Kagi
- xPrivo
Technologies named here
- Gemma 4
- Ollama
- gpt-oss-20b
- LM Studio
- Hugging Face
- gpt-oss-120b
- DeepSeek R1
- Qwen3.8 Max
- Gemma
- DeepSeek
- Model Context Protocol
- macOS
- Windows
- Linux
- NVIDIA DGX Spark
- gpt-oss
- Kagi
- xPrivo
Techniques named here
- Quantization
- Speculative decoding
Concepts named here
- Context window
- Local versus cloud privacy
- Model Context Protocol (MCP)
- Open-source licenses
- Open-weight models
- VRAM and unified memory
Also named here
- DeepSeek-R1
Related in inference

