Run DeepSeek-R1 Locally with Ollama
Run quantized DeepSeek-R1 distilled models on Apple Silicon Macs, Windows, or Linux with Ollama and expose a local OpenAI-compatible endpoint.
On this page
1. VRAM and hardware requirements
In Ollama's library, tags from 1.5b to 70b are quantized DeepSeek-R1-Distill models (distilled onto Qwen and Llama dense architectures). The full 671B MoE deepseek-r1:671b and DeepSeek-V3 weights require roughly 400 GB+ of VRAM across multi-GPU server hardware. Match the distilled tag to your available GPU VRAM or Apple Silicon unified memory:
| Model Tag | Parameters | Minimum Memory | Recommended Hardware |
|---|---|---|---|
deepseek-r1:1.5b | 1.5B | 4 GB | Standard Laptops / Raspberry Pi |
deepseek-r1:7b / 8b | 7B ~ 8B | 8 GB | RTX 3060 / 4060 / Mac 8GB+ |
deepseek-r1:14b | 14B | 12 GB | RTX 4070 / Mac 16GB+ |
deepseek-r1:32b | 32B | 20 GB | RTX 3090 / 4090 / Mac 24GB+ |
deepseek-r1:70b | 70B | 48 GB | Dual RTX 3090 / Mac 64GB+ |
Install Ollama and run model
- Download and install Ollama from ollama.com.
- Execute this command in your terminal to pull and run the model:
ollama run deepseek-r1:7bType /bye (or press Ctrl + D) when you want to exit the terminal chat prompt. On macOS and Windows, the Ollama desktop app already runs a background OpenAI-compatible server on http://127.0.0.1:11434—you do not need to run ollama serve manually unless the tray app is closed or you are overriding environment variables.
Configure LAN access (Optional)
To allow trusted LAN devices or local containers to reach your Ollama server, quit the Ollama menu-bar/tray app first, then set environment variables before starting ollama serve (on Windows PowerShell, use $env:OLLAMA_HOST="0.0.0.0:11434"):
# macOS / Linux (trusted LAN only)
export OLLAMA_HOST=0.0.0.0:11434
export OLLAMA_ORIGINS="http://localhost:*,http://192.168.*"
ollama serve11434 directly to a public IP without an authenticated reverse proxy and firewall rule.Connect tools and coding assistants
In any tool supporting custom OpenAI providers (such as Continue, Cherry Studio, or DSH Custom Provider), set:
- API Base URL:
http://localhost:11434/v1 - API Key: Any placeholder (e.g.
ollama) - Model Name: Your local model tag (e.g.
deepseek-r1:7b)
5. Troubleshooting
Out of memory (OOM) errors during model load
Your GPU VRAM cannot fit the selected model. Switch to a smaller model size (such as 7b or 1.5b).
Slow generation speeds (Low tokens/sec)
Ensure layers are running on the GPU rather than being offloaded to CPU. Run ollama ps to check GPU offloading status.