recipe.toml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # EXPERIMENTAL — DeepSeek-V4-Flash-0731 DSpark, built FROM SOURCE from the
  2. # newest local-inference-lab b12x fork ("eldritch"), instead of the prebuilt
  3. # aidendle94 image.
  4. #
  5. # fork branch: feat/gg-ds4-0731-launcher (e63a190ee) — torch 2.12.0,
  6. # flashinfer 0.6.15, cutlass-dsl 4.6.0, sm_121a
  7. # image: vllm-ds4-dspark-src:probe (built on demand via docker_image_dir)
  8. #
  9. # Serving flags/env mirror the fork's authoritative serve-ds4-flash-spark.sh at
  10. # that commit (DSpark k=5, draft attention backend B12X_MLA_SPARSE, b12x MoE/MLA,
  11. # cudagraph capture size = max_num_seqs * (k+1)). Adapt cluster-side: TP=2,
  12. # 1 node per rank, no DCP.
  13. #
  14. # ⚠️ NOT production. The image is a multi-hour from-source build. Boot may need
  15. # tuning; verify acceptance/throughput before any real traffic.
  16. engine = "vllm"
  17. name = "DeepSeek V4 Flash DSpark (EXPERIMENTAL, from source)"
  18. docker_image = "vllm-ds4-dspark-src:probe"
  19. model = "deepseek-ai/DeepSeek-V4-Flash-0731"
  20. required_nodes = 2
  21. tensor_parallel_size = 2
  22. pipeline_parallel_size = 1
  23. distributed_backend = "mp"
  24. shm_size = "32gb"
  25. docker_image_dir = "deepseek-v4-flash-dspark-src"
  26. entrypoint = ["vllm", "serve"]
  27. args = [
  28. "--kv-cache-dtype", "fp8",
  29. "--block-size", "256",
  30. "--load-format", "auto",
  31. "--max-model-len", "524288",
  32. "--max-num-seqs", "4",
  33. "--max-num-batched-tokens", "8192",
  34. # fork rule: max_num_seqs * (k+1) = 4 * 6
  35. "--max-cudagraph-capture-size", "24",
  36. # 0.78, not 0.80: the SvangenStudios agent-serving benchmark (v0.1.1) on
  37. # this exact stack found "0.80 boots but dies under traffic". GMU is a KV
  38. # lever, not a safety lever, when weights dominate memory. See
  39. # specs/tech-architecture/dgx-spark-agent-serving-findings.md.
  40. "--gpu-memory-utilization", "0.78",
  41. "--served-model-name", "deepseek-v4-flash", "default",
  42. "--attention-backend", "B12X_MLA_SPARSE",
  43. "--moe-backend", "b12x",
  44. "--enable-chunked-prefill",
  45. "--enable-prefix-caching",
  46. "--enable-flashinfer-autotune",
  47. "--compilation-config", """
  48. '{"cudagraph_mode":"FULL_AND_PIECEWISE","custom_ops":["all"]}'""",
  49. "--async-scheduling",
  50. "--no-scheduler-reserve-full-isl",
  51. # DSpark k=5 (dspark_block_size == 5); draft attention backend per fork
  52. "--speculative-config", """
  53. '{"method":"dspark","num_speculative_tokens":5,"attention_backend":"B12X_MLA_SPARSE"}'""",
  54. "--generation-config", "vllm",
  55. "--default-chat-template-kwargs.thinking=true",
  56. "--default-chat-template-kwargs.reasoning_effort=high",
  57. "--default-chat-template-kwargs.temperature=1",
  58. "--default-chat-template-kwargs.top_p=1",
  59. "--disable-custom-all-reduce",
  60. "--trust-remote-code",
  61. ]
  62. [env]
  63. # --- from the fork's serve-ds4-flash-spark.sh (e63a190ee) ---
  64. VLLM_ALLOW_LONG_MAX_MODEL_LEN = "1"
  65. VLLM_USE_AOT_COMPILE = "1"
  66. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  67. VLLM_USE_MEGA_AOT_ARTIFACT = "1"
  68. VLLM_MEMORY_PROFILER_ESTIMATE_CUDAGRAPHS = "1"
  69. VLLM_USE_FLASHINFER_SAMPLER = "1"
  70. VLLM_USE_B12X_WO_PROJECTION = "1"
  71. VLLM_USE_B12X_MHC = "1"
  72. VLLM_USE_B12X_FP8_GEMM = "1"
  73. VLLM_USE_B12X_MOE = "1"
  74. VLLM_USE_B12X_SPARSE_INDEXER = "1"
  75. VLLM_USE_V2_MODEL_RUNNER = "1"
  76. VLLM_PCIE_ALLREDUCE_BACKEND = "b12x"
  77. VLLM_ENABLE_PCIE_ALLREDUCE = "1"
  78. B12X_MLA_SM120_UNIFIED = "1"
  79. B12X_DENSE_SPLITK_TURBO = "1"
  80. B12X_W4A16_TC_DECODE = "1"
  81. B12X_MOE_FORCE_A8 = "1"
  82. # --- build/arch + memory ---
  83. CUTE_DSL_ARCH = "sm_121a"
  84. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  85. DG_JIT_USE_NVRTC = "0"
  86. USE_CUDNN = "1"
  87. CUDA_VISIBLE_DEVICES = "0"
  88. CUDA_DEVICE_ORDER = "PCI_BUS_ID"
  89. OMP_NUM_THREADS = "4"
  90. # --- offline ---
  91. HF_HUB_OFFLINE = "1"