Run DeepSeek-R1 Locally in LM Studio (GGUF Guide)
Download and run quantized DeepSeek-R1 distilled GGUF models in LM Studio on macOS, Windows, or Linux, and expose a local OpenAI-compatible server on port 1234.
On this page
Consumer GPUs and Macs run distilled 1.5B ~ 70B GGUF builds; full 671B MoE DeepSeek-V3 / R1 weights require multi-GPU server clusters.
- 1.5B ~ 7B Distilled models: 8GB RAM / 4GB+ VRAM (Standard laptops / Apple Silicon Macs)
- 8B ~ 14B Distilled models: 16GB RAM / 8GB~12GB VRAM (RTX 3060 / 4060 / Mac 16GB+)
- 32B Distilled models: 32GB RAM / 20GB+ VRAM (RTX 3090 / 4090 / Mac 24GB+)
- 70B Distilled models: 64GB unified memory Mac or dual RTX 3090/4090
Download LM Studio and search DeepSeek-R1 GGUF models
- Download the installer for your OS (Windows, macOS, or Linux) from lmstudio.ai.
- Open LM Studio and click the Discover (Magnifying Glass 🔍) icon in the left navigation bar.
- Search for
DeepSeek-R1-Distill(for exampleDeepSeek-R1-Distill-Qwen-7B-GGUF). - Choose a community GGUF quantization (such as builds from
bartowskiorunsloth). For 8GB–24GB devices, Q4_K_M balances memory footprint and output quality.
Enable GPU acceleration and layer offloading
Ensure your hardware handles inference computation effectively:
- macOS (Apple Silicon): Metal acceleration is enabled automatically across unified memory.
- Windows (NVIDIA GPU): Enable GPU Acceleration (CUDA) in the right sidebar and set the GPU Offload Layers slider to maximum.
Launch the local OpenAI-compatible API server
Allow other software tools to query your local DeepSeek model:
- Click the Developer / Local Server (⇄) icon in the left sidebar.
- Select the downloaded DeepSeek model from the top dropdown.
- Click Start Server and keep LM Studio open while connected tools use it.
- The default local endpoint is:
http://localhost:1234/v1.
Connect local IDE extensions and desktop clients
In local clients such as DSH Custom Provider, Continue, Cline, Cherry Studio, or Zotero, configure an OpenAI-compatible provider:
- Base URL:
http://localhost:1234/v1 - API Key: Any placeholder string (e.g.
lm-studio) - Model Name: Exact API identifier shown in LM Studio's server panel
http://localhost:1234/v1 unless exposed via an HTTPS tunnel. For purely offline editing, use Continue, Cline, or DSH.# Verify local server connection via curl
curl http://localhost:1234/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-r1-distill-qwen-7b",
"messages": [{"role": "user", "content": "Reply with local server OK."}]
}'Troubleshooting
CUDA out of memory error
The selected parameter size exceeds available physical VRAM. Reduce offload layers or switch to a lighter quantization format (such as Q4_K_M instead of Q8, or 7B instead of 14B).
Connection Refused from other devices on LAN
In Local Server settings, change the listening host from 127.0.0.1 to 0.0.0.0 and enable CORS.