Wandering Giants Compute · Learn
Tutorial

How to Run DeepSeek on Your Own GPU Infrastructure

The short answer

Most people self-host a DeepSeek-R1 distill: the 32B Qwen-based model fits one 80 GB GPU in BF16 or a 48 GB card in 4-bit, served with vLLM or Ollama. Full DeepSeek-R1 has 671B parameters and needs about 700 GB of VRAM in FP8, so eight H200 or B200 GPUs in one machine.

DeepSeek-R1 size
671B parameters total, 37B active per token (mixture of experts)
DeepSeek-R1 FP8 weights
About 700 GB: needs 8× H200 (1,128 GB) or 8× B200
R1-Distill-Qwen-32B weights
About 65 GB BF16, 33 GB FP8, ~20 GB at 4-bit
R1-Distill KV cache (Qwen 32B base)
About 0.26 MB per token in FP16
Full R1 KV cache (MLA)
About 0.07 MB per token, a fifth of Llama 70B's
Recommended sampling (model card)
Temperature 0.5–0.7 (0.6 suggested), top-p 0.95, no system prompt
Licence
DeepSeek-R1 MIT; distills also carry their Qwen or Llama base licence

DeepSeek-R1 made open-weight reasoning models practical, and its distilled versions made them small enough for one rented GPU. This guide covers both. It shows how to serve the R1 distills on a single card, what it takes to run the full 671-billion-parameter model, and how to handle the long thinking output these models produce.

Every command uses real model IDs from DeepSeek's Hugging Face organisation and a recent vLLM release (written against the vLLM 0.10/0.11-era command line). Performance and cost figures are estimates with the method shown. For background on prefill, decode and the KV cache, read the complete guide to LLM inference first.

Which DeepSeek model should you run?

Pick by the GPU you can afford: the R1 distills run on one card, while full DeepSeek-R1 and DeepSeek-V3 need an eight-GPU machine. The distills are dense Qwen 2.5 or Llama 3 models fine-tuned on reasoning traces generated by R1, so they think the same way but with a smaller model's knowledge.

ModelHugging Face IDParametersBF16 weightsFits on
R1-Distill-Qwen-7Bdeepseek-ai/DeepSeek-R1-Distill-Qwen-7B7.6B~15 GBRTX 4090
R1-Distill-Llama-8Bdeepseek-ai/DeepSeek-R1-Distill-Llama-8B8B~16 GBRTX 4090
R1-Distill-Qwen-14Bdeepseek-ai/DeepSeek-R1-Distill-Qwen-14B14.8B~30 GBL40S; RTX 4090 at 4-bit
R1-Distill-Qwen-32Bdeepseek-ai/DeepSeek-R1-Distill-Qwen-32B32.8B~65 GBA100/H100 80 GB; L40S at FP8 or 4-bit
R1-Distill-Llama-70Bdeepseek-ai/DeepSeek-R1-Distill-Llama-70B70B~140 GBH100 in FP8; 2–4 GPUs in BF16
DeepSeek-R1 (and R1-0528)deepseek-ai/DeepSeek-R1, deepseek-ai/DeepSeek-R1-0528671B (37B active)~700 GB as published in FP88× H200, 8× B200

DeepSeek's repositories are not gated, so no Hugging Face token is needed. Full R1 is MIT-licensed. The DeepSeek-R1-Distill-Qwen-32B model card notes that the Qwen-based distills derive from Apache 2.0 Qwen 2.5 models and the Llama-based ones from Meta's Llama licences, so check the licence that matches your pick.

How much VRAM does DeepSeek need?

Add weights, KV cache and 10–20% headroom, and remember that reasoning models generate long outputs, so the KV cache matters more than for ordinary chat. A single R1 answer can easily hold 6,000–10,000 tokens once its reasoning trace is counted.

The 32B distill uses the Qwen 2.5 32B architecture: 64 layers, 8 KV heads, head dimension 128.

text
KV per token = 2 × 64 × 8 × 128 × 2 bytes = 262,144 bytes ≈ 0.26 MB
One 16k-token reasoning session ≈ 16,384 × 0.26 MB ≈ 4.3 GB

Full R1 uses multi-head latent attention, which stores a compressed 576-value latent per layer instead of full keys and values:

text
KV per token ≈ 576 × 61 layers × 2 bytes ≈ 70 KB (0.07 MB)
One 32k-token session ≈ 2.3 GB
SetupWeightsKV for one 16k sessionTotal with ~15% headroomGood fit
Distill-Qwen-14B, 4-bit (Ollama)~9 GB3.2 GB~14 GBRTX 4090
Distill-Qwen-32B, 4-bit (Ollama)~20 GB4.3 GB~28 GBL40S
Distill-Qwen-32B, FP8~33 GB4.3 GB~43 GBL40S (tight), H100 (roomy)
Distill-Qwen-32B, BF16~65 GB4.3 GB~80 GBA100/H100 80 GB with a 16k cap
Distill-Llama-70B, FP8~70 GB5.4 GB~87 GBRTX PRO 6000, H200; H100 with FP8 KV
DeepSeek-R1, FP8~700 GB1.1 GB~806 GB8× H200 (1,128 GB) or 8× B200 (1,440 GB)

Eight 80 GB H100s give 640 GB, which is not enough for R1's FP8 weights. Community GGUF builds at 4-bit and below (around 400 GB at 4-bit, smaller with more aggressive schemes) can run across eight 80 GB cards with llama.cpp or Ollama, at a quality cost you should evaluate yourself. The GPU memory guide for LLMs explains these sums in more depth.

Option 1: How do you run DeepSeek without installing anything?

On Wandering Giants Compute, DeepSeek R1 Distill Qwen 32B is one of the one-click models: pick an 80 GB GPU, choose Chat or API, select it and launch. It downloads to your GPU and is served by vLLM. Chat gives you a private chat window; API gives you a base URL and your own key.

bash
export WG_BASE_URL="https://YOUR-ENDPOINT/v1"   # placeholder: copy yours from the dashboard
export WG_API_KEY="your-key"

curl -s "$WG_BASE_URL/models" -H "Authorization: Bearer $WG_API_KEY"   # find the model id

curl -s "$WG_BASE_URL/chat/completions" \
  -H "Authorization: Bearer $WG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "MODEL-ID-FROM-/models",
       "messages": [{"role": "user", "content": "A train leaves at 09:40 and arrives at 13:15. How long is the journey? Please reason step by step."}],
       "temperature": 0.6, "top_p": 0.95, "max_tokens": 4096}'

The reasoning shows up either inside <think> tags in the content or in a separate reasoning field, depending on how the server is configured. The Python in Step 4 below handles both.

Option 2: How do you run a DeepSeek distill yourself with vLLM?

With root access, install vLLM, then start it with the reasoning parser so answers and thinking come back separately. The right flags depend on the card.

Step 1: Connect and install

bash
ssh -L 8000:localhost:8000 root@<your-gpu-address>

python3 -m venv ~/vllm-env && source ~/vllm-env/bin/activate
pip install -U pip && pip install -U vllm
export VLLM_API_KEY="$(openssl rand -hex 24)"; echo "$VLLM_API_KEY"

Step 2: Start the 32B distill on your GPU

On an H100 (native FP8), quantise to FP8 at load time. This halves the weights and leaves about 40 GB for KV cache, enough for long reasoning sessions and many users:

bash
vllm serve deepseek-ai/DeepSeek-R1-Distill-Qwen-32B \
  --served-model-name r1-32b \
  --quantization fp8 \
  --max-model-len 32768 \
  --gpu-memory-utilization 0.92 \
  --reasoning-parser deepseek_r1 \
  --host 127.0.0.1 --port 8000 \
  --api-key "$VLLM_API_KEY"

On an A100 80GB (no FP8 hardware), run BF16 and cap the context so the KV cache fits beside 65 GB of weights:

bash
vllm serve deepseek-ai/DeepSeek-R1-Distill-Qwen-32B \
  --served-model-name r1-32b \
  --max-model-len 16384 \
  --gpu-memory-utilization 0.94 \
  --reasoning-parser deepseek_r1 \
  --host 127.0.0.1 --port 8000 \
  --api-key "$VLLM_API_KEY"

On two GPUs, the model card's own example uses tensor parallelism with BF16 and a 32k context:

bash
vllm serve deepseek-ai/DeepSeek-R1-Distill-Qwen-32B \
  --tensor-parallel-size 2 \
  --max-model-len 32768 \
  --gpu-memory-utilization 0.90 \
  --reasoning-parser deepseek_r1 \
  --host 127.0.0.1 --port 8000 \
  --api-key "$VLLM_API_KEY"

On older vLLM releases the reasoning parser also needed --enable-reasoning. If the server rejects --reasoning-parser, upgrade vLLM.

Step 3: Call it with curl

DeepSeek's model card advises against a system prompt: put every instruction in the user message. For maths, it suggests asking the model to reason step by step and put the final answer in \boxed{}.

bash
curl -s http://localhost:8000/v1/chat/completions \
  -H "Authorization: Bearer $VLLM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "r1-32b",
       "messages": [{"role": "user", "content": "Is 391 prime? Please reason step by step, and put your final answer within \\boxed{}."}],
       "temperature": 0.6, "top_p": 0.95, "max_tokens": 6000}'

Step 4: Call it from Python and separate the thinking

python
import os, re
from openai import OpenAI

client = OpenAI(
    base_url=os.environ.get("BASE_URL", "http://localhost:8000/v1"),
    api_key=os.environ["API_KEY"],          # your VLLM_API_KEY or WG_API_KEY
)
model = client.models.list().data[0].id

r = client.chat.completions.create(
    model=model,
    messages=[{"role": "user", "content": "Plan a 3-step migration from MySQL 5.7 to 8.0. Be specific."}],
    temperature=0.6, top_p=0.95, max_tokens=6000,
)
msg = r.choices[0].message
reasoning = getattr(msg, "reasoning_content", None) or getattr(msg, "reasoning", None)
answer = msg.content or ""

# If the server has no reasoning parser, the thinking is inline: keep what follows </think>
if reasoning is None and "</think>" in answer:
    reasoning, answer = answer.split("</think>", 1)
    reasoning = reasoning.replace("<think>", "").strip()

print("THINKING TOKENS (approx words):", len((reasoning or "").split()))
print("ANSWER:\n", answer.strip())
print(r.usage)

The R1 distill chat templates often add the opening <think> tag to the prompt themselves. Splitting on the closing tag, as above, works whether or not the opening tag appears in the output.

Option 3: How do you run DeepSeek with Ollama?

Ollama is the quickest single-user route: it serves 4-bit GGUF builds of the distills and an OpenAI-compatible endpoint on port 11434.

bash
curl -fsSL https://ollama.com/install.sh | sh
OLLAMA_CONTEXT_LENGTH=16384 ollama serve > ~/ollama.log 2>&1 &   # if no service was started

ollama pull deepseek-r1:32b      # ~20 GB, Qwen-based distill
ollama run deepseek-r1:32b "How many weekdays are there in March 2027?"
ollama ps                         # PROCESSOR should read 100% GPU
bash
curl -s http://localhost:11434/v1/chat/completions -H "Content-Type: application/json" \
  -d '{"model": "deepseek-r1:32b", "messages": [{"role": "user", "content": "Explain MLA attention briefly."}]}'

Tags for the other sizes (deepseek-r1:7b, deepseek-r1:14b, deepseek-r1:70b, deepseek-r1:671b) are listed in the Ollama DeepSeek-R1 library. Give reasoning models a context of at least 16k; at short contexts the trace gets cut off mid-thought.

How do you run the full DeepSeek-R1?

Rent one machine with eight H200s or eight B200s, make sure the disk has at least 800 GB free, and run vLLM with tensor parallelism across all eight. The weights alone are about 700 GB, so the download is the slowest step.

bash
# 8× H200 (1,128 GB total). Check disk first.
df -h /root
vllm serve deepseek-ai/DeepSeek-R1 \
  --served-model-name deepseek-r1 \
  --tensor-parallel-size 8 \
  --max-model-len 32768 \
  --gpu-memory-utilization 0.90 \
  --reasoning-parser deepseek_r1 \
  --host 127.0.0.1 --port 8000 \
  --api-key "$VLLM_API_KEY"

At 1 GB/s the download takes about 12 minutes; at 200 MB/s, about an hour. While it downloads you are paying for eight GPUs, so on per-minute billing it can pay to download onto a cheap single-GPU machine first, if your provider lets you keep and reattach that disk. Swap deepseek-ai/DeepSeek-R1 for deepseek-ai/DeepSeek-R1-0528 to get the May 2025 update. The DeepSeek-R1 model card lists the architecture and evaluation details. For more on spreading models across cards, see what multi-GPU computing is and when you need it.

How fast is DeepSeek, and what does an answer cost?

The cost that matters for a reasoning model is cost per answer, because each answer carries a reasoning trace that can be ten times longer than the visible reply. Speeds below use tokens/s ≈ 0.6–0.75 × bandwidth ÷ GB read per token, at the midpoint, with our hourly prices.

SetupOur priceSingle-stream tok/s (est.)$ per M tokens, one streamAssumed batched tok/s$ per M tokens, batched
Distill-Qwen-14B, 4-bit (Ollama) on RTX 4090$1.59/hr67–84$5.85n/a (single user)n/a
Distill-Qwen-32B, 4-bit (Ollama) on L40S$1.89/hr26–32$18.10n/a (single user)n/a
Distill-Qwen-32B, BF16 on A100 80GB$3.79/hr18–22$52.64200$5.26
Distill-Qwen-32B, FP8 on H100$4.99/hr36–45$34.23600$2.31
DeepSeek-R1, FP8 on 8× H2008 × $9.09/hr ≈ $72.72not estimatedn/a500–2,000$10.10–$40.40

Method: cost per million = hourly price ÷ (tokens/s × 3,600 ÷ 1,000,000). Dollar figures are calculated from the live prices in the price column; eight H200s cost 8 × $9.09/hr ≈ $72.72 an hour. Batched throughput is an assumption for many concurrent reasoning requests, not a measurement. We do not quote a single-stream figure for full R1. The bandwidth rule gives a theoretical ceiling in the hundreds of tokens per second for 37B active parameters, but expert routing and tensor-parallel communication keep real figures far below it.

A worked answer: a typical R1-32B reply with 2,000 thinking tokens and 300 answer tokens is 2,300 output tokens. On the H100 setup batched, that is 2,300 output tokens at $2.31 per million, about $0.0053 per answer. For a single user it takes about 2,300 ÷ 40 ≈ 58 seconds. That latency, not cost, is usually what pushes teams to cap max_tokens or to use a non-reasoning model for simple tasks. The tokens per second guide explains how to measure your own figures.

Is self-hosting DeepSeek private and safe?

Self-hosting keeps prompts and outputs on a GPU you control, which is the main reason many teams run DeepSeek's open weights rather than its hosted API. The weights are tensors in safetensors files; they make no network calls. The parts you still own are the endpoint and the machine.

  • Bind the server to 127.0.0.1 and reach it through an SSH tunnel, or put an API key and TLS in front of it.
  • Use the official deepseek-ai repositories or well-known quantisers, and avoid --trust-remote-code with unknown repos: it runs Python from the repository.
  • Treat outputs as you would from any LLM: evaluate on your own tasks, especially for factual and safety-sensitive use.

For a wider view of private deployments, see the best GPU clouds for running private AI models.

When renting from Wandering Giants Compute fits

Wandering Giants Compute fits DeepSeek in two ways. For the distills, DeepSeek R1 Distill Qwen 32B is a one-click model on any 80 GB card, an A100 at $3.79/hr or an H100 at $4.99/hr, served privately in Chat or behind an OpenAI-compatible API. For full R1, Root gives you a machine with eight H200s at $9.09/hr each or eight B200s at $15.49/hr each to run the commands above. Some H200 capacity comes from a supplier that cannot pause machines, and we say so before you launch. Billing is by the minute from prepaid credit and stops itself when credit runs out. Your prompts stay on your machine; we don't read them or train on them.

If you need full R1 served at scale across a multi-node cluster or with an uptime SLA, look at providers built for that. Where to rent an H200 compares them.

Frequently asked questions

Can I run the full DeepSeek-R1 on one GPU?

No. Its FP8 weights are about 700 GB, more than any single GPU holds; even a 288 GB B300 is far short. You need eight H200s or B200s in one machine, or a heavily quantised GGUF build spread across several cards with some quality loss.

Which DeepSeek model should I self-host?

For one GPU, DeepSeek-R1-Distill-Qwen-32B is the usual pick: strong reasoning for its size, and it fits an 80 GB card in BF16. Use the 14B or 7B distills on a 24 GB card. Run full R1 only if you need its quality and can justify an eight-GPU machine.

How much VRAM does DeepSeek-R1-Distill-Qwen-32B need?

About 65 GB for BF16 weights plus KV cache at roughly 0.26 MB per token, so an 80 GB A100 or H100 with a 16k context. In FP8 it needs about 33 GB, and the 4-bit Ollama build is about 20 GB, which fits a 48 GB L40S with room for long reasoning traces.

Why do DeepSeek R1 answers take so long?

R1 models think before answering, often writing 1,000 to 5,000 or more reasoning tokens inside think tags first. Decode runs one token at a time, so at 40 tokens per second a 2,000-token reasoning trace takes about 50 seconds before the final answer begins.

Is self-hosted DeepSeek private?

When the weights run on a GPU you rent or own, prompts and outputs stay on that machine and are not sent to DeepSeek's own API. The open weights themselves contain no network calls. Your privacy then depends on how you secure that machine and endpoint.

How do I hide the thinking part of DeepSeek R1 output?

Start vLLM with --reasoning-parser deepseek_r1 so the reasoning is returned in a separate reasoning field and the content holds only the answer. Otherwise strip everything up to the closing think tag in your client code.

Wandering Giants Compute

Rent the GPU for this, by the minute.

Launch an 80 GB GPU with DeepSeek R1 Distill Qwen 32B served privately behind an OpenAI-compatible API, or take root on eight H200s for full R1.

Prepaid credit, billed by the minute, stops itself when credit runs out. Prices in £, $, €, ¥, CA$, A$, CHF and S$; UK prices include VAT.

Keep reading

About this article. Written by the Wandering Giants Compute team, the people who run Wandering Giants Compute. Hardware figures are the manufacturers’ published specifications. Speeds and costs marked as estimates are worked out from those specifications and our current prices, with the method shown; they are not measured benchmarks. Wandering Giants prices are taken live from our price list each time this page is built.

Last reviewed 25 November 2026.