DeepSeek R1

671.1B total, 37.6B active · 160k context · MIT License · released 2025-01-20

chatreasoningcoding

In short

DeepSeek R1 is an open model from DeepSeek with 671.1B parameters (37.6B active per token). At mlx-2bit, DeepSeek R1 needs about 236 GB of memory at 8k context and 238 GB at 32k, counting the weights, the KV cache and runtime buffers. Nothing we price in the US runs DeepSeek R1 fully in memory at 32k context at a usable speed; see the table for what comes closest.

Updated . Speeds are estimates; how they are worked out.

What to run it on in the US

Fully in memory at 32k context, priced at retailers today.

Something we price holds it fully in memory, but none reaches 15 tok/s, our bar for recommending it. The table below has the speeds.

All hardware that runs it

Everything we price, best value first. Two cards split the model by layers.

HardwareQuantFitsDecodePricetok/s per 1,000
Mac Studio M3 Ultra 512GBQ4_K_Mfits13 tok/s$23,0000.6

39 other cards and machines we price cannot hold it at this context.

Memory needed

Weights, KV cache and runtime buffers at each context length (KV cache at fp16).

QuantFile@8k@32k@64k@128k
mlx-2bitmlx234.5 GB235.8 GB237.5 GB239.9 GB244.5 GB
mlx-3bitmlx312.6 GB313.9 GB315.7 GB318.0 GB322.6 GB
Q4_K_Mgguf376.7 GB377.9 GB379.7 GB382.0 GB386.7 GB
mlx-4bitmlx390.7 GB392.0 GB393.8 GB396.1 GB400.8 GB
Q5_K_Mgguf442.7 GB444.0 GB445.8 GB448.1 GB452.8 GB
Q6_Kgguf513.0 GB514.3 GB516.0 GB518.3 GB523.0 GB
Q8_0gguf664.3 GB665.6 GB667.3 GB669.7 GB674.3 GB

Run it

Copy a command for the runtime you use.

  • mlx-2bit
    • LM Studiolms get mlx-community/DeepSeek-R1-2bit
    • MLXmlx_lm.server --model mlx-community/DeepSeek-R1-2bit
  • mlx-3bit
    • LM Studiolms get mlx-community/DeepSeek-R1-3bit
    • MLXmlx_lm.server --model mlx-community/DeepSeek-R1-3bit
  • Q4_K_M
    • Ollamaollama run hf.co/unsloth/DeepSeek-R1-GGUF:Q4_K_M
    • LM Studiolms get unsloth/DeepSeek-R1-GGUF@q4_k_m
    • llama.cppllama-server -hf unsloth/DeepSeek-R1-GGUF:Q4_K_M
  • mlx-4bit
    • LM Studiolms get mlx-community/DeepSeek-R1-4bit
    • MLXmlx_lm.server --model mlx-community/DeepSeek-R1-4bit
  • Q5_K_M
    • Ollamaollama run hf.co/unsloth/DeepSeek-R1-GGUF:Q5_K_M
    • LM Studiolms get unsloth/DeepSeek-R1-GGUF@q5_k_m
    • llama.cppllama-server -hf unsloth/DeepSeek-R1-GGUF:Q5_K_M
  • Q6_K
    • Ollamaollama run hf.co/unsloth/DeepSeek-R1-GGUF:Q6_K
    • LM Studiolms get unsloth/DeepSeek-R1-GGUF@q6_k
    • llama.cppllama-server -hf unsloth/DeepSeek-R1-GGUF:Q6_K
  • Q8_0
    • Ollamaollama run hf.co/unsloth/DeepSeek-R1-GGUF:Q8_0
    • LM Studiolms get unsloth/DeepSeek-R1-GGUF@q8_0
    • llama.cppllama-server -hf unsloth/DeepSeek-R1-GGUF:Q8_0

Notes

Transformers does not directly support it; see the DeepSeek-V3 repo for local running. Avoid system prompts, use temperature 0.6, and force responses to start with "<think>\n". Excludes 13.4B parameters of multi-token-prediction layers, which local runtimes do not load.

Questions

How much VRAM does DeepSeek R1 need?
At mlx-2bit, DeepSeek R1 needs about 236 GB of memory at 8k context and 238 GB at 32k, counting the weights, the KV cache and runtime buffers.
Can I run DeepSeek R1 on a 16 GB GPU?
No: it does not fit in 16 GB at 32k context, even with system RAM.
Can I run DeepSeek R1 on a 24 GB GPU?
No: it does not fit in 24 GB at 32k context, even with system RAM.
How do I run DeepSeek R1 locally?
With Ollama: ollama run hf.co/unsloth/DeepSeek-R1-GGUF:Q4_K_M (the Q4_K_M build). LM Studio and llama.cpp commands are on this page.
What licence is DeepSeek R1 released under?
MIT License, which allows commercial use.