recipe.toml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # DeepSeek-V4.1-Flash (552B MoE, MXFP4 experts, Engram-on-disk) — 4x DGX Spark.
  2. #
  3. # Image: dsv41-flash:local (docker-images/dsv41-flash/ — tonyd2wild overlay
  4. # chain as clone-at-pin build: vllm dsv41-feat@e47aa780 + sm121
  5. # _C_stable_libtorch + FlashInfer 0.7.0rc1 + 7 boot-10 patches baked in,
  6. # MIT provenance).
  7. #
  8. # Model: deepseek-ai/DeepSeek-V4.1-Flash (476 GB on the NFS HF cache,
  9. # refs/main). The two 203 GB FP8 Engram n-gram tables are NEVER loaded into
  10. # HBM — the baked engram.py patch keeps them on disk (DSV41_ENGRAM_DISK=1)
  11. # and reads rows on demand. Node-local sparse copies of each rank's rows
  12. # (48 GB, engram-local.json) accelerate decode once created (DSV41_ENGRAM_DIR
  13. # below, added after the copies exist — first boot reads straight from NFS).
  14. #
  15. # Config mirrors their boot-10 serving setup (launch/dsv41-tp4.sh):
  16. # CUDA graphs FULL_AND_PIECEWISE + exact DSpark capture sizes (no padded
  17. # rows — padded speculative batches hang SM120 sparse MLA, FlashInfer
  18. # #5015), DSpark k=5 with the checkpoint's own draft layers, GMU 0.80,
  19. # 300K ctx (KV pool ~1.07M tokens = 3.57x headroom), tools + vision on,
  20. # thinking off by default.
  21. engine = "vllm"
  22. name = "DeepSeek-V4.1-Flash MXFP4 (dsv41 img, 4x, DSpark k=5, Engram-on-disk)"
  23. docker_image = "dsv41-flash:local"
  24. docker_image_dir = "dsv41-flash"
  25. model = "deepseek-ai/DeepSeek-V4.1-Flash"
  26. required_nodes = 4
  27. tensor_parallel_size = 4
  28. pipeline_parallel_size = 1
  29. distributed_backend = "mp"
  30. shm_size = "32gb"
  31. entrypoint = ["vllm", "serve"]
  32. args = [
  33. "--served-model-name", "dsv41",
  34. "--trust-remote-code",
  35. "--distributed-executor-backend", "mp",
  36. "--gpu-memory-utilization", "0.80",
  37. "--max-model-len", "300000",
  38. "--max-num-seqs", "8",
  39. "--max-num-batched-tokens", "8192",
  40. # boot-4 fix: the V4 indexer backend refuses the smallest-listed block
  41. "--block-size", "128",
  42. # boot-10: exact capture sizes for DSpark k=5, SEQS=8 (multiples of 5
  43. # and 6 up to 48 — every decode batch gets an exact FULL graph, no padding)
  44. "--compilation-config", """
  45. '{"cudagraph_mode":"FULL_AND_PIECEWISE","cudagraph_capture_sizes":[5,6,10,12,15,18,20,24,25,30,35,36,40,42,48]}'""",
  46. "--speculative-config", """
  47. '{"method":"dspark","num_speculative_tokens":5,"draft_sample_method":"probabilistic","rejection_sample_method":"block","enable_adaptive_verification":false}'""",
  48. "--tool-call-parser", "deepseek_v41",
  49. "--enable-auto-tool-choice",
  50. "--reasoning-parser", "deepseek_v41",
  51. "--default-chat-template-kwargs", """
  52. '{"thinking": false}'""",
  53. ]
  54. [env]
  55. HF_HUB_OFFLINE = "1"
  56. # Engram tables stay on disk (the baked engram.py patch); 32 parallel row
  57. # reads, 16 MB chunks (their launch defaults)
  58. DSV41_ENGRAM_DISK = "1"
  59. DSV41_ENGRAM_DISK_THREADS = "32"
  60. DSV41_ENGRAM_DISK_CHUNK = "16"
  61. # CUDA graphs: the Engram rows are staged in prepare_inputs (baked
  62. # model_state.py prestage patch) so the whole decode step is capturable
  63. VLLM_USE_BREAKABLE_CUDAGRAPH = "1"
  64. VLLM_HAS_FLASHINFER_CUBIN = "1"
  65. VLLM_USE_RUST_FRONTEND = "0"
  66. # runtime JIT wedge countermeasure (their boot-3 lesson): kernels are
  67. # prebuilt in the image, but any residual JIT must not OOM the box
  68. MAX_JOBS = "2"
  69. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  70. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  71. TORCH_CUDA_ARCH_LIST = "12.1a"
  72. FLASHINFER_CUDA_ARCH_LIST = "12.1a"
  73. OMP_NUM_THREADS = "2"
  74. # JIT caches persist per-node (self-namespace by engine version key; the
  75. # image prebakes the flashinfer 0.7.0rc1 SM120 kernels, first boots re-JIT
  76. # the rest)
  77. [[extra_mounts]]
  78. host = "~/sm121-cache/jit-121f/flashinfer"
  79. container = "/root/.cache/flashinfer"
  80. [[extra_mounts]]
  81. host = "~/sm121-cache/jit-121f/torchinductor"
  82. container = "/root/.cache/torchinductor"
  83. [[extra_mounts]]
  84. host = "~/sm121-cache/jit-121f/vllm"
  85. container = "/root/.cache/vllm"