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

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
Hardware & VRAM recommendations (DeepSeek-R1-Distill GGUF)

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
STEP 1

Download LM Studio and search DeepSeek-R1 GGUF models

  1. Download the installer for your OS (Windows, macOS, or Linux) from lmstudio.ai.
  2. Open LM Studio and click the Discover (Magnifying Glass 🔍) icon in the left navigation bar.
  3. Search for DeepSeek-R1-Distill (for example DeepSeek-R1-Distill-Qwen-7B-GGUF).
  4. Choose a community GGUF quantization (such as builds from bartowski or unsloth). For 8GB–24GB devices, Q4_K_M balances memory footprint and output quality.
STEP 2

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.
STEP 3

Launch the local OpenAI-compatible API server

Allow other software tools to query your local DeepSeek model:

  1. Click the Developer / Local Server (⇄) icon in the left sidebar.
  2. Select the downloaded DeepSeek model from the top dropdown.
  3. Click Start Server and keep LM Studio open while connected tools use it.
  4. The default local endpoint is: http://localhost:1234/v1.
STEP 4

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
Note on Cursor: Cursor routes custom OpenAI API calls through Cursor's cloud backend rather than directly from your machine, so it cannot reach 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.

References