What DeepSeek R1 Is
R1 is a reasoning model. Unlike standard chat models that respond immediately, R1 thinks through problems step by step before answering — you'll see <think>...</think> blocks in the output showing its reasoning process. This makes it significantly better at math, logic, and multi-step analysis tasks.
The tradeoff is that reasoning takes more tokens, which means slower responses on CPU inference.
Model Sizes and RAM Requirements
DeepSeek R1 comes in multiple sizes. Stick to the distilled versions for CPU inference:
| Model | RAM Needed | Speed (CPU) | Use Case |
|---|---|---|---|
| R1 1.5B | 2 GB | 20–30 tok/s | Testing |
| R1 7B | 6 GB | 5–10 tok/s | General reasoning |
| R1 14B | 10 GB | 3–6 tok/s | Complex analysis |
| R1 32B | 24 GB | 1–3 tok/s | Near-frontier quality |
For most VPS setups, the 7B distill is the practical sweet spot.
Installation
# Install Ollama if you haven't already
curl -fsSL https://ollama.com/install.sh | sh
# Pull DeepSeek R1 7B
ollama pull deepseek-r1:7bRunning It
ollama run deepseek-r1:7bAsk it a reasoning question:
What is the probability of getting at least one 6 when rolling three dice?You'll see the <think> block appear as it works through the problem, then a clean final answer. This is expected behavior — not an error.
API Usage
curl -X POST http://localhost:11434/api/generate \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-r1:7b",
"prompt": "Analyze the tradeoffs between SQL and NoSQL for a time-series workload.",
"stream": false
}'To strip the thinking tags from API responses in your application:
import re
def get_answer(response_text):
# Remove <think>...</think> blocks
clean = re.sub(r'<think>.*?</think>', '', response_text, flags=re.DOTALL)
return clean.strip()When CPU Inference Makes Sense
DeepSeek R1 on CPU is slow for interactive chat but works well for:
- Batch document analysis running overnight
- Code review pipelines triggered by CI
- Async summarization workers
- Any workload where latency doesn't matter
For real-time interactive use, you either need a GPU server or should use the API.
Cost Comparison
| Option | Monthly Cost | Privacy | Rate Limits |
|---|---|---|---|
| DeepSeek API | ~$2–10 (usage) | No | Yes |
| Self-hosted 7B on VPS | $34–62 fixed | Yes | No |
| Self-hosted 32B on VPS | $120 fixed | Yes | No |
Self-hosting makes sense when you have consistent high volume or handle data that can't leave your infrastructure.