Guide · 10 min read · Updated July 2026

How to Self-Host DeepSeek-R1: A Hardware and Software Guide

DeepSeek-R1 has set a new standard for open-weights reasoning models, matching frontier closed models in math, science, and coding tasks. Because it is released under a permissive open license, developers and enterprises can host it locally or on private cloud servers. This guide explains the hardware sizing, quantization options, and software tools required to successfully run DeepSeek-R1.

The Scaling Dilemma: Which Model Size is Right?

DeepSeek-R1 is available in several versions, ranging from distilled models (based on Llama and Qwen architectures) to the full-weight Mixture-of-Experts (MoE) 671-billion parameter model. Your hosting strategy depends on your hardware constraints and performance requirements.

DeepSeek-R1 Family Specifications

Model SizeBase ArchitectureVRAM Required (FP8)VRAM Required (Int4)Target Hardware
R1-Distill-Qwen-1.5BQwen-2.5~2 GB~1.2 GBConsumer Laptop / Raspberry Pi
R1-Distill-Qwen-7BQwen-2.5~8 GB~5 GBSingle RTX 3060/4060 GPU
R1-Distill-Qwen-14BQwen-2.5~16 GB~10 GBRTX 4080 / Apple Mac Studio (16GB+)
R1-Distill-Qwen-32BQwen-2.5~36 GB~22 GBDual RTX 3090/4090 / Mac Studio (32GB+)
R1-Distill-Llama-70BLlama-3.3~80 GB~45 GBSingle H100 or Dual RTX 4090 (with offloading)
DeepSeek-R1 (Full 671B)DeepSeek-MoE~720 GB~380 GB8x H100 / 8x A100 GPUs or high-end Mac clusters

Hardware Sizing Guide for the Full 671B Model

Running the full 671B parameter Mixture of Experts model requires professional ML-ops infrastructure due to its sheer scale. Although the active parameters per token are only about 37 billion, the entire 671 billion parameter weight matrix must reside in memory for fast inference.

1. Multi-GPU Cloud Node Setup

To achieve real-time inference speeds (15–30 tokens/sec), the full model is typically run in FP8 (8-bit floating point precision) or Int4/Int8. This requires:

2. Apple Silicon Mac Clusters (The Budget Alternative)

For small teams or local testing, high-end Apple Mac Studios are an excellent unified-memory alternative. A Mac Studio with an M3 Ultra and 192GB unified memory can run R1-Distill-70B at full speed, or a network-clustered setup of multiple Macs using frameworks like Exo can run the full 671B model in quantized format.

Quantization: Balancing Speed and Precision

Quantization compresses the model weights to smaller numerical formats, saving memory at the cost of slight precision loss. For DeepSeek-R1, we recommend these formats:

Software Selection & Setup

Several software stacks exist to host DeepSeek-R1, depending on whether you are running a single local machine or building a scalable API endpoint.

1. Ollama (Best for Local Desktop & Prototyping)

Ollama is the easiest way to host distilled versions of DeepSeek-R1 on Windows, macOS, or Linux. It automatically configures GPU acceleration and offloading.

To run the 32B version, open your terminal and execute:

ollama run deepseek-r1:32b

Ollama exposes a local OpenAI-compatible API at http://localhost:11434/v1, allowing you to easily hook it up to IDE extensions like Cursor or Continue.

2. vLLM (Best for Multi-GPU Production APIs)

vLLM is a high-throughput, easy-to-use LLM serving engine. It is ideal for serving DeepSeek-R1 on cloud GPU instances (like RunPod, Lambda Labs, or AWS).

To run the FP8 quantized version of DeepSeek-R1 on an 8x H100 node with vLLM, use the following docker command:

docker run --gpus all \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  -p 8000:8000 \
  --ipc=host \
  vllm/vllm-openai:latest \
  --model deepseek-ai/DeepSeek-R1-FP8 \
  --tensor-parallel-size 8 \
  --max-model-len 32768

This command runs tensor parallelism across all 8 GPUs and exposes an endpoint on port 8000 with a 32K token context window.

Optimizing DeepSeek-R1 Performance

Because DeepSeek-R1 generates a long "thinking process" before producing the final answer, latency can be high. Apply these configurations to improve performance:

Key Recommendations