recipe.toml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. # DeepSeek-V4.1-Flash — eugr b12x nightly-20260913 (lab `dev/infernal-invocation`), 4x.
  2. #
  3. # P1.2 of the 2026-09-18 night: the r37 typo A/B. r37 (09-13, vllmc687594b8a8)
  4. # garbled DS4.1 text in the morning bisect (A/B/C: flags excluded; D infeasible
  5. # — engram-off 4x OOMs, the table is part of the weights and only fits in DRAM
  6. # at 8x). This runs the lab's NEWER published b12x build (09-13 DockerHub, cut
  7. # from dev/infernal-invocation — newer than r37's 3fb88fdf tree) with the SAME
  8. # measured r37 contract (GMU 0.88, 512K, DCP1, block 256, B12X attn/linear/moe,
  9. # K7 greedy/adaptive, engram disk, instanttensor/lazy). Garbled -> the r37
  10. # garbling is a lab-tree trait (not our build); clean -> r37-specific
  11. # regression (file the exact bisect with the lab).
  12. #
  13. # Image already pulled on dgx1-4 (24.5 GB). Same model/weights/engram staging
  14. # as the r37 recipe (NAS snapshot + per-node /var/tmp/engram-local hardlinks).
  15. engine = "vllm"
  16. name = "DeepSeek-V4.1-Flash (eugr b12x 0913 = lab dev/infernal-invocation, 4x DCP1, DSpark K7)"
  17. docker_image = "eugr/spark-vllm-b12x:nightly-20260913" # prebuilt (no docker_image_dir)
  18. model = "deepseek-ai/DeepSeek-V4.1-Flash"
  19. parent_model = "deepseek-ai/DeepSeek-V4.1-Flash"
  20. required_nodes = 4
  21. tensor_parallel_size = 4
  22. pipeline_parallel_size = 1
  23. distributed_backend = "mp"
  24. shm_size = "32gb"
  25. # Our r27 build dir images ship with ENTRYPOINT [] — set it explicitly.
  26. entrypoint = ["vllm", "serve"]
  27. args = [
  28. "--served-model-name", "dsv41",
  29. "--trust-remote-code",
  30. "--distributed-executor-backend", "mp",
  31. # GB10 startup-gate value (see header); KV pool is engine-computed from
  32. # the remainder (no pin — their profile pins nothing either).
  33. "--gpu-memory-utilization", "0.88",
  34. # 512K context (our floor — their qualified 131K is not usable for us;
  35. # the KV pool is engine-computed from the memory budget, unchanged):
  36. "--max-model-len", "524288",
  37. "--decode-context-parallel-size", "1",
  38. "--max-num-seqs", "4",
  39. "--max-num-batched-tokens", "4096",
  40. "--prefill-compute-share", "0.4",
  41. "--block-size", "256",
  42. "--enable-chunked-prefill",
  43. "--enable-prefix-caching",
  44. "--kv-cache-dtype", "fp8",
  45. "--attention-backend", "B12X",
  46. "--linear-backend", "b12x",
  47. "--moe-backend", "b12x",
  48. "--compilation-config", """
  49. '{"cudagraph_mode":"FULL_AND_PIECEWISE"}'""",
  50. "--max_cudagraph_capture_size", "128",
  51. # Native DSpark K7 — the draft weights live inside the target checkpoint
  52. # (no separate draft repo). Greedy draft, standard rejection, adaptive
  53. # verification (the lab's r36 qualified trio vs our prod's K5
  54. # probabilistic/block).
  55. "--speculative-config", """
  56. '{"method":"dspark","num_speculative_tokens":7,"draft_tensor_parallel_size":4,"attention_backend":"B12X","draft_sample_method":"greedy","rejection_sample_method":"standard","enable_adaptive_verification":true}'""",
  57. # Engram: the model's 196B learned ngram lookup storage. disk mode =
  58. # io_uring reads of the table rows from the checkpoint dir (bounded
  59. # staging; NOT pinned RAM). cpu_offload stays false (no generic CPU
  60. # model offload).
  61. "--engram-config", """
  62. '{"cpu_offload":false,"table_memory":"disk"}'""",
  63. "--load-format", "instanttensor",
  64. "--safetensors-load-strategy", "lazy",
  65. "--generation-config", "vllm",
  66. "--override-generation-config", """
  67. '{"temperature":1.0,"top_p":0.95}'""",
  68. "--limit-mm-per-prompt", """
  69. '{"image":2}'""",
  70. "--reasoning-parser", "deepseek_v41",
  71. "--tool-call-parser", "deepseek_v41",
  72. "--enable-auto-tool-choice",
  73. "--jit-monitor-mode", "error",
  74. ]
  75. [env]
  76. # Their serve-ds41-jovian.sh runtime env (multi-node-adapted; the launcher
  77. # injects NCCL_SOCKET_IFNAME/IB_HCA/GID + VLLM_HOST_IP per node).
  78. # 2026-09-14 (night shift, operator's typo report): the lab tree's runtime
  79. # LM-head quantization (vocab_parallel_embedding.py) quantizes an unquantized
  80. # LM head to MXFP8 BY DEFAULT (envs.py: VLLM_MXFP8_LM_HEAD, default "1").
  81. # The eugr 2026-09-10 nightly (our prod image) has NO such feature and keeps
  82. # the BF16 head - the coarsened 8-bit vocab-logit layer is the suspected cause
  83. # of the typo-rate regression (close-token logits distorted). Opting out.
  84. VLLM_MXFP8_LM_HEAD = "0"
  85. NCCL_NCHANNELS = "16"
  86. NCCL_MIN_NCHANNELS = "16"
  87. NCCL_MAX_NCHANNELS = "16"
  88. NCCL_BUFFSIZE = "2097152"
  89. OMP_NUM_THREADS = "8"
  90. CUDA_DEVICE_MAX_CONNECTIONS = "32"
  91. # GB10 arch (theirs sm_120a on RTX PRO 6000):
  92. CUTE_DSL_ARCH = "sm_121a"
  93. TORCH_CUDA_ARCH_LIST = "12.1a"
  94. # Their V2 model-runner + AOT compile pipeline (baked in their image env):
  95. VLLM_USE_V2_MODEL_RUNNER = "1"
  96. VLLM_USE_AOT_COMPILE = "1"
  97. VLLM_USE_STANDALONE_COMPILE = "1"
  98. VLLM_USE_MEGA_AOT_ARTIFACT = "1"
  99. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  100. VLLM_USE_FLASHINFER_SAMPLER = "1"
  101. VLLM_WORKER_MULTIPROC_METHOD = "spawn"
  102. VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS = "900"
  103. HF_HUB_OFFLINE = "1"
  104. # Deliberately NOT set: VLLM_ENABLE_PCIE_ALLREDUCE (single-host PCIe in
  105. # their profile; cross-node on the switch fabric uses the launcher's NCCL),
  106. # VLLM_HOST_IP (launcher per-node), NCCL_SOCKET_IFNAME (launcher per cluster).
  107. # --- Engram from node-local NVMe, the rest from the shared NAS ---
  108. # [composed_model] (standard launcher feature) builds a per-node /tmp dir:
  109. # the whole DSV4.1 snapshot symlinked into the HF cache + the two 101.5 GB
  110. # Engram table shards (model-00047/00048) HARDLINKED from the pre-existing
  111. # per-rank sparse copies in /var/tmp/engram-local (48 GB real per node, built
  112. # for the eugr/aiden lanes — offset-preserving full-size files, only this
  113. # rank's rows materialized; hardlink = zero extra disk, same fs as /tmp).
  114. # The r36 io_uring PLE reader then reads this rank's table rows from local
  115. # NVMe (no NFS); weights stream from the NAS at load time (one-shot, same as
  116. # prod). Local files run after the repo symlinks and win at the same name.
  117. [composed_model]
  118. mount = "/model"
  119. [[composed_model.sources]]
  120. repo = "deepseek-ai/DeepSeek-V4.1-Flash" # whole snapshot, symlinked into the HF cache
  121. [[composed_model.local_files]] # hardlinks win over the symlinks above
  122. host = "/var/tmp/engram-local/DeepSeek-V4.1-Flash/model-00047-of-00048.safetensors"
  123. [[composed_model.local_files]]
  124. host = "/var/tmp/engram-local/DeepSeek-V4.1-Flash/model-00048-of-00048.safetensors"