How to Run DeepSeek R1 and V3.2 Locally

DeepSeek's flagship reasoners are 671B-class mixture-of-experts models, which sounds out of reach for a home machine, and mostly is at full size. But there are two honest local paths: the distilled models, which put much of R1's reasoning into dense Qwen and Llama checkpoints that run on a normal GPU, and the full model, which runs on a big-RAM box with dynamic quants and expert offload. This guide covers both.

full R1 671B · V3.2 685B MoE distills 1.5B-70B dense ctx ~128K license MIT

Full or distilled

Decide this first, because the two paths have almost nothing in common.

PathWhat it isRuns on
Distill 8BR1 reasoning in a Llama 8B8GB GPU / 16GB Mac
Distill 32BR1 reasoning in a Qwen 32B24GB GPU (4090)
Distill 70BR1 reasoning in a Llama 70B48GB / 2×24GB / 64GB Mac
Full 671BThe real model, MoE1 GPU + 128-256GB RAM, or multi-GPU

The distills are the practical answer for most people: they capture a large share of the reasoning behavior and run like any dense model of their size. The full model is worth the effort only if you have the memory and want the top of the quality curve.

The distills on a GPU

The distills run in one command with Ollama. Raise the context, since these are reasoning models that produce long thought traces:

curl -fsSL https://ollama.com/install.sh | sh
ollama run deepseek-r1:32b
# smaller options: deepseek-r1:8b, deepseek-r1:14b, deepseek-r1:70b
printf 'FROM deepseek-r1:32b\nPARAMETER num_ctx 32768\n' > Modelfile
ollama create r1-32k -f Modelfile

In llama.cpp or vLLM you can point at the Hugging Face distill repos directly, for example deepseek-ai/DeepSeek-R1-Distill-Qwen-32B.

Dynamic quants for the full model

The full 671B does not fit any single GPU, so quantization is not optional, it is the whole strategy. Dynamic low-bit quants keep the sensitive attention layers at higher precision and push the mixture-of-experts layers down to one or two bits, so the model stays close to full quality while shrinking dramatically. Approximate sizes for the full model give you the memory target to hit:

QuantSizeNote
TQ1_0~162 GBTernary, smallest
IQ1_S~185 GBFits 1 GPU + 256GB RAM
Q2_K_XL~251 GBBetter quality per byte
Q4_K_XL~384 GBNeeds a large server

The full 671B with offload

Run the full model in llama.cpp with the experts offloaded to system RAM. Match the quant to your combined VRAM plus RAM:

./llama.cpp/llama-server \
  -hf unsloth/DeepSeek-R1-GGUF:IQ1_S \
  --jinja \
  -ngl 99 \
  -ot ".ffn_.*_exps.=CPU" \
  --cache-type-k q4_0 \
  --temp 0.6 --top-p 0.95 --min-p 0.01 \
  -c 16384 --host 127.0.0.1 --port 8080

The -ot ".ffn_.*_exps.=CPU" flag is what makes this possible, keeping the expert layers in RAM while attention stays on the GPU. Expect a few tokens per second on a 24GB card paired with 128 to 256 GB of RAM; throughput is bounded by memory bandwidth, not the GPU. If the quant ships as multiple shards, merge them with llama-gguf-split --merge.

Multi-GPU with vLLM

On a server with several data-center GPUs, vLLM serves the full model at production speed and gives you an OpenAI-compatible endpoint:

vllm serve deepseek-ai/DeepSeek-V3.2-Exp \
  --tensor-parallel-size 8 \
  --max-model-len 32768 \
  --enable-auto-tool-choice \
  --tool-call-parser deepseek_v3

Reasoning and sampler

R1 and V3.2 are reasoning models that emit a thinking trace before the answer, so give them room in the context and use the recommended sampler: a temperature around 0.6 with top-p 0.95, and a small min-p of about 0.01. Do not greedy-decode; a temperature of zero makes the reasoning loop. If you only want the final answer, strip the thinking section on the client side rather than suppressing it, since the model reasons better when allowed to think.

Tool calling

Enable tools with the DeepSeek parser. In vLLM use --tool-call-parser deepseek_v3 (or the matching version parser for the exact checkpoint) together with --enable-auto-tool-choice. In llama.cpp, --jinja applies the model's tool template. The endpoint is OpenAI-compatible, so an agent passes its tool schemas unchanged.

Serve an API

Every path above exposes /v1/chat/completions. Point an OpenAI client at the local base URL with any key:

curl http://127.0.0.1:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Prove that sqrt(2) is irrational."}]}'
Security. Keep the bind on 127.0.0.1. Expose on 0.0.0.0 only behind an authenticating reverse proxy.

Troubleshooting

FAQ

Can I run R1 on a consumer GPU? Not the full 671B, but the distills yes. The 32B distill runs on a 24GB card at 4-bit. The full model needs a big-RAM box with offload or multi-GPU.

How much RAM for the full model? A dynamic quant is roughly 160 to 250 GB. A 24GB GPU plus 128 to 256 GB of RAM runs it with expert offload at a few tokens per second.

Sampler settings? Temperature around 0.6, top-p 0.95, min-p about 0.01. Never greedy-decode a reasoning model.

rg
Rohit Ghumare

CNCF Ambassador and Google Developer Expert. I write guides for running open-weight models locally and about the engineering under the AI agent stack.

All local model guides · Kimi K3 · X