recipe.toml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # DeepSeek-V4-Flash-DSpark — 2× GB10 / DGX Spark, TP=2 over RoCE.
  2. # Uses the DSpark speculative decoding method with aidendle94's production-3.6 image.
  3. #
  4. # Image: aidendle94/sparkrun-vllm-ds4-gb10:production-3.6
  5. # Latest GB10-native image with DSpark support, b12x MoE, and multi-node fixes.
  6. # Model: deepseek-ai/DeepSeek-V4-Flash-DSpark
  7. # The DSpark variant tuned for speculative decoding on DGX Spark.
  8. #
  9. # Reference: Nvidia Developer Forum — DeepSeek-V4-Flash-DSpark recipe
  10. engine = "vllm"
  11. name = "DeepSeek V4 Flash DSpark (vLLM)"
  12. docker_image = "aidendle94/sparkrun-vllm-ds4-gb10:production-3.6"
  13. model = "deepseek-ai/DeepSeek-V4-Flash-DSpark"
  14. required_nodes = 2
  15. tensor_parallel_size = 2
  16. pipeline_parallel_size = 1
  17. distributed_backend = "mp"
  18. shm_size = "32gb"
  19. entrypoint = ["vllm", "serve"]
  20. args = [
  21. "--kv-cache-dtype", "fp8",
  22. "--block-size", "256",
  23. "--max-model-len", "393216",
  24. "--max-num-seqs", "128",
  25. "--max-num-batched-tokens", "4096",
  26. "--max-cudagraph-capture-size", "128",
  27. "--gpu-memory-utilization", "0.8",
  28. "--served-model-name", "deepseek-v4-flash-dspark", "default",
  29. # Engine backends
  30. "--attention-backend", "FLASHINFER_MLA_SPARSE_DSV4",
  31. "--moe-backend", "b12x",
  32. # Chunked prefill + prefix caching
  33. "--enable-chunked-prefill",
  34. "--enable-prefix-caching",
  35. "--enable-flashinfer-autotune",
  36. # Compilation
  37. "--compilation-config", """
  38. '{"cudagraph_mode":"FULL_AND_PIECEWISE","custom_ops":["all"]}'""",
  39. # Async scheduling
  40. "--async-scheduling",
  41. "--no-scheduler-reserve-full-isl",
  42. # DSpark speculative decoding
  43. "--speculative-config", """
  44. '{"method":"dspark","num_speculative_tokens":3,"draft_sample_method":"probabilistic"}'""",
  45. # Tokenizer / reasoning
  46. "--tokenizer-mode", "deepseek_v4",
  47. "--tool-call-parser", "deepseek_v4",
  48. "--reasoning-parser", "deepseek_v4",
  49. "--enable-auto-tool-choice",
  50. "--default-chat-template-kwargs.thinking=true",
  51. "--default-chat-template-kwargs.reasoning_effort=max",
  52. # Disable custom all-reduce (not needed on GB10 single-NIC)
  53. "--disable-custom-all-reduce",
  54. "--trust-remote-code",
  55. ]
  56. [env]
  57. # DSpark speculative decoding
  58. VLLM_DSPARK_REPLICATE_MARKOV_W1 = "1"
  59. # b12x MoE (this image's primary path)
  60. VLLM_USE_B12X_MOE = "1"
  61. # b12x suite = REQUIRED by this image
  62. VLLM_USE_B12X_MHC = "1"
  63. VLLM_USE_B12X_WO_PROJECTION = "1"
  64. VLLM_USE_B12X_FP8_GEMM = "1"
  65. VLLM_USE_B12X_SPARSE_INDEXER = "1"
  66. VLLM_USE_V2_MODEL_RUNNER = "1"
  67. VLLM_USE_FLASHINFER_SAMPLER = "1"
  68. VLLM_USE_AOT_COMPILE = "1"
  69. VLLM_USE_MEGA_AOT_ARTIFACT = "0"
  70. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  71. VLLM_MEMORY_PROFILE_INCLUDE_ATTN = "1"
  72. VLLM_PREFIX_CACHE_RETENTION_INTERVAL = "4096"
  73. B12X_MLA_SM120_UNIFIED = "1"
  74. B12X_DENSE_SPLITK_TURBO = "1"
  75. B12X_W4A16_TC_DECODE = "1"
  76. B12X_MHC_MAX_TOKENS = "16384"
  77. # GPU memory management
  78. CUTE_DSL_ARCH = "sm_121a"
  79. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  80. OMP_NUM_THREADS = "4"
  81. # Offline mode
  82. HF_HUB_OFFLINE = "1"
  83. # Compile-time arch hints
  84. TORCH_CUDA_ARCH_LIST = "12.1a"
  85. # NCCL overrides (cluster config ib_hca/socket_ifname used for most; recipe wins last)
  86. NCCL_P2P_LEVEL = "SYS"
  87. NCCL_CUMEM_ENABLE = "0"