DeepSeek R1 Local Deployment

📘 Tutorials 2026-07-19 · Updated 2026-11-26 3 min read

DeepSeek R1 is open source, but the version you can run at home is a distilled small model, not the 671B original. This guide separates the variants, VRAM needs, sampling settings and API usage.

📜 Table of Contents

📖 Keep reading

DeepSeek R1 Local Deployment: Know Which Version You Can Run

DeepSeek R1 was released in early 2025 under MIT. What runs on your desk is almost always a distilled variant, not the 671B model. The gap matters.

Version Map

Version Params 4-bit size (approx.) Feasible on
R1 full 671B MoE (~37B active) Hundreds of GB Multi-GPU servers only
Distill-Qwen-32B 32B ~20GB 24GB GPU
Distill-Qwen-14B 14B ~9GB 12-16GB GPU
Distill-Llama-8B 8B ~5GB 8GB GPU
Distill-Qwen-7B 7B ~4.7GB 8GB GPU or 16GB RAM CPU
Distill-Qwen-1.5B 1.5B ~1.1GB Laptops

Distills copy the "think first, answer later" behavior but not the knowledge or multi-step reliability of the full model.

Fastest Path: Ollama

curl -fsSL https://ollama.com/install.sh | sh
ollama pull deepseek-r1:7b
ollama run deepseek-r1:7b "Your question"

Tags cover 1.5b through 671b. Avoid 70b on normal hardware.

Sampling Settings

ollama run deepseek-r1:7b --temperature 0.6 --top-p 0.95

Calling It From Code

from openai import OpenAI
client = OpenAI(base_url="http://localhost:11434/v1", api_key="ollama")
resp = client.chat.completions.create(
    model="deepseek-r1:7b",
    messages=[{"role": "user", "content": "Rewrite this clause in plain Chinese: ..."}],
    temperature=0.6,
)

Thinking output differs by version: newer Ollama returns a separate thinking field, older versions inline thinking...<|end▁of▁thinking|>. Handle both:

import re
answer = re.sub(r" thinking.*?<|end▁of▁thinking|>", "", text, flags=re.S).strip()

What It Can Actually Do

Ask it to state the conclusion first, then derive, then self-check the arithmetic. That catches many small errors.

Other Routes

LM Studio for a GUI, llama.cpp with a GGUF file for control (llama-server -m model.gguf -c 8192), vLLM only for concurrent serving. Quantization: Q4_K_M on 8GB, Q5_K_M/Q6_K on 16GB. Below Q4, reasoning quality degrades noticeably.

FAQ

Same as the official app? No. The hosted service runs much larger models.

14B on 8GB VRAM? Weights alone are ~9GB; partial offload works but drops to a few tokens per second.

Fine-tune it? LoRA works for style and format, not for adding knowledge. Use RAG for knowledge.

R1 vs V3? V3 is the general chat model; R1 spends tokens on a reasoning chain. Use V3 for chat, R1 for problems.

Thinking takes too long? Cap output length or ask for brief reasoning, at some cost to accuracy.

Related

Related Articles
2026-08-01
AI Model Deployment Types Explained 2026: Batch, Online, Edge, and Serverless
2026-08-06
AI Code Documentation: Generate README and Docs from Source Automatically
2026-08-03
How LLMs Actually Work 2026: NanoGPT (62k Stars) - Build GPT From Scratch and Truly Understand It
2026-08-11
LLM Fine-Tuning Tools Compared 2026: LLaMA-Factory, Unsloth, PEFT and TRL
2026-08-05
AI Coding Assistant for Students in 2026: Cline (66k Stars) vs Continue (35k Stars) - Free Tools That Actually Teach
2026-11-16
This Week's GitHub Stars Ranking: Top Ten Unchanged for Two Consecutive Weeks, Hermes Agent Gains Another 1,870 Stars to Top the List

Written by our editorial team; tools listed here are tested or verified against public sources. Links point to official sites or GitHub repos for reference only — no paid placements.

💬 Comments (0)

No comments yet. Be the first!

Login to comment