DeepSeekDSH
Independent community guideNot affiliated with DeepSeek.Download versions and guide references

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 TagParametersMinimum MemoryRecommended Hardware
deepseek-r1:1.5b1.5B4 GBStandard Laptops / Raspberry Pi
deepseek-r1:7b / 8b7B ~ 8B8 GBRTX 3060 / 4060 / Mac 8GB+
deepseek-r1:14b14B12 GBRTX 4070 / Mac 16GB+
deepseek-r1:32b32B20 GBRTX 3090 / 4090 / Mac 24GB+
deepseek-r1:70b70B48 GBDual RTX 3090 / Mac 64GB+
STEP 2

Install Ollama and run model

  1. Download and install Ollama from ollama.com.
  2. Execute this command in your terminal to pull and run the model:
ollama run deepseek-r1:7b

Type /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.

STEP 3

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 serve
Security note: Ollama does not enforce API key authentication by default. Never expose port 11434 directly to a public IP without an authenticated reverse proxy and firewall rule.
STEP 4

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.

References