recipe.toml 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. # MiMo-V2.6-Pro-MOPD on 8x DGX Spark — SparkRing runtime stack applied to the
  2. # Pro model (operator 2026-09-29: MOPD only, RL lanes retired — RL keeps
  3. # training artifacts). There is NO upstream SparkRing profile for Pro, so this
  4. # adapts our qualified tp4 contract: tp/nnodes/draft-tp = 8, per-model cache
  5. # namespace. Served name stays the simple lane name `mimo-v2.6-pro`
  6. # (operator 2026-09-29: no foreign TP/variant clutter in served names).
  7. #
  8. # Verified 2026-09-29:
  9. # * snapshot XiaomiMiMo/MiMo-V2.6-Pro-MOPD @ adea8e2c5373, 573.5 GB (NAS);
  10. # * config arch `MiMoV2ForCausalLM` (same as Flash → their qualified
  11. # Omni hf-overrides apply) and `processor_config` byte-equal to Flash's;
  12. # * dflash/ draft present (dflash_draft_model.safetensors + dflash.py);
  13. # * quant fp8 e4m3 + mxfp4_block_size → b12x MXFP4/MXFP8 backend, same env.
  14. #
  15. # Intended cluster: `8nodes-switch` (all 8; fleet coordination — prod must be
  16. # down first; sparkring image sits only on dgx5-8 → `--sync-image` ships it).
  17. # KV at TP8: weights ≈ 72 GiB/rank → auto pool ≈ 20-25 GiB ≈ 1M-1.2M tokens.
  18. # Details: specs/tech-architecture/sparkring-mimo-lanes.md
  19. engine = "vllm"
  20. name = "MiMo-V2.6-Pro-MOPD (SparkRing installer image, 8x switched)"
  21. docker_image = "ghcr.io/fujitsupolycom/sparkring@sha256:71d410571407fef3ce2959c6d392f5a2c3f44b757b856e853a71f6e3295620ad"
  22. entrypoint = ["python3", "/opt/sparkring/toolchain/toolchain.py", "serve"]
  23. # Floating model: the engine resolves the org/model id via the NAS HF cache
  24. # (refs/main -> latest snapshot; the snapshot carries dflash/ for the draft
  25. # loader). Our vendored NAS revision adea8e2c (no upstream Pro profile to
  26. # cross-check) is what refs/main points at on 2026-10-02 — informational only.
  27. model = "XiaomiMiMo/MiMo-V2.6-Pro-MOPD"
  28. parent_model = "XiaomiMiMo/MiMo-V2.6-Pro-MOPD"
  29. port = 30000
  30. required_nodes = 8
  31. tensor_parallel_size = 8
  32. pipeline_parallel_size = 1
  33. distributed_backend = "mp"
  34. shm_size = "32gb"
  35. devices = ["/dev/infiniband"]
  36. args = [
  37. "--served-model-name", "mimo-v2.6-pro",
  38. "--trust-remote-code",
  39. "--distributed-executor-backend", "mp",
  40. "--gpu-memory-utilization", "0.85",
  41. "--block-size", "128",
  42. # 524288 prod parity. (2026-09-29: the c2 "collapse" A/B at their 262144
  43. # was bit-identical — it later proved to be a BENCH artifact, not engine;
  44. # see specs/tech-architecture/sparkring-mimo-lanes.md.)
  45. "--max-model-len", "524288",
  46. "--max-num-seqs", "16",
  47. "--max-num-batched-tokens", "8192",
  48. "--model-loader-extra-config", """
  49. '{"read_mode":"bounce","io_threads":8}'""",
  50. "--enable-chunked-prefill",
  51. "--enable-prefix-caching",
  52. "--attention-backend", "B12X",
  53. "--linear-backend", "b12x",
  54. "--moe-backend", "b12x",
  55. "--no-enable-flashinfer-autotune",
  56. "--load-format", "b12x",
  57. "--kv-cache-dtype", "bfloat16",
  58. # NOTE: our nightly's `--kernel-config {enable_flashinfer_autotune:false}`
  59. # is mutually exclusive with their `--no-enable-flashinfer-autotune`
  60. # (ValueError at engine build) — their qualified shape wins, kernel-config
  61. # is dropped for this lane.
  62. # Their qualified multimodal shape: full Omni + data-parallel encoder
  63. # (this fork auto-falls back to weights for MiMo: "model does not support
  64. # --mm-encoder-tp-mode data"), per-prompt media limits, video kwargs,
  65. # pinned processor config.
  66. # Their qualified multimodal shape: full Omni + data-parallel encoder,
  67. # per-prompt media limits, video kwargs, pinned processor config.
  68. "--decode-context-parallel-size", "1",
  69. "--enable-prompt-tokens-details",
  70. "--limit-mm-per-prompt", """
  71. '{"image":3,"video":1,"audio":1}'""",
  72. "--mm-processor-cache-gb", "0",
  73. "--mm-encoder-tp-mode", "data",
  74. "--media-io-kwargs", """
  75. '{"video":{"num_frames":8}}'""",
  76. "--hf-overrides", """
  77. '{"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}}'""",
  78. # Draft: dflash/ inside the pinned snapshot (their /models/target/dflash).
  79. "--speculative-config", """
  80. '{"model":"{{dflash}}","method":"dflash","num_speculative_tokens":5,"draft_tensor_parallel_size":8,"kv_cache_dtype":"bfloat16","attention_backend":"B12X","draft_load_config":{"load_format":"safetensors","model_loader_extra_config":{}}}'""",
  81. "--compilation-config", """
  82. '{"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]}'""",
  83. "--reasoning-parser", "mimo",
  84. "--tool-call-parser", "mimo",
  85. "--enable-auto-tool-choice",
  86. "--generation-config", "vllm",
  87. ]
  88. # DFlash drafter: the dflash/ subfolder of the main model repo, resolved per
  89. # node via refs/main (floats with the model); substituted into the
  90. # speculative-config as {{dflash}}. No bind-mount — the HF cache is already
  91. # mounted at /root/.cache/huggingface.
  92. [[extra_mounts]]
  93. repo = "XiaomiMiMo/MiMo-V2.6-Pro-MOPD"
  94. subfolder = "dflash"
  95. container = "dflash"
  96. # One cache root for their /cache layout (eight *_CACHE_DIR keys below point
  97. # here; first boot warms JIT into it, the B12X selection-cache fix persists
  98. # across restarts — the single-mount story our nightly lane never had).
  99. [[extra_mounts]]
  100. host = "~/sm121-cache/sparkring-pro-8x"
  101. container = "/cache"
  102. [env]
  103. # --- SparkRing compose environment, verbatim except the noted drops ------
  104. HF_HUB_OFFLINE = "1"
  105. TRANSFORMERS_OFFLINE = "1"
  106. VLLM_WORKER_MULTIPROC_METHOD = "spawn"
  107. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  108. OMP_NUM_THREADS = "16"
  109. MAX_JOBS = "16"
  110. VLLM_ENABLE_PCIE_ALLREDUCE = "0"
  111. VLLM_ENABLE_ROCE_ALLREDUCE = "1"
  112. VLLM_ROCE_ALLREDUCE_MAX_SIZE = "2097152"
  113. VLLM_ROCE_ALLGATHER_MAX_SIZE = "16777216"
  114. SPARKCACHE_ENABLED = "0"
  115. SOURCE_IMAGE_PROFILE = ""
  116. B12X_POLICY_MODE = "auto"
  117. NCCL_NET = "IB"
  118. NCCL_NET_PLUGIN = "none"
  119. NCCL_IB_DISABLE = "0"
  120. NCCL_IB_EXTENDED_IPV4_GIDS = "1"
  121. NCCL_IB_MERGE_NICS = "0"
  122. NCCL_IB_PRESERVE_PCI_DOMAIN = "1"
  123. NCCL_IB_ROUTE_DIAGNOSTICS = "1"
  124. NCCL_IB_SUBNET_AWARE_ROUTING = "1"
  125. NCCL_IGNORE_CPU_AFFINITY = "1"
  126. NCCL_CROSS_NIC = "1"
  127. NCCL_ALGO = "Ring"
  128. NCCL_CUMEM_ENABLE = "0"
  129. NCCL_DEBUG = "WARN"
  130. NCCL_DEBUG_SUBSYS = "NET,INIT,GRAPH"
  131. NCCL_MAX_NCHANNELS = "4"
  132. NCCL_MIN_NCHANNELS = "4"
  133. NCCL_P2P_LEVEL = "SYS"
  134. NCCL_PROTO = "LL,LL128,Simple"
  135. NCCL_IB_GID_INDEX = "3"
  136. # Their bundled NCCL 2.32.3 (loader search tree inside the image).
  137. NCCL_ROOT = "/opt/sparkring/toolchain/nccl"
  138. NCCL_LIB_DIR = "/opt/sparkring/toolchain/nccl/lib"
  139. NCCL_INCLUDE_DIR = "/opt/sparkring/toolchain/nccl/include"
  140. NCCL_LOCAL_INFERENCE_PATH = "/opt/sparkring/toolchain/nccl/lib/libnccl.so.2"
  141. VLLM_NCCL_SO_PATH = "/opt/sparkring/toolchain/nccl/lib/libnccl.so.2"
  142. VLLM_NCCL_INCLUDE_PATH = "/opt/sparkring/toolchain/nccl/include"
  143. CUDA_HOME = "/usr/local/cuda-13.4"
  144. CUDA_PATH = "/usr/local/cuda-13.4"
  145. CUDA_VERSION = "13.4.2"
  146. VLLM_USE_V2_MODEL_RUNNER = "1"
  147. VLLM_MXFP8_LM_HEAD = "0"
  148. VLLM_LM_HEAD_A16 = "1"
  149. VLLM_B12X_MOE_FP4_FORCE_A16 = "0"
  150. VLLM_KV_CACHE_LAYOUT = "BLHNC"
  151. VLLM_PLUGINS = "b12x_loader,sparkring_status"
  152. # DIAGNOSIS CLOSED 2026-09-29: the c2 depth "collapse" was the bench's
  153. # own default (llama-benchy without --enable-prefix-caching serializes
  154. # cold 67K prefills per pair — artifact, not engine). DEBUG removed.
  155. B12X_ROCE_GID_INDEX = "3"
  156. SPARKRING_FEATURES = ""
  157. SPARKRING_TOOL_CHOICE_CONTRACT = "1"
  158. SIRCL_ENABLED = "0"
  159. VLLM_SPARK_TP4_MODE = ""
  160. VLLM_SPARK_TP4_VOCAB_MODE = ""
  161. # --- caches under /cache (compose names, verbatim) -----------------------
  162. XDG_CACHE_HOME = "/cache/mimo-v26-pro-mopd-4b7049d1e00f-adea8e2c5373"
  163. VLLM_CACHE_ROOT = "/cache/mimo-v26-pro-mopd-4b7049d1e00f-adea8e2c5373/vllm"
  164. TORCHINDUCTOR_CACHE_DIR = "/cache/mimo-v26-pro-mopd-4b7049d1e00f-adea8e2c5373/inductor"
  165. TRITON_CACHE_DIR = "/cache/mimo-v26-pro-mopd-4b7049d1e00f-adea8e2c5373/triton"
  166. CUTE_DSL_CACHE_DIR = "/cache/mimo-v26-pro-mopd-4b7049d1e00f-adea8e2c5373/cute"
  167. TILELANG_CACHE_DIR = "/cache/mimo-v26-pro-mopd-4b7049d1e00f-adea8e2c5373/tilelang"
  168. TVM_FFI_CACHE_DIR = "/cache/mimo-v26-pro-mopd-4b7049d1e00f-adea8e2c5373/tvm-ffi"
  169. FLASHINFER_WORKSPACE_BASE = "/cache/mimo-v26-pro-mopd-4b7049d1e00f-adea8e2c5373/flashinfer"
  170. B12X_COMPILE_CACHE_DIR = "/cache/mimo-v26-pro-mopd-cuda13.4.2-adea8e2c5373/b12x"
  171. # --- launcher-controlled bits -------------------------------------------
  172. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  173. VLLM_NO_USAGE_STATS = "1"
  174. # DROPPED on purpose (see header): NCCL_SWITCHLESS_RING_ONLY,
  175. # B12X_ROCE_OPPOSITE_PATHS, B12X_ROCE_PEER_HCA_MAP, B12X_ROCE_HCA,
  176. # NCCL_IB_HCA (cluster block: f0 pair), NCCL_SOCKET_IFNAME/GLOO (cluster
  177. # block: enp1s0f0np0), SPARKRING_TRANSPORT_* (ring pacing), mem_limit.