recipe.toml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. # MiMo-V2.6-Flash-MOPD on 4x DGX Spark — the SparkRing *installer-image* lane.
  2. # Their published per-rank compose file (no installer) transcribed into an
  3. # sm121 recipe: image, entrypoint, flags and environment are the qualified
  4. # sparkring tp4 profile; wiring/cluster facts stay ours.
  5. #
  6. # Image (anonymous digests pull):
  7. # ghcr.io/fujitsupolycom/sparkring@sha256:71d41057…5620ad
  8. # line dev-20261004-kraken-cuda1342-nccl2323-status034 (karmic-kraken
  9. # base, the active lab GLM lineage) + the SparkRing fixes we do
  10. # NOT have in our nightly:
  11. # * B12X selection-cache correction (restarted ranks reuse tuning;
  12. # their record: DS4.1 restart 200-225s vs 652-741s),
  13. # * MiMo vision attention sinks (in-softmax sinks as trained — without
  14. # them a red/blue test image reads black/white),
  15. # * Host-to-device staging fix (CpuGpuBuffer pinned-copy race: Qwen+MTP
  16. # +FULL graphs decoded token 8191 repetitions),
  17. # * tool-result contract (HTTP 400/500 instead of 200-without-tool-call),
  18. # * runtime-status dashboard at /v1/sparkring/status/view on the API port,
  19. # * CUDA 13.4.2 + NCCL 2.32.3 toolchain (their loader search tree).
  20. #
  21. # Checkpoint: their pin 2479e2d0029e = HF main = our NAS snapshot (verified
  22. # against the profile's config/index sha256) — model points at the pinned
  23. # container-side snapshot path (flat layout incl. the dflash/ draft inside).
  24. # No installer, no local materialization: /models/target comes from the HF
  25. # cache mount.
  26. #
  27. # Deviations from their compose (switched fabric / cluster conventions):
  28. # * RING-ONLY KEYS DROPPED: NCCL_SWITCHLESS_RING_ONLY, B12X_ROCE_OPPOSITE_
  29. # PATHS, B12X_ROCE_PEER_HCA_MAP — direct-cycle wiring assumptions (p0→p1
  30. # cabling), invalid on our 4nodes-switch fabric.
  31. # * 4-port HCA list → the cluster NCCL block's 2 ports: on the switch only
  32. # f0 pairs are ACTIVE (f1 DOWN on every dgx58 node).
  33. # * eth0 socket vars dropped — the cluster nccl block carries the correct
  34. # enp1s0f0np0 socket/GLOO ifaces.
  35. # * mem_limit/memswap omitted (GB10 UMA: our lanes run unbounded; a 108G
  36. # cgroup cap can OOM-kill mid-serve).
  37. # * port 30000 (cluster convention; their compose serves 8020).
  38. # * max-model-len 524288 (prod parity with the sglang lane; their profile
  39. # qualifies 262144), KV pin omitted (GB10 auto-sizing keeps ~54 GiB).
  40. # * RPC: --async-scheduling omitted — NOT in their qualified shape.
  41. # Re-add only as a measured A/B.
  42. # * --mm-encoder-tp-mode data (theirs; our nightly lane ran weights).
  43. engine = "vllm"
  44. name = "MiMo-V2.6-Flash-MOPD (SparkRing installer image, 4x switched)"
  45. docker_image = "ghcr.io/fujitsupolycom/sparkring@sha256:71d410571407fef3ce2959c6d392f5a2c3f44b757b856e853a71f6e3295620ad"
  46. entrypoint = ["python3", "/opt/sparkring/toolchain/toolchain.py", "serve"]
  47. # Floating model: the engine resolves the org/model id via the NAS HF cache
  48. # (refs/main -> latest snapshot; the flat snapshot dir carries dflash/ for the
  49. # draft loader). Their pin 2479e2d0 (profile config/index sha256 match) is
  50. # what refs/main points at on 2026-10-02 — informational only.
  51. model = "XiaomiMiMo/MiMo-V2.6-Flash-MOPD"
  52. parent_model = "XiaomiMiMo/MiMo-V2.6-Flash-MOPD"
  53. port = 30000
  54. required_nodes = 4
  55. tensor_parallel_size = 4
  56. pipeline_parallel_size = 1
  57. distributed_backend = "mp"
  58. shm_size = "32gb"
  59. devices = ["/dev/infiniband"]
  60. args = [
  61. "--served-model-name", "mimo-v2.6-flash",
  62. "--trust-remote-code",
  63. "--distributed-executor-backend", "mp",
  64. "--gpu-memory-utilization", "0.85",
  65. "--block-size", "128",
  66. # EXPERIMENT 2026-09-29 (operator): A/B their qualified 262144 vs our
  67. # 524288 on the c2 long-context collapse — RESULT: NEGATIVE, collapse
  68. # is bit-identical at both (c2: 13.8 t/s @65K, 5.6 @131K; c1 healthy
  69. # 42-48 everywhere) → MML not the axis; back to 524288 for prod parity.
  70. # Pool stayed auto throughout (KV usage during the stall: 0.7% — memory
  71. # excluded, as the operator predicted).
  72. "--max-model-len", "524288",
  73. "--max-num-seqs", "16",
  74. "--max-num-batched-tokens", "8192",
  75. "--model-loader-extra-config", """
  76. '{"read_mode":"bounce","io_threads":8}'""",
  77. "--enable-chunked-prefill",
  78. "--enable-prefix-caching",
  79. "--attention-backend", "B12X",
  80. "--linear-backend", "b12x",
  81. "--moe-backend", "b12x",
  82. "--no-enable-flashinfer-autotune",
  83. "--load-format", "b12x",
  84. "--kv-cache-dtype", "bfloat16",
  85. # NOTE: our nightly's `--kernel-config {enable_flashinfer_autotune:false}`
  86. # is mutually exclusive with their `--no-enable-flashinfer-autotune`
  87. # (ValueError at engine build) — their qualified shape wins, kernel-config
  88. # is dropped for this lane.
  89. # Their qualified multimodal shape: full Omni + data-parallel encoder
  90. # (this fork auto-falls back to weights for MiMo: "model does not support
  91. # --mm-encoder-tp-mode data"), per-prompt media limits, video kwargs,
  92. # pinned processor config.
  93. # Their qualified multimodal shape: full Omni + data-parallel encoder,
  94. # per-prompt media limits, video kwargs, pinned processor config.
  95. "--decode-context-parallel-size", "1",
  96. "--enable-prompt-tokens-details",
  97. "--limit-mm-per-prompt", """
  98. '{"image":3,"video":1,"audio":1}'""",
  99. "--mm-processor-cache-gb", "0",
  100. "--mm-encoder-tp-mode", "data",
  101. "--media-io-kwargs", """
  102. '{"video":{"num_frames":8}}'""",
  103. "--hf-overrides", """
  104. '{"architectures":["MiMoV2OmniForCausalLM"],"processor_config":{"audio_avg_pooler":2,"audio_channels":20,"audio_end_token_id":151674,"audio_fmax":null,"audio_fmin":0,"audio_group_size":4,"audio_hop_length":240,"audio_input_id_per_second":25.0,"audio_kernel_size":3,"audio_n_mels":128,"audio_nfft":960,"audio_sampling_rate":24000,"audio_segment_size":6000,"audio_start_token_id":151673,"audio_stride_size":2,"audio_token_id":151669,"audio_window_size":960,"audio_zeroemb_idx":[1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024],"fps":1.0,"image_max_pixels":1048576,"image_min_pixels":8192,"image_token_id":151655,"max_frames":8,"merge_size":2,"min_frames":null,"num_frames":null,"pad_token_id":151643,"patch_size":16,"rope_type":"rope","temporal_compression_ratio":1,"temporal_patch_size":2,"use_per_grid_t_timestamps":false,"use_video_timestamps":true,"video_audio_interleave_length":0.0,"video_end_token_id":151671,"video_max_pixels":262144,"video_min_pixels":8192,"video_process_num_threads":16,"video_start_token_id":151670,"video_token_id":151656,"video_tokens_per_second":2,"video_total_max_pixels":268435456,"vision_end_token_id":151653,"vision_start_token_id":151652}}'""",
  105. # Draft: dflash/ inside the pinned snapshot (their /models/target/dflash).
  106. "--speculative-config", """
  107. '{"model":"{{dflash}}","method":"dflash","num_speculative_tokens":5,"draft_tensor_parallel_size":4,"kv_cache_dtype":"bfloat16","attention_backend":"B12X","draft_load_config":{"load_format":"safetensors","model_loader_extra_config":{}}}'""",
  108. "--compilation-config", """
  109. '{"pass_config":{"fuse_act_quant":true},"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":96,"cudagraph_capture_sizes":[1,2,4,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,96]}'""",
  110. "--reasoning-parser", "mimo",
  111. "--tool-call-parser", "mimo",
  112. "--enable-auto-tool-choice",
  113. "--generation-config", "vllm",
  114. ]
  115. # DFlash drafter: the dflash/ subfolder of the main model repo, resolved per
  116. # node via refs/main (floats with the model); substituted into the
  117. # speculative-config as {{dflash}}. No bind-mount — the HF cache is already
  118. # mounted at /root/.cache/huggingface.
  119. [[extra_mounts]]
  120. repo = "XiaomiMiMo/MiMo-V2.6-Flash-MOPD"
  121. subfolder = "dflash"
  122. container = "dflash"
  123. # One cache root for their /cache layout (eight *_CACHE_DIR keys below point
  124. # here; first boot warms JIT into it, the B12X selection-cache fix persists
  125. # across restarts — the single-mount story our nightly lane never had).
  126. [[extra_mounts]]
  127. host = "~/sm121-cache/sparkring-121f"
  128. container = "/cache"
  129. [env]
  130. # --- SparkRing compose environment, verbatim except the noted drops ------
  131. HF_HUB_OFFLINE = "1"
  132. TRANSFORMERS_OFFLINE = "1"
  133. VLLM_WORKER_MULTIPROC_METHOD = "spawn"
  134. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  135. OMP_NUM_THREADS = "16"
  136. MAX_JOBS = "16"
  137. VLLM_ENABLE_PCIE_ALLREDUCE = "0"
  138. VLLM_ENABLE_ROCE_ALLREDUCE = "1"
  139. VLLM_ROCE_ALLREDUCE_MAX_SIZE = "2097152"
  140. VLLM_ROCE_ALLGATHER_MAX_SIZE = "16777216"
  141. SPARKCACHE_ENABLED = "0"
  142. SOURCE_IMAGE_PROFILE = ""
  143. B12X_POLICY_MODE = "auto"
  144. NCCL_NET = "IB"
  145. NCCL_NET_PLUGIN = "none"
  146. NCCL_IB_DISABLE = "0"
  147. NCCL_IB_EXTENDED_IPV4_GIDS = "1"
  148. NCCL_IB_MERGE_NICS = "0"
  149. NCCL_IB_PRESERVE_PCI_DOMAIN = "1"
  150. NCCL_IB_ROUTE_DIAGNOSTICS = "1"
  151. NCCL_IB_SUBNET_AWARE_ROUTING = "1"
  152. NCCL_IGNORE_CPU_AFFINITY = "1"
  153. NCCL_CROSS_NIC = "1"
  154. NCCL_ALGO = "Ring"
  155. NCCL_CUMEM_ENABLE = "0"
  156. NCCL_DEBUG = "WARN"
  157. NCCL_DEBUG_SUBSYS = "NET,INIT,GRAPH"
  158. NCCL_MAX_NCHANNELS = "4"
  159. NCCL_MIN_NCHANNELS = "4"
  160. NCCL_P2P_LEVEL = "SYS"
  161. NCCL_PROTO = "LL,LL128,Simple"
  162. NCCL_IB_GID_INDEX = "3"
  163. # Their bundled NCCL 2.32.3 (loader search tree inside the image).
  164. NCCL_ROOT = "/opt/sparkring/toolchain/nccl"
  165. NCCL_LIB_DIR = "/opt/sparkring/toolchain/nccl/lib"
  166. NCCL_INCLUDE_DIR = "/opt/sparkring/toolchain/nccl/include"
  167. NCCL_LOCAL_INFERENCE_PATH = "/opt/sparkring/toolchain/nccl/lib/libnccl.so.2"
  168. VLLM_NCCL_SO_PATH = "/opt/sparkring/toolchain/nccl/lib/libnccl.so.2"
  169. VLLM_NCCL_INCLUDE_PATH = "/opt/sparkring/toolchain/nccl/include"
  170. CUDA_HOME = "/usr/local/cuda-13.4"
  171. CUDA_PATH = "/usr/local/cuda-13.4"
  172. CUDA_VERSION = "13.4.2"
  173. VLLM_USE_V2_MODEL_RUNNER = "1"
  174. VLLM_MXFP8_LM_HEAD = "0"
  175. VLLM_LM_HEAD_A16 = "1"
  176. VLLM_B12X_MOE_FP4_FORCE_A16 = "0"
  177. VLLM_KV_CACHE_LAYOUT = "BLHNC"
  178. VLLM_PLUGINS = "b12x_loader,sparkring_status"
  179. # DIAGNOSIS CLOSED 2026-09-29: the c2 depth "collapse" was the bench's
  180. # own default (llama-benchy without --enable-prefix-caching serializes
  181. # cold 67K prefills per pair — artifact, not engine). DEBUG removed.
  182. B12X_ROCE_GID_INDEX = "3"
  183. SPARKRING_FEATURES = ""
  184. SPARKRING_TOOL_CHOICE_CONTRACT = "1"
  185. SIRCL_ENABLED = "0"
  186. VLLM_SPARK_TP4_MODE = ""
  187. VLLM_SPARK_TP4_VOCAB_MODE = ""
  188. # --- caches under /cache (compose names, verbatim) -----------------------
  189. XDG_CACHE_HOME = "/cache/mimo-v26-flash-rl-4b7049d1e00f-2479e2d0029e"
  190. VLLM_CACHE_ROOT = "/cache/mimo-v26-flash-rl-4b7049d1e00f-2479e2d0029e/vllm"
  191. TORCHINDUCTOR_CACHE_DIR = "/cache/mimo-v26-flash-rl-4b7049d1e00f-2479e2d0029e/inductor"
  192. TRITON_CACHE_DIR = "/cache/mimo-v26-flash-rl-4b7049d1e00f-2479e2d0029e/triton"
  193. CUTE_DSL_CACHE_DIR = "/cache/mimo-v26-flash-rl-4b7049d1e00f-2479e2d0029e/cute"
  194. TILELANG_CACHE_DIR = "/cache/mimo-v26-flash-rl-4b7049d1e00f-2479e2d0029e/tilelang"
  195. TVM_FFI_CACHE_DIR = "/cache/mimo-v26-flash-rl-4b7049d1e00f-2479e2d0029e/tvm-ffi"
  196. FLASHINFER_WORKSPACE_BASE = "/cache/mimo-v26-flash-rl-4b7049d1e00f-2479e2d0029e/flashinfer"
  197. B12X_COMPILE_CACHE_DIR = "/cache/mimo-v26-flash-rl-cuda13.4.2-2479e2d0029e/b12x"
  198. # --- launcher-controlled bits -------------------------------------------
  199. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  200. VLLM_NO_USAGE_STATS = "1"
  201. # DROPPED on purpose (see header): NCCL_SWITCHLESS_RING_ONLY,
  202. # B12X_ROCE_OPPOSITE_PATHS, B12X_ROCE_PEER_HCA_MAP, B12X_ROCE_HCA,
  203. # NCCL_IB_HCA (cluster block: f0 pair), NCCL_SOCKET_IFNAME/GLOO (cluster
  204. # block: enp1s0f0np0), SPARKRING_TRANSPORT_* (ring pacing), mem_limit.