recipe.toml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. # Engine backends
  29. "--attention-backend", "FLASHINFER_MLA_SPARSE_DSV4",
  30. "--moe-backend", "b12x",
  31. # Chunked prefill + prefix caching
  32. "--enable-chunked-prefill",
  33. "--enable-prefix-caching",
  34. "--enable-flashinfer-autotune",
  35. # Compilation
  36. "--compilation-config", """
  37. '{"cudagraph_mode":"FULL_AND_PIECEWISE","custom_ops":["all"]}'""",
  38. # Async scheduling
  39. "--async-scheduling",
  40. "--no-scheduler-reserve-full-isl",
  41. # DSpark speculative decoding
  42. "--speculative-config", """
  43. '{"method":"dspark","num_speculative_tokens":3,"draft_sample_method":"probabilistic"}'""",
  44. # Tokenizer / reasoning
  45. "--tokenizer-mode", "deepseek_v4",
  46. "--tool-call-parser", "deepseek_v4",
  47. "--reasoning-parser", "deepseek_v4",
  48. "--enable-auto-tool-choice",
  49. "--default-chat-template-kwargs.thinking=true",
  50. "--default-chat-template-kwargs.reasoning_effort=max",
  51. # Disable custom all-reduce (not needed on GB10 single-NIC)
  52. "--disable-custom-all-reduce",
  53. "--trust-remote-code",
  54. ]
  55. [env]
  56. # DSpark speculative decoding
  57. VLLM_DSPARK_REPLICATE_MARKOV_W1 = "1"
  58. # b12x MoE (this image's primary path)
  59. VLLM_USE_B12X_MOE = "1"
  60. # b12x suite = REQUIRED by this image
  61. VLLM_USE_B12X_MHC = "1"
  62. VLLM_USE_B12X_WO_PROJECTION = "1"
  63. VLLM_USE_B12X_FP8_GEMM = "1"
  64. VLLM_USE_B12X_SPARSE_INDEXER = "1"
  65. VLLM_USE_V2_MODEL_RUNNER = "1"
  66. VLLM_USE_FLASHINFER_SAMPLER = "1"
  67. VLLM_USE_AOT_COMPILE = "1"
  68. VLLM_USE_MEGA_AOT_ARTIFACT = "0"
  69. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  70. VLLM_MEMORY_PROFILE_INCLUDE_ATTN = "1"
  71. VLLM_PREFIX_CACHE_RETENTION_INTERVAL = "4096"
  72. B12X_MLA_SM120_UNIFIED = "1"
  73. B12X_DENSE_SPLITK_TURBO = "1"
  74. B12X_W4A16_TC_DECODE = "1"
  75. B12X_MHC_MAX_TOKENS = "16384"
  76. # GPU memory management
  77. CUTE_DSL_ARCH = "sm_121a"
  78. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  79. OMP_NUM_THREADS = "4"
  80. # Offline mode
  81. HF_HUB_OFFLINE = "1"
  82. # Compile-time arch hints
  83. TORCH_CUDA_ARCH_LIST = "12.1a"
  84. # NCCL overrides (cluster config ib_hca/socket_ifname used for most; recipe wins last)
  85. NCCL_P2P_LEVEL = "SYS"
  86. NCCL_CUMEM_ENABLE = "0"