Ver Fonte

feat(recipe): update deepseek-v4-flash-dspark from NVIDIA reference

Recipe changes from reference compose/env files:
- --generation-config vllm, --load-format auto (new flags)
- --default-chat-template-kwargs.temperature=0.48 (replaces
  --override-generation-config)
- --max-model-len 524288 (user choice between 393K and 1M)
- VLLM_USE_B12X_MOE=1 (re-enable b12x MoE primary path)
- NCCL_IB_TIMEOUT=24, NCCL_IB_QPS_PER_CONNECTION=8,
  NCCL_BUFFERSIZE=16777216, NCCL_SOCKET_FAMILY=inet (RoCE tuning)
- NCCL_P2P_LEVEL=2 (PXN for multi-node)
- VLLM_ENABLE_PCIE_ALLREDUCE=0, VLLM_PCIE_ALLREDUCE_BACKEND=cpp
- CUDA_VISIBLE_DEVICES=0, CUDA_DEVICE_ORDER=PCI_BUS_ID
- --init and --ulimit nofile=1048576 (docker flags, in launcher code)
- Removed commented-out speculative-config variants and attention-config
Alexander Korolev há 3 meses atrás
pai
commit
56bcdf4bf5
2 ficheiros alterados com 20 adições e 14 exclusões
  1. 18 14
      recipes/deepseek-v4-flash-dspark/recipe.toml
  2. 2 0
      src/docker/mod.rs

+ 18 - 14
recipes/deepseek-v4-flash-dspark/recipe.toml

@@ -7,6 +7,7 @@
 #   The DSpark variant tuned for speculative decoding on DGX Spark.
 #
 # Reference: Nvidia Developer Forum — DeepSeek-V4-Flash-DSpark recipe
+#   https://forums.developer.nvidia.com/t/recipe-deepseek-v4-flash-dspark-on-dgx-spark/340994
 
 engine = "vllm"
 name = "DeepSeek V4 Flash DSpark (vLLM)"
@@ -23,7 +24,8 @@ entrypoint = ["vllm", "serve"]
 args = [
     "--kv-cache-dtype", "fp8",
     "--block-size", "256",
-    "--max-model-len", "1048576",
+    "--load-format", "auto",
+    "--max-model-len", "524288",
     "--max-num-seqs", "16",
     "--max-num-batched-tokens", "16536",
     "--max-cudagraph-capture-size", "16",
@@ -43,8 +45,6 @@ args = [
     "--async-scheduling",
     "--no-scheduler-reserve-full-isl",
     # DSpark speculative decoding
-#    "--speculative-config", """
-#'{"method":"dspark","num_speculative_tokens":5,"draft_sample_method":"probabilistic"}'""",
     "--speculative-config", """
 '{"method":"dspark","num_speculative_tokens":7,"draft_sample_method":"greedy"}'""",
     # Tokenizer / reasoning
@@ -52,27 +52,20 @@ args = [
     "--tool-call-parser", "deepseek_v4",
     "--reasoning-parser", "deepseek_v4",
     "--enable-auto-tool-choice",
+    "--generation-config", "vllm",
     "--default-chat-template-kwargs.thinking=true",
-    #"--default-chat-template-kwargs.reasoning_effort=max",
-    # temp 0.4 norm
-    "--override-generation-config", """
-'{"temperature": 0.4, "top_p": 1.0}'""",
     "--default-chat-template-kwargs.reasoning_effort=high",
+    "--default-chat-template-kwargs.temperature=0.48",
     # Disable custom all-reduce (not needed on GB10 single-NIC)
     "--disable-custom-all-reduce",
     "--trust-remote-code",
-    # From model card
-# does not work with b12x MoE
-#    "--attention-config", """
-#'{"use_fp4_indexer_cache": true}'""",
 ]
 
 [env]
 # DSpark speculative decoding
 VLLM_DSPARK_REPLICATE_MARKOV_W1 = "1"
 # b12x MoE (this image's primary path)
-# VLLM_USE_B12X_MOE = "1"
-VLLM_USE_B12X_MOE = "0" # cutlass decode
+VLLM_USE_B12X_MOE = "1"
 
 # b12x suite = REQUIRED by this image
 VLLM_USE_B12X_MHC = "1"
@@ -103,6 +96,17 @@ HF_HUB_OFFLINE = "1"
 TORCH_CUDA_ARCH_LIST = "12.1a"
 
 # NCCL overrides (cluster config ib_hca/socket_ifname used for most; recipe wins last)
-NCCL_P2P_LEVEL = "SYS"
+NCCL_P2P_LEVEL = "2"
 NCCL_CUMEM_ENABLE = "0"
+NCCL_IB_TIMEOUT = "24"
+NCCL_IB_QPS_PER_CONNECTION = "8"
+NCCL_BUFFERSIZE = "16777216"
+NCCL_SOCKET_FAMILY = "inet"
 
+# PCIe allreduce not needed on GB10 single-NIC
+VLLM_ENABLE_PCIE_ALLREDUCE = "0"
+VLLM_PCIE_ALLREDUCE_BACKEND = "cpp"
+
+# GPU device isolation (single GPU per node)
+CUDA_VISIBLE_DEVICES = "0"
+CUDA_DEVICE_ORDER = "PCI_BUS_ID"

+ 2 - 0
src/docker/mod.rs

@@ -364,8 +364,10 @@ fn build_docker_command(ctx: &DockerCommandCtx, node: &Node, is_head: bool) -> V
         "--ipc=host".to_string(),
         "--privileged".to_string(),
         "--network=host".to_string(),
+        "--init".to_string(),
         "--ulimit memlock=-1".to_string(),
         "--ulimit stack=67108864".to_string(),
+        "--ulimit nofile=1048576".to_string(),
     ];
     if !ctx.recipe.shm_size.is_empty() {
         flags.push(format!("--shm-size {}", ctx.recipe.shm_size.as_str()));