recipe.toml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # DeepSeek-V4.1-Flash (552B MoE, MXFP4 experts) — 8x DGX Spark, in-memory Engram.
  2. #
  3. # P2.3 of the 2026-09-18 night: the first 8x trial. Operator's design: at 8x
  4. # the Engram table fits in DRAM (406 GB / 8 = 50.7 GB/node) — no disk mode,
  5. # no per-node sparse staging, no /engram-local mounts. The engram rows load
  6. # from the NAS checkpoint into DRAM once at boot (one-off NFS cost), decode
  7. # reads them from memory (no per-token disk reads).
  8. #
  9. # Memory math per node (121.6 GiB): weights 307.3 GB / 8 = 38.4 GB + engram
  10. # rows ~25.4 GB (the real table data is ~203 GB — the two 101.5 GB sparse
  11. # shards whose 4x /var/tmp copies of 48 GB real sum to 192 GB) + process
  12. # ~12 GB = ~76 GB.
  13. #
  14. # GMU: the lab DS4.1 policy says 0.91, but the GB10 admission check needs
  15. # free >= GMU x 121.63 and the baseline-reserved ~12.8 GiB leaves only
  16. # 108.8 GiB free at startup — 0.91 (110.7) fails the admission on GB10
  17. # (first 8x boot, 2026-09-18 16:02: "Free memory on device cuda:0
  18. # (108.78/121.63 GiB) ... less than desired GPU memory utilization"). 0.85
  19. # (103.4) is the GB10-qualified prod value and still leaves ~27.6 GiB of KV
  20. # per rank (103.4 - 38.4 - 25.4 - 12), ≈ 3M tokens ≈ 6x 512K.
  21. #
  22. # Image: dsv41-flash:local (the tonyd2wild prod chain — engram.py patch
  23. # baked in; DSV41_ENGRAM_DISK simply NOT set here = memory mode). The
  24. # launcher syncs the image to dgx6-8 at serve time (dgx1-5 have it).
  25. #
  26. # This is also the natural "Boot D" test the 4x r37 bisect could not run:
  27. # engram WITHOUT the disk-read path. If the text is clean here while the r37
  28. # 4x disk-mode run garbles, the bisect narrows to the lab tree's engram
  29. # disk-read path.
  30. engine = "vllm"
  31. name = "DeepSeek-V4.1-Flash MXFP4 (dsv41 img, 8x, DSpark k=5, Engram in DRAM)"
  32. docker_image = "dsv41-flash:local"
  33. docker_image_dir = "dsv41-flash"
  34. model = "deepseek-ai/DeepSeek-V4.1-Flash"
  35. required_nodes = 8
  36. tensor_parallel_size = 8
  37. pipeline_parallel_size = 1
  38. distributed_backend = "mp"
  39. shm_size = "32gb"
  40. # NO recipe entrypoint: the base image bakes ENTRYPOINT ["vllm","serve"]
  41. # (vllm/vllm-openai), so the launcher's CMD (model + flags) completes it.
  42. args = [
  43. # Stable gateway alias — clients/gateways keep the DeepSeek-V4-Flash
  44. # model name; no per-deployment config churn.
  45. "--served-model-name", "deepseek-v4-flash",
  46. "--trust-remote-code",
  47. "--distributed-executor-backend", "mp",
  48. "--gpu-memory-utilization", "0.85",
  49. "--max-model-len", "524288",
  50. "--max-num-seqs", "8",
  51. "--max-num-batched-tokens", "8192",
  52. # boot-4 fix: the V4 indexer backend refuses the smallest-listed block
  53. "--block-size", "128",
  54. # boot-10: exact capture sizes for DSpark k=5, SEQS=8 (multiples of 5
  55. # and 6 up to 48 — every decode batch gets an exact FULL graph, no padding)
  56. "--compilation-config", """
  57. '{"cudagraph_mode":"FULL_AND_PIECEWISE","cudagraph_capture_sizes":[5,6,10,12,15,18,20,24,25,30,35,36,40,42,48]}'""",
  58. "--speculative-config", """
  59. '{"method":"dspark","num_speculative_tokens":5,"draft_sample_method":"probabilistic","rejection_sample_method":"block","enable_adaptive_verification":false}'""",
  60. "--tool-call-parser", "deepseek_v41",
  61. "--enable-auto-tool-choice",
  62. "--reasoning-parser", "deepseek_v41",
  63. "--default-chat-template-kwargs", """
  64. '{"thinking": true, "reasoning_effort": "max"}'""",
  65. ]
  66. [env]
  67. HF_HUB_OFFLINE = "1"
  68. # Engram: MEMORY mode — DSV41_ENGRAM_DISK deliberately NOT set (the baked
  69. # engram.py patch defaults to "0" = in-DRAM table). At 8x the table fits:
  70. # 406 GB / 8 = 50.7 GB/node.
  71. # CUDA graphs: the Engram rows are staged in prepare_inputs (baked
  72. # model_state.py prestage patch) so the whole decode step is capturable
  73. VLLM_USE_BREAKABLE_CUDAGRAPH = "1"
  74. VLLM_HAS_FLASHINFER_CUBIN = "1"
  75. VLLM_USE_RUST_FRONTEND = "0"
  76. # runtime JIT wedge countermeasure (their boot-3 lesson): kernels are
  77. # prebuilt in the image, but any residual JIT must not OOM the box
  78. MAX_JOBS = "2"
  79. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  80. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  81. TORCH_CUDA_ARCH_LIST = "12.1a"
  82. FLASHINFER_CUDA_ARCH_LIST = "12.1a"
  83. OMP_NUM_THREADS = "2"
  84. # JIT caches persist per-node (self-namespace by engine version key; the
  85. # image prebakes the flashinfer 0.7.0rc1 SM120 kernels, first boots re-JIT
  86. # the rest)
  87. [[extra_mounts]]
  88. host = "~/sm121-cache/jit-121f/flashinfer"
  89. container = "/root/.cache/flashinfer"
  90. [[extra_mounts]]
  91. host = "~/sm121-cache/jit-121f/torchinductor"
  92. container = "/root/.cache/torchinductor"
  93. [[extra_mounts]]
  94. host = "~/sm121-cache/jit-121f/vllm"
  95. container = "/root/.cache/vllm"