{
  "hf_id": "deepseek-ai/DeepSeek-R1",
  "meta": {
    "title": "DeepSeek-R1",
    "slug": "deepseek-r1",
    "provider": "DeepSeek",
    "description": "DeepSeek-R1 is a 671B-parameter MoE reasoning model built on the DeepSeek-V3 architecture, trained with large-scale reinforcement learning for strong chain-of-thought capabilities.",
    "date_added": "2025-08-01",
    "date_updated": "2026-10-02",
    "tasks": [
      "text"
    ],
    "performance_headline": "Open-weights RL-trained reasoning model with native FP8 / FP4 variants",
    "related_recipes": [
      "deepseek-ai/DeepSeek-V3",
      "deepseek-ai/DeepSeek-V3.1"
    ],
    "hardware": {
      "h200": "verified",
      "b200": "verified",
      "gb200": "verified",
      "mi300x": "verified",
      "mi325x": "verified",
      "mi350x": "verified",
      "mi355x": "verified"
    }
  },
  "recommended_command": {
    "hardware": "h200",
    "strategy": "single_node_tp",
    "variant": "default",
    "node_count": 1,
    "deploy_type": "single_node",
    "env": {
      "VLLM_USE_RUST_FRONTEND": "1"
    },
    "docker_image": "vllm/vllm-openai:latest",
    "command": "vllm serve deepseek-ai/DeepSeek-R1 \\\n  --trust-remote-code \\\n  --tensor-parallel-size 8 \\\n  --enable-expert-parallel \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser deepseek_v3 \\\n  --chat-template examples/tool_chat_template_deepseekr1.jinja \\\n  --reasoning-parser deepseek_r1",
    "argv": [
      "vllm",
      "serve",
      "deepseek-ai/DeepSeek-R1",
      "--trust-remote-code",
      "--tensor-parallel-size",
      "8",
      "--enable-expert-parallel",
      "--enable-auto-tool-choice",
      "--tool-call-parser",
      "deepseek_v3",
      "--chat-template",
      "examples/tool_chat_template_deepseekr1.jinja",
      "--reasoning-parser",
      "deepseek_r1"
    ],
    "docker_command": "docker run --gpus all \\\n  --privileged --ipc=host -p 8000:8000 \\\n  -v ~/.cache/huggingface:/root/.cache/huggingface \\\n  -e VLLM_USE_RUST_FRONTEND=1 \\\n  vllm/vllm-openai:latest deepseek-ai/DeepSeek-R1 \\\n  --trust-remote-code \\\n  --tensor-parallel-size 8 \\\n  --enable-expert-parallel \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser deepseek_v3 \\\n  --chat-template examples/tool_chat_template_deepseekr1.jinja \\\n  --reasoning-parser deepseek_r1",
    "docker_argv": [
      "docker",
      "run",
      "--gpus",
      "all",
      "--privileged",
      "--ipc=host",
      "-p",
      "8000:8000",
      "-v",
      "~/.cache/huggingface:/root/.cache/huggingface",
      "-e",
      "VLLM_USE_RUST_FRONTEND=1",
      "vllm/vllm-openai:latest",
      "deepseek-ai/DeepSeek-R1",
      "--trust-remote-code",
      "--tensor-parallel-size",
      "8",
      "--enable-expert-parallel",
      "--enable-auto-tool-choice",
      "--tool-call-parser",
      "deepseek_v3",
      "--chat-template",
      "examples/tool_chat_template_deepseekr1.jinja",
      "--reasoning-parser",
      "deepseek_r1"
    ],
    "strategy_spec": {
      "name": "single_node_tp",
      "deploy_type": "single_node",
      "display_name": "Tensor Parallel",
      "short_label": "TP",
      "orientation": "latency",
      "description": "Single-node tensor parallel. Splits the model across all local GPUs. TP size is set to the GPU count at deploy time. The simplest multi-GPU strategy — works for all model architectures.\n",
      "hardware_match": {
        "min_gpus": 1,
        "max_gpus": 8,
        "multi_node": false
      },
      "vllm_args": [],
      "parallel_flag": "--tensor-parallel-size"
    },
    "hardware_profile": {
      "brand": "NVIDIA",
      "generation": "hopper",
      "compute_arch": "sm90",
      "display_name": "H200",
      "description": "NVIDIA H200 SXM 141 GB HBM3e · 8-GPU HGX node",
      "gpu_count": 8,
      "vram_gb": 1128,
      "multi_node": false
    },
    "alternatives": {
      "single_node_tep": "/deepseek-ai/DeepSeek-R1/strategies/single_node_tep.json",
      "single_node_dep": "/deepseek-ai/DeepSeek-R1/strategies/single_node_dep.json",
      "single_node_dpa_tp": "/deepseek-ai/DeepSeek-R1/strategies/single_node_dpa_tp.json",
      "multi_node_tp": "/deepseek-ai/DeepSeek-R1/strategies/multi_node_tp.json",
      "multi_node_tp_pp": "/deepseek-ai/DeepSeek-R1/strategies/multi_node_tp_pp.json",
      "multi_node_dep": "/deepseek-ai/DeepSeek-R1/strategies/multi_node_dep.json",
      "multi_node_tep": "/deepseek-ai/DeepSeek-R1/strategies/multi_node_tep.json",
      "pd_cluster": "/deepseek-ai/DeepSeek-R1/strategies/pd_cluster.json",
      "kv_store_centralized_mooncake": "/deepseek-ai/DeepSeek-R1/strategies/kv_store_centralized_mooncake.json",
      "kv_store_distributed_mooncake": "/deepseek-ai/DeepSeek-R1/strategies/kv_store_distributed_mooncake.json"
    },
    "by_hardware": {
      "h200": "/deepseek-ai/DeepSeek-R1/hw/h200.json",
      "h100": "/deepseek-ai/DeepSeek-R1/hw/h100.json",
      "b200": "/deepseek-ai/DeepSeek-R1/hw/b200.json",
      "gb200": "/deepseek-ai/DeepSeek-R1/hw/gb200.json",
      "b300": "/deepseek-ai/DeepSeek-R1/hw/b300.json",
      "gb300": "/deepseek-ai/DeepSeek-R1/hw/gb300.json",
      "mi300x": "/deepseek-ai/DeepSeek-R1/hw/mi300x.json",
      "mi325x": "/deepseek-ai/DeepSeek-R1/hw/mi325x.json",
      "mi350x": "/deepseek-ai/DeepSeek-R1/hw/mi350x.json",
      "mi355x": "/deepseek-ai/DeepSeek-R1/hw/mi355x.json"
    }
  },
  "model": {
    "model_id": "deepseek-ai/DeepSeek-R1",
    "min_vllm_version": "0.12.0",
    "default_frontend": "rust",
    "architecture": "moe",
    "parameter_count": "671B",
    "active_parameters": "37B",
    "context_length": 163840,
    "supports_dcp": true,
    "base_args": [
      "--trust-remote-code"
    ],
    "base_env": {},
    "install": {
      "pip": {
        "command": "uv venv\nsource .venv/bin/activate\nuv pip install -U vllm --torch-backend auto"
      },
      "docker": {
        "command": "docker pull vllm/vllm-openai:latest"
      }
    }
  },
  "features": {
    "tool_calling": {
      "description": "Enable DeepSeek-R1 tool calling with the deepseek_v3 tool-call parser.",
      "args": [
        "--enable-auto-tool-choice",
        "--tool-call-parser",
        "deepseek_v3",
        "--chat-template",
        "examples/tool_chat_template_deepseekr1.jinja"
      ]
    },
    "reasoning": {
      "description": "Enable reasoning/thinking mode with the DeepSeek R1 reasoning parser.",
      "args": [
        "--reasoning-parser",
        "deepseek_r1"
      ]
    }
  },
  "opt_in_features": [],
  "variants": {
    "default": {
      "precision": "fp8",
      "vram_minimum_gb": 805,
      "description": "Native FP8 weights on 8xH200 (recommended)"
    },
    "r1_0528": {
      "model_id": "deepseek-ai/DeepSeek-R1-0528",
      "precision": "fp8",
      "vram_minimum_gb": 805,
      "description": "May 2025 DeepSeek-R1 refresh (DeepSeek-R1-0528)",
      "json": "/deepseek-ai/DeepSeek-R1-0528.json"
    },
    "nvfp4": {
      "model_id": "nvidia/DeepSeek-R1-0528-NVFP4-v2",
      "precision": "nvfp4",
      "vram_minimum_gb": 403,
      "description": "NVIDIA NVFP4 quantized weights for Blackwell GPUs",
      "extra_args": [
        "--kv-cache-dtype",
        "fp8"
      ],
      "json": "/nvidia/DeepSeek-R1-0528-NVFP4-v2.json"
    },
    "mxfp4": {
      "model_id": "amd/DeepSeek-R1-0528-MXFP4-MTP-MoEFP4",
      "precision": "mxfp4",
      "vram_minimum_gb": 403,
      "description": "AMD MXFP4 quantized weights for MI350X / MI355X (gfx950)",
      "supported_hardware": [
        "mi350x",
        "mi355x"
      ],
      "tp": 8,
      "extra_args": [
        "--no-enable-expert-parallel",
        "--kv-cache-dtype",
        "fp8"
      ],
      "extra_env": {
        "VLLM_ROCM_USE_SKINNY_GEMM": "0"
      },
      "json": "/amd/DeepSeek-R1-0528-MXFP4-MTP-MoEFP4.json"
    },
    "redhat_nvfp4": {
      "model_id": "RedHatAI/DeepSeek-R1-NVFP4-FP8-BLOCK",
      "precision": "nvfp4",
      "label": "NVFP4+FP8 Block (RedHat)",
      "vram_minimum_gb": 444,
      "description": "RedHatAI NVFP4+FP8 block mixed-precision checkpoint",
      "json": "/RedHatAI/DeepSeek-R1-NVFP4-FP8-BLOCK.json"
    }
  },
  "hardware_overrides": {
    "nvidia": {
      "extra_args": [
        "--enable-expert-parallel"
      ],
      "extra_env": {}
    },
    "amd": {
      "extra_args": [],
      "extra_env": {
        "VLLM_ROCM_USE_AITER": "1"
      }
    }
  },
  "guide": "## Overview\n\nDeepSeek-R1 is a 671B-parameter Mixture-of-Experts reasoning model (37B activated per\ntoken) that shares its architecture with DeepSeek-V3, so the same launch recipes apply\nto both. DeepSeek publishes a refreshed checkpoint as `DeepSeek-R1-0528`, NVIDIA\npublishes an FP4 quantized variant (`nvidia/DeepSeek-R1-FP4`) that runs on Blackwell\nGPUs with fewer devices, and AMD publishes an MXFP4 quantized variant\n(`amd/DeepSeek-R1-0528-MXFP4-MTP-MoEFP4`) that runs on Instinct GPUs.\n\n## Prerequisites\n\n- **Hardware (FP8)**: 8x H200 (CUDA) or 8x MI300X / MI325X / MI355X (ROCm)\n- **Hardware (NVFP4)**: 4x B200 GPUs\n- **Hardware (MXFP4)**: 8x MI350X / MI355X (ROCm)\n- **vLLM**: Current stable release\n\n### CUDA\n```bash\nuv venv\nsource .venv/bin/activate\nuv pip install -U vllm --torch-backend auto\n```\n\n### ROCm (MI300X, MI325X, MI355X)\nRequires Python 3.12, ROCm 7.2.1, and glibc >= 2.35.\n```bash\nuv venv --python 3.12\nsource .venv/bin/activate\nuv pip install vllm --extra-index-url https://wheels.vllm.ai/rocm/\n```\n\n## Client Usage\n\n### 8xH200 / 8xMI300X (FP8)\n\nTensor Parallel + Expert Parallel (TP8+EP) — CUDA:\n```bash\nvllm serve deepseek-ai/DeepSeek-R1-0528 \\\n  --trust-remote-code \\\n  --tensor-parallel-size 8 \\\n  --enable-expert-parallel\n```\n\nTensor Parallel + Expert Parallel (TP8+EP) — ROCm:\n```bash\nexport VLLM_ROCM_USE_AITER=1\n\nvllm serve deepseek-ai/DeepSeek-R1 \\\n  --trust-remote-code \\\n  --tensor-parallel-size 8 \\\n  --enable-expert-parallel\n```\n\nData Parallel + Expert Parallel (DP8+EP) — CUDA:\n```bash\nvllm serve deepseek-ai/DeepSeek-R1-0528 \\\n  --trust-remote-code \\\n  --data-parallel-size 8 \\\n  --enable-expert-parallel\n```\n\n### 8xMI355X (FP8)\n\nTensor Parallel (TP8) — ROCm. Validated on MI355X only; INT4 quick reduce and\nfused shared experts are not enabled on other AMD GPUs or other strategies:\n```bash\nexport VLLM_ROCM_USE_AITER=1\nexport VLLM_ROCM_QUICK_REDUCE_QUANTIZATION=INT4\nexport VLLM_ROCM_USE_AITER_FUSION_SHARED_EXPERTS=1\n\nvllm serve deepseek-ai/DeepSeek-R1 \\\n  --trust-remote-code \\\n  --tensor-parallel-size 8\n```\n\n### 8xMI350X / 8xMI355X (DPA+TP)\n\nEach GPU runs its own attention replica with a private KV cache, while the MoE\nexperts stay tensor-sharded across all eight GPUs. Aggregate KV-cache\ncapacity is roughly 8x that of a single TP8 replica, useful for workloads \nbenefiting from larger KV capacities. \n\nEngine (all eight ranks in one process, listening on 8100):\n```bash\nexport VLLM_ROCM_USE_AITER=1\nexport VLLM_ENGINE_READY_TIMEOUT_S=1800\n\nvllm serve deepseek-ai/DeepSeek-R1 \\\n  --trust-remote-code \\\n  --port 8100 \\\n  --data-parallel-size 8 \\\n  --tensor-parallel-size 1\n```\n\nRouter (client-facing on 8000, spreads requests across the eight DP ranks):\n```bash\nuv pip install vllm-router\n\nvllm-router \\\n  --host 0.0.0.0 \\\n  --port 8000 \\\n  --policy consistent_hash \\\n  --intra-node-data-parallel-size 8 \\\n  --worker-urls http://localhost:8100 \\\n  --worker-startup-timeout-secs 1800\n```\n\nNotes:\n\n- `--intra-node-data-parallel-size` must match the engine's\n  `--data-parallel-size`. A mismatch silently under-uses ranks.\n- `consistent_hash` is the policy that makes this worthwhile for chat: it pins\n  a conversation to the rank that already holds its prefix, so the larger\n  aggregate cache actually gets hit. `round_robin` scatters turns of the same\n  conversation across ranks and throws the prefix away.\n- Start the engine first, then the router; `--worker-startup-timeout-secs 1800`\n  covers the engine's weight load either way.\n- Send client traffic to the router on port 8000, never to 8100 directly.\n\n### 4xB200 (FP4)\n\nOn vLLM v0.28.0 and later, the FlashInfer MoE kernels are selected automatically\nfor both FP4 and FP8 on Blackwell — no environment variables are needed. To pin\nthe backend explicitly, pass `--moe-backend flashinfer_trtllm`.\n\nTensor Parallel + Expert Parallel (TP4+EP):\n```bash\nCUDA_VISIBLE_DEVICES=0,1,2,3 vllm serve nvidia/DeepSeek-R1-FP4 \\\n  --trust-remote-code \\\n  --tensor-parallel-size 4 \\\n  --enable-expert-parallel\n```\n\nData Parallel + Expert Parallel (DP4+EP):\n```bash\nCUDA_VISIBLE_DEVICES=0,1,2,3 vllm serve nvidia/DeepSeek-R1-FP4 \\\n  --trust-remote-code \\\n  --data-parallel-size 4 \\\n  --enable-expert-parallel\n```\n\n### 8xMI350X / 8xMI355X (MXFP4)\n\nTensor Parallel + FP8 KV cache (TP8):\n```bash\nexport VLLM_ROCM_USE_AITER=1\nexport VLLM_ROCM_USE_SKINNY_GEMM=0\n\nvllm serve amd/DeepSeek-R1-0528-MXFP4-MTP-MoEFP4 \\\n  --trust-remote-code \\\n  --tensor-parallel-size 8 \\\n  --kv-cache-dtype fp8\n```\n\n## Benchmarking\n\nFor benchmarking, prefix caching is disabled by default in vLLM — no extra server\nflag is needed.\n\n```bash\n# FP8 benchmark\nvllm bench serve \\\n  --model deepseek-ai/DeepSeek-R1-0528 \\\n  --dataset-name random \\\n  --random-input-len 8000 \\\n  --random-output-len 1000 \\\n  --request-rate 10000 \\\n  --num-prompts 16 \\\n  --ignore-eos\n```\n\n```bash\n# NVFP4 benchmark\nvllm bench serve \\\n  --model nvidia/DeepSeek-R1-FP4 \\\n  --dataset-name random \\\n  --random-input-len 8000 \\\n  --random-output-len 1000 \\\n  --request-rate 10000 \\\n  --num-prompts 16 \\\n  --ignore-eos\n```\n\n```bash\n# MXFP4 benchmark (MI350X / MI355X)\nvllm bench serve \\\n  --model amd/DeepSeek-R1-0528-MXFP4-MTP-MoEFP4 \\\n  --dataset-name random \\\n  --random-input-len 8000 \\\n  --random-output-len 1000 \\\n  --request-rate 10000 \\\n  --num-prompts 16 \\\n  --ignore-eos\n```\n\nTest different workloads by adjusting input/output lengths:\n- Prompt-heavy: 8000 input / 1000 output\n- Decode-heavy: 1000 input / 8000 output\n- Balanced: 1000 input / 1000 output\n\n## Troubleshooting\n\n- **Disaggregated Serving with Wide EP (Experimental GB200)**: See\n  [vLLM issue #33583](https://github.com/vllm-project/vllm/issues/33583),\n  [the vLLM blog post](https://blog.vllm.ai/2026/02/03/dsr1-gb200-part1.html), and\n  [this reference fork](https://github.com/minosfuture/vllm/tree/pd_gb200_0114/runs/DS-R1/fp4)\n  for GB200 disaggregated serving recipes.\n\n## References\n\n- [DeepSeek-R1 on Hugging Face](https://huggingface.co/deepseek-ai/DeepSeek-R1)\n- [DeepSeek-R1-0528 on Hugging Face](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528)\n- [NVIDIA DeepSeek-R1-FP4](https://huggingface.co/nvidia/DeepSeek-R1-FP4)\n- [AMD DeepSeek-R1-0528-MXFP4-MTP-MoEFP4](https://huggingface.co/amd/DeepSeek-R1-0528-MXFP4-MTP-MoEFP4)\n- [vLLM Expert Parallelism docs](https://docs.vllm.ai/en/latest/serving/expert_parallel_deployment.html)\n- [vLLM Data Parallel deployment docs](https://docs.vllm.ai/en/latest/serving/data_parallel_deployment.html)\n",
  "source": {
    "source": "vllm",
    "repo": "vllm-project/vllm",
    "ref": "main",
    "sha": "564ac0de1b228568cafcbfbe8ccaccc82d6023eb",
    "path": "recipes/models/deepseek-ai/DeepSeek-R1.yaml",
    "edit_url": "https://github.com/vllm-project/vllm/edit/main/recipes/models/deepseek-ai/DeepSeek-R1.yaml",
    "overlays": []
  }
}