recipe.toml 3.1 KB

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