recipe.toml 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 50.7 GB + process ~12 GB = ~101 GB. GMU 0.91 (the lab DS4.1 policy,
  11. # lil-catalog 09-15) leaves a ~9.5 GiB KV pool ≈ 1M tokens = ~1.9x 512K.
  12. #
  13. # Image: dsv41-flash:local (the tonyd2wild prod chain — engram.py patch
  14. # baked in; DSV41_ENGRAM_DISK simply NOT set here = memory mode). The
  15. # launcher syncs the image to dgx6-8 at serve time (dgx1-5 have it).
  16. #
  17. # This is also the natural "Boot D" test the 4x r37 bisect could not run:
  18. # engram WITHOUT the disk-read path. If the text is clean here while the r37
  19. # 4x disk-mode run garbles, the bisect narrows to the lab tree's engram
  20. # disk-read path.
  21. engine = "vllm"
  22. name = "DeepSeek-V4.1-Flash MXFP4 (dsv41 img, 8x, DSpark k=5, Engram in DRAM)"
  23. docker_image = "dsv41-flash:local"
  24. docker_image_dir = "dsv41-flash"
  25. model = "deepseek-ai/DeepSeek-V4.1-Flash"
  26. required_nodes = 8
  27. tensor_parallel_size = 8
  28. pipeline_parallel_size = 1
  29. distributed_backend = "mp"
  30. shm_size = "32gb"
  31. # NO recipe entrypoint: the base image bakes ENTRYPOINT ["vllm","serve"]
  32. # (vllm/vllm-openai), so the launcher's CMD (model + flags) completes it.
  33. args = [
  34. # Stable gateway alias — clients/gateways keep the DeepSeek-V4-Flash
  35. # model name; no per-deployment config churn.
  36. "--served-model-name", "deepseek-v4-flash",
  37. "--trust-remote-code",
  38. "--distributed-executor-backend", "mp",
  39. "--gpu-memory-utilization", "0.91",
  40. "--max-model-len", "524288",
  41. "--max-num-seqs", "8",
  42. "--max-num-batched-tokens", "8192",
  43. # boot-4 fix: the V4 indexer backend refuses the smallest-listed block
  44. "--block-size", "128",
  45. # boot-10: exact capture sizes for DSpark k=5, SEQS=8 (multiples of 5
  46. # and 6 up to 48 — every decode batch gets an exact FULL graph, no padding)
  47. "--compilation-config", """
  48. '{"cudagraph_mode":"FULL_AND_PIECEWISE","cudagraph_capture_sizes":[5,6,10,12,15,18,20,24,25,30,35,36,40,42,48]}'""",
  49. "--speculative-config", """
  50. '{"method":"dspark","num_speculative_tokens":5,"draft_sample_method":"probabilistic","rejection_sample_method":"block","enable_adaptive_verification":false}'""",
  51. "--tool-call-parser", "deepseek_v41",
  52. "--enable-auto-tool-choice",
  53. "--reasoning-parser", "deepseek_v41",
  54. "--default-chat-template-kwargs", """
  55. '{"thinking": true, "reasoning_effort": "max"}'""",
  56. ]
  57. [env]
  58. HF_HUB_OFFLINE = "1"
  59. # Engram: MEMORY mode — DSV41_ENGRAM_DISK deliberately NOT set (the baked
  60. # engram.py patch defaults to "0" = in-DRAM table). At 8x the table fits:
  61. # 406 GB / 8 = 50.7 GB/node.
  62. # CUDA graphs: the Engram rows are staged in prepare_inputs (baked
  63. # model_state.py prestage patch) so the whole decode step is capturable
  64. VLLM_USE_BREAKABLE_CUDAGRAPH = "1"
  65. VLLM_HAS_FLASHINFER_CUBIN = "1"
  66. VLLM_USE_RUST_FRONTEND = "0"
  67. # runtime JIT wedge countermeasure (their boot-3 lesson): kernels are
  68. # prebuilt in the image, but any residual JIT must not OOM the box
  69. MAX_JOBS = "2"
  70. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  71. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  72. TORCH_CUDA_ARCH_LIST = "12.1a"
  73. FLASHINFER_CUDA_ARCH_LIST = "12.1a"
  74. OMP_NUM_THREADS = "2"
  75. # JIT caches persist per-node (self-namespace by engine version key; the
  76. # image prebakes the flashinfer 0.7.0rc1 SM120 kernels, first boots re-JIT
  77. # the rest)
  78. [[extra_mounts]]
  79. host = "~/sm121-cache/jit-121f/flashinfer"
  80. container = "/root/.cache/flashinfer"
  81. [[extra_mounts]]
  82. host = "~/sm121-cache/jit-121f/torchinductor"
  83. container = "/root/.cache/torchinductor"
  84. [[extra_mounts]]
  85. host = "~/sm121-cache/jit-121f/vllm"
  86. container = "/root/.cache/vllm"