Back to Article List

How to run DeepSeek-R1 with Ollama

How to run DeepSeek-R1 with Ollama

DeepSeek-R1 is the reasoning model most people try first with Ollama, and it's a good first pick: the family covers everything from a 1.1GB download that runs on a laptop to a 404GB model that needs a GPU cluster. This guide walks through what the tags really are, which size fits your hardware, how the thinking output behaves in the terminal and over the API, and where the sharp edges sit.

What DeepSeek-R1 is (and which tags are distills)

R1 is DeepSeek's family of open reasoning models, described on the deepseek-r1 library page as approaching the performance of leading closed models. The model generates an explicit chain of reasoning before committing to an answer, which measurably helps on math, logic and multi-step problems.

Here's the part that confuses people, so I'll say it plainly. Only the 671b tag is the original DeepSeek-R1. Every smaller tag (1.5b through 70b) is a distillation: a Qwen or Llama base model trained to imitate R1's reasoning style. The distills are genuinely useful and they do think before answering, but an 8b distill is a very good 8B model with reasoning habits, and nothing more. If a benchmark headline about "R1" impressed you, that number came from the 671b model. Knowing this upfront saves you from expecting frontier output from a 5GB download.

DeepSeek-R1 sizes and hardware requirements

Sizes below are the download sizes from the library. For memory, the rule of thumb is that a Q4 model wants roughly 0.6GB per billion parameters plus context overhead, so plan a little above the download size and more if you raise the context window.

TagDownloadRealistic memory target
deepseek-r1:1.5b1.1GB4GB RAM, no GPU needed
deepseek-r1:7b4.7GB8GB VRAM or 12GB RAM
deepseek-r1:8b5.2GB8GB VRAM or 16GB RAM
deepseek-r1:14b9.0GB12GB to 16GB VRAM
deepseek-r1:32b20GB24GB VRAM
deepseek-r1:70b43GB48GB+ VRAM or multi-GPU
deepseek-r1:671b404GBserver-class, multi-GPU

The listed context is 128K for the distills and 160K for the 671b model, though Ollama won't give you that by default (more on that below).

Which DeepSeek-R1 size to pick

My take, having run most of these: 8b is the sweet spot for a 16GB machine, and it's the default "latest" tag for a reason. The jump from 7b to 8b is minor; the jump to 14b is real and worth it if you have 12GB or more of VRAM. On a 24GB card, 32b is where the distills start feeling like a serious reasoning model, and it's the size I'd run for daily work.

The 70b tag needs 48GB of VRAM to run well, which means multi-GPU or big-memory territory. And ignore 671b unless you operate server-class hardware; at 404GB it exists for clusters, and a well-run 32b will serve you better than a 671b you can't feed. If your local machine tops out at 8GB, renting a GPU VPS with 16GB to 96GB of passthrough VRAM is the cheaper way to find out which size you need before committing to hardware.

Installing Ollama and running DeepSeek-R1

If Ollama isn't installed yet, one command handles it (full walkthrough in our guide to installing Ollama on Ubuntu):

curl -fsSL https://ollama.com/install.sh | sh

Then pull and run your chosen size:

ollama run deepseek-r1:8b

The first run downloads the model, so give the 8b a few minutes on a decent connection. If the download creeps along and then stalls near the end, you've hit the most common complaint with large pulls; the fixes are in our Ollama troubleshooting guide.

What the thinking output looks like

Ask it something with actual structure, like "A train leaves at 14:10 averaging 84 km/h. When does it arrive 315 km away?" and you'll see the model reason first, wrapped in a visible thinking phase, before printing the answer. The reasoning reads like a scratchpad: it restates the problem, tries an approach, sometimes catches its own mistake and corrects it mid-stream. That self-correction is the whole value of a reasoning model.

It costs you tokens and time. A question a normal model answers in 50 tokens can burn 400 here, most of it reasoning. The tradeoff pays off on math, planning, code review and anything where a confidently wrong answer is expensive. For summaries, rewrites and casual chat, the thinking is pure overhead and you'll be happier with a standard model. In the interactive session, /set nothink disables thinking and /set think brings it back.

Using DeepSeek-R1 over the Ollama API

The useful detail for anyone building on top: Ollama separates reasoning from the answer in API responses. With thinking enabled, the chat endpoint returns the reasoning in message.thinking and the final answer in message.content, so you can log the trace and show users only the answer. The behavior is documented in Ollama's thinking docs.

curl http://localhost:11434/api/chat -d '{
  "model": "deepseek-r1:8b",
  "messages": [
    {"role": "user", "content": "Is 3599 prime? Reason it out."}
  ],
  "think": true,
  "stream": false
}'

Set "think": false to skip reasoning entirely for latency-sensitive calls. When streaming, thinking chunks arrive before content chunks, so watch for the first thinking field if your UI shows a collapsible reasoning section. Endpoint details, streaming and the OpenAI-compatible layer are covered in our Ollama API guide.

Context window: the 4096 default wastes this model

Ollama defaults every model to a 4096-token context. For a reasoning model this hurts twice, because the thinking tokens count against the window too: feed R1 a long document and the reasoning plus the document can crowd out the answer, with the oldest content silently truncated. The distills list 128K, so use some of it:

OLLAMA_CONTEXT_LENGTH=32768 ollama serve

Or per session with /set parameter num_ctx 32768. Memory usage grows with context, which is why I'd raise it to what you need instead of maxing it out. The full arithmetic is in our Ollama context window guide.

DeepSeek-R1 on CPU: performance expectations

The 1.5b runs fine on CPU and answers at a comfortable reading pace. The 7b and 8b work on a CPU box with 16GB of RAM, but here's the thing nobody mentions: reasoning models feel slower than their raw tokens-per-second suggests, because you wait through hundreds of thinking tokens before the answer even starts. On CPU that means a hard question can sit there "thinking" for several minutes. Fine for batch jobs and automation. Frustrating for interactive use. I wouldn't run 14b or above without a GPU, full stop.

Running DeepSeek-R1 behind Open WebUI

One operational tip for either interface: Ollama unloads idle models after a few minutes by default, and reloading a 20GB model adds a cold-start pause to the first question of every session. If R1 is your primary model, set OLLAMA_KEEP_ALIVE=-1 (or a generous duration like 2h) in the service environment so it stays resident. Reasoning sessions tend to be bursty, a flurry of questions and then nothing for an hour, which is exactly the pattern the default unload timer punishes.

Open WebUI is the natural front end for R1 because it renders the thinking phase as a collapsible block, so you get clean answers with the reasoning one click away. It also gives you chat history and multi-user access, which turns a single VPS into a small team's private reasoning model. Setup takes about fifteen minutes following our Open WebUI and Ollama setup guide, and once it's up, model switching between R1 sizes is a dropdown.

Validation checks before relying on it

Three quick validations before you rely on it. Run ollama ps during a generation and confirm the model shows 100% GPU if you have one; partial offload tanks reasoning speed exactly when the model needs it most. Ask a question with a known answer and confirm the thinking arrives separately from the content in your API responses, since some client libraries concatenate the fields and users end up reading the scratchpad. And test one long document at your configured context length to confirm nothing truncates. If the model starts answering questions you didn't ask, that's the truncation, and raising num_ctx fixes it.

Frequently asked questions

Can DeepSeek-R1 process images or files?

No, the R1 tags are text-only. For vision use a multimodal model like gemma4 or qwen2.5vl alongside it. For files, anything that extracts text works: paste the content into the prompt or let a front end like Open WebUI handle document upload and pass the text through.

Race towards the future

Unrivaled speed meets competitive pricing

Ready in seconds 7-day money-back guaranteeA risk-free way to try LumaDock. Covers the GPU VPS plan on your first order. Cancel anytime
Számlázási ciklus

GPU.T4

1508.85 kr Save  19 %
1224.16 kr havonta
  • Dedikált GPU
  • Tesla T4

  • 16 GB GDDR6vRAM
  • 2560CUDA CORES
  • Virtuális szerver
  • 8 vCPUAMD EPYC
  • 32 GBECC MEMÓRIA
  • 250 GB NVMeTÁRHELY
  • Korlátlan sávszélesség
  • IPv4 & IPv6 mellékelve Az IPv6 támogatás jelenleg nem érhető el Franciaországban, Finnországban vagy Hollandiában.

GPU.ADA4000SFF

2840.42 kr Save  17 %
2365.44 kr havonta
  • Dedikált GPU
  • RTX 4000 SFF Ada

  • 20 GB GDDR6 ECCvRAM
  • 6144CUDA CORES
  • Virtuális szerver
  • 16 vCPUAMD EPYC
  • 64 GBECC MEMÓRIA
  • 350 GB NVMeTÁRHELY
  • Korlátlan sávszélesség
  • IPv4 & IPv6 mellékelve Az IPv6 támogatás jelenleg nem érhető el Franciaországban, Finnországban vagy Hollandiában.

GPU.PRO4000SFF

3410.41 kr Save  17 %
2840.42 kr havonta
  • Dedikált GPU
  • RTX PRO 4000 Blackwell

  • 24 GB GDDR7 ECCvRAM
  • 8960CUDA CORES
  • Virtuális szerver
  • 16 vCPUAMD EPYC
  • 64 GBECC MEMÓRIA
  • 400 GB NVMeTÁRHELY
  • Korlátlan sávszélesség
  • IPv4 & IPv6 mellékelve Az IPv6 támogatás jelenleg nem érhető el Franciaországban, Finnországban vagy Hollandiában.

GPU.PRO4500

4835.37 kr Save  20 %
3885.39 kr havonta
  • Dedicated GPU
  • RTX PRO 4500 Blackwell

  • 32 GB GDDR7 ECCvRAM
  • 10496CUDA CORES
  • Virtual Server
  • 16 vCPUAMD EPYC
  • 64 GBECC MEMORY
  • 450 GB NVMeSTORAGE
  • Unmetered bandwidth
  • IPv4 & IPv6IPv6 is currently unavailable in France, Finland or the Netherlands. included

GPU.PRO5000

6640.32 kr Save  20 %
5310.36 kr havonta
  • Dedicated GPU
  • RTX PRO 5000 Blackwell

  • 48 GB GDDR7 ECCvRAM
  • 14080CUDA CORES
  • Virtual Server
  • 32 vCPUAMD EPYC
  • 96 GBECC MEMORY
  • 500 GB NVMeSTORAGE
  • Unmetered bandwidth
  • IPv4 & IPv6IPv6 is currently unavailable in France, Finland or the Netherlands. included

GPU.PRO6000

11390.19 kr Save  19 %
9205.25 kr havonta
  • Dedicated GPU
  • RTX PRO 6000 Blackwell

  • 96 GB GDDR7 ECCvRAM
  • 24064CUDA CORES
  • Virtual Server
  • 32 vCPUAMD EPYC
  • 128 GBECC MEMORY
  • 650 GB NVMeSTORAGE
  • Unmetered bandwidth
  • IPv4 & IPv6IPv6 is currently unavailable in France, Finland or the Netherlands. included

*VAT excluded.

INCLUDED WITH EVERY PLAN

No setup fees 1 Gbps network
Free server monitoring Firewall management 24/7 support KVM virtualization