recipe.toml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. # MiMo-V2.6-Flash-MOPD on 4x DGX Spark via vLLM + B12X — the engine A/B twin
  2. # of mimo26-flash-mopd-4x (SGLang). No new image: r39 already carries the
  3. # fork's MiMo-V2 integration (mimo_v2.py; SWA+DFlash PR #46104 merged into
  4. # the lab fork main 2026-07-01, present at the 9e5d1793 tag), so this lane
  5. # boots the SAME engine lineage our GLM-5.3 r39 lanes run — only the model
  6. # and the launch policy differ.
  7. #
  8. # Launch policy mirrors local-inference-lab's lil-catalog MiMo manifests
  9. # (MiMo-V2.6-Flash-RL TP4 qualified on SM120; Pro-MOPD TP8 with the DFlash
  10. # `dflash/` subfolder draft, BF16 draft weights, b12x noncausal sliding
  11. # attention). Deviations: GMU 0.88 -> 0.84 (operator call, GB10 UMA guard),
  12. # TP8 -> TP4 (our 4-node lane).
  13. #
  14. # What we are testing:
  15. # * B12X attention long-context path on 192/128 GQA (the sglang-triton
  16. # lane decodes at 30% of d0 at 256K; the lab's vLLM stack has the
  17. # split-KV verify fix that fixed exactly this on their boxes).
  18. # * BF16 KV @ GMU 0.84 (their cache policy — fp8 KV skipped on both stacks).
  19. # * DFlash via vLLM speculative-config (method dflash, draft from the
  20. # checkpoint's dflash/ subfolder, 7 draft tokens) vs sglang's DFlash.
  21. #
  22. # Status: PARKED — dead end on r39 (2026-09-28). Four boot attempts, each one
  23. # layer deeper: (1) EAGLE3 hook raised on the Omni wrapper — fixed by the
  24. # image's inner-language-model patch; (2) B12X rejects the draft's non-causal
  25. # attention — draft moved to TRITON_ATTN; (3) qwen3_dflash hard-imports
  26. # ModelOptMxFp8LinearMethod that r39's modelopt doesn't ship — patched to be
  27. # None-tolerant; (4) FATAL: KV-layout validator refuses the MiMo hybrid stack
  28. # (SWA-128 + GA layers, mixed page sizes 131072/163840) because b12x declares
  29. # LBNHC only and the check is backend-declared, not env-fixable. r39 was
  30. # qualified for GLM-5.3, never for MiMo; lil-catalog itself marks their MiMo
  31. # DFlash "runtime qualification unverified". Reopening recipe + external
  32. # intel (madeby561 amd64-only rc4, eugr spark-vllm-b12x nightlies, lil-catalog
  33. # flags): specs/bugs/BUG-2026-09-28-vllm-mimo-dflash-parked.md.
  34. #
  35. # REOPENED 2026-09-28 same evening: the eugr/spark-vllm-b12x nightly (source
  36. # local-inference-lab/vllm@dev/karmic-kraken) landed all four missing pieces
  37. # on 2026-09-22 — MiMo aux-state loading, block-outermost KV layouts for
  38. # mixed page sizes, b12x non-causal attention (so the DFlash draft runs B12X
  39. # too), and the eagle3 language-model unwrap. It also ships cached
  40. # serve-launchers (serve-mimo26-flash.sh) that define the canonical MiMo
  41. # flag set; we mirror them. No local image build: docker_image is the
  42. # nightly tag, distributed to nodes by save/load.
  43. engine = "vllm"
  44. name = "MiMo-V2.6-Flash-MOPD (vLLM B12X, 4x Spark, DFlash-7, b12x-nightly)"
  45. docker_image = "eugr/spark-vllm-b12x:latest"
  46. entrypoint = ["vllm", "serve"]
  47. model = "XiaomiMiMo/MiMo-V2.6-Flash-MOPD"
  48. parent_model = "XiaomiMiMo/MiMo-V2.6-Flash-MOPD"
  49. port = 30000
  50. required_nodes = 4
  51. tensor_parallel_size = 4
  52. pipeline_parallel_size = 1
  53. distributed_backend = "mp"
  54. shm_size = "32gb"
  55. args = [
  56. "--served-model-name", "mimo-v2.6-flash",
  57. "--trust-remote-code",
  58. "--distributed-executor-backend", "mp",
  59. # Operator GMU (0.88 -> 0.84 for this first vLLM MiMo boot); their
  60. # manifest's 0.98 is RTX PRO 6000 territory, not GB10 UMA.
  61. "--gpu-memory-utilization", "0.85",
  62. "--block-size", "128",
  63. "--max-model-len", "524288",
  64. "--max-num-seqs", "16",
  65. "--max-num-batched-tokens", "8192",
  66. # SparkRing tp4 contract, concurrency-friendly scheduler bounds +
  67. # bounce-buffer loader. The 20 GiB KV pin is NOT adopted: on GB10's UMA
  68. # with GMU 0.85 the auto-sizing profiler already claims ~54 GiB free
  69. # (8.5M-token pool in boot logs), so pinning 20 GiB would strand ~34 GiB.
  70. "--model-loader-extra-config", """
  71. '{"read_mode":"bounce","io_threads":8}'""",
  72. "--enable-chunked-prefill",
  73. "--async-scheduling",
  74. "--enable-prefix-caching",
  75. # B12X attention (lab-qualified on MiMo's 192/128 heads; non-causal now
  76. # supported by the nightly's b12x — the DFlash draft runs on B12X too).
  77. "--attention-backend", "B12X",
  78. # Mirror of the lab's serve-mimo26-flash.sh: b12x linear + MoE backends.
  79. "--linear-backend", "b12x",
  80. "--moe-backend", "b12x",
  81. # 2026-09-28 garble bisect, boot B1: mirror the lab launcher exactly —
  82. # the b12x loader (plugin env below), full Omni + --mm-encoder-tp-mode
  83. # weights instead of --language-model-only, explicit bf16 KV. instanttensor
  84. # was our deviation; MiMo's split-GDN weight mapping is what the b12x
  85. # loader path qualifies.
  86. "--load-format", "b12x",
  87. "--mm-encoder-tp-mode", "weights",
  88. "--kv-cache-dtype", "bfloat16",
  89. "--kernel-config", """
  90. '{"enable_cutedsl_warmup":false,"enable_flashinfer_autotune":false}'""",
  91. # DFlash draft from the checkpoint's dflash/ subfolder (7 tokens). The
  92. # karmic-kraken b12x supports non-causal attention, so the draft runs
  93. # B12X as well (the TRITON_ATTN workaround was only needed on r39).
  94. # DFlash-7 draft, B12X attention, kv_cache_dtype auto — the lab's
  95. # Pro-TP8 DFlash launcher contract verbatim. The 2026-09-28 garble was
  96. # NOT spec-related: instanttensor mis-mapped the split-GDN weights; the
  97. # b12x loader fixed it (see --load-format comment).
  98. "--speculative-config", """
  99. '{"method":"dflash","model":"{{dflash}}","num_speculative_tokens":5,"kv_cache_dtype":"bfloat16","attention_backend":"B12X","draft_load_config":{"load_format":"safetensors","model_loader_extra_config":{}}}'""",
  100. # (the --language-model-only line removed for boot B1 — see above)
  101. "--reasoning-parser", "mimo",
  102. "--tool-call-parser", "mimo",
  103. "--enable-auto-tool-choice",
  104. "--generation-config", "vllm",
  105. # SparkRing compile contract (fuse_act_quant + explicit capture sizes
  106. # sized for 16 seqs x (5+1) draft slots).
  107. "--compilation-config", """
  108. '{"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]}'""",
  109. ]
  110. # DFlash draft weights: a subfolder of the main model repo, resolved per node
  111. # (same mount as the sglang lane; {{dflash}} in the speculative config).
  112. [[extra_mounts]]
  113. repo = "XiaomiMiMo/MiMo-V2.6-Flash-MOPD"
  114. subfolder = "dflash"
  115. container = "dflash"
  116. # JIT caches: same per-node dirs the GLM r39 lane warms (b12x/flashinfer/
  117. # torchinductor/vllm), so this lane boots JIT-warm off day zero.
  118. [[extra_mounts]]
  119. host = "~/sm121-cache/glm53-jit-121f/b12x"
  120. container = "/root/.cache/b12x"
  121. [[extra_mounts]]
  122. host = "~/sm121-cache/jit-121f/flashinfer"
  123. container = "/root/.cache/flashinfer"
  124. [[extra_mounts]]
  125. host = "~/sm121-cache/jit-121f/torchinductor"
  126. container = "/root/.cache/torchinductor"
  127. [[extra_mounts]]
  128. host = "~/sm121-cache/jit-121f/vllm"
  129. container = "/root/.cache/vllm"
  130. # Triton's own JIT cache (the vllm compile cache references cubins that live
  131. # here + in TORCHINDUCTOR_CACHE_DIR; without these, every restart re-JITs and
  132. # TritonBundler logs "cubin not found").
  133. [[extra_mounts]]
  134. host = "~/sm121-cache/jit-121f/triton"
  135. container = "/root/.cache/triton"
  136. [env]
  137. HF_HUB_OFFLINE = "1"
  138. VLLM_PLUGINS = "b12x_loader"
  139. VLLM_ENABLE_ROCE_ALLREDUCE = "1"
  140. MAX_JOBS = "2"
  141. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  142. # Keep inductor + triton caches on the mounted volumes (defaults are the
  143. # container /tmp and ~/.triton — both die every restart, leaving the vllm
  144. # compile cache dangling at lost cubins).
  145. TORCHINDUCTOR_CACHE_DIR = "/root/.cache/torchinductor"
  146. TRITON_CACHE_DIR = "/root/.cache/triton"
  147. # SparkRing tp4 serving-profile keys (quality flags from the DS4.1 garble
  148. # line + b12x policy + v2 runner); NCCL transport stays on the switched
  149. # cluster config — their switchless-ring keys are intentionally not ported.
  150. VLLM_USE_V2_MODEL_RUNNER = "1"
  151. VLLM_MXFP8_LM_HEAD = "0"
  152. VLLM_LM_HEAD_A16 = "1"
  153. VLLM_KV_CACHE_LAYOUT = "BLHNC"
  154. B12X_POLICY_MODE = "auto"
  155. VLLM_ROCE_ALLREDUCE_MAX_SIZE = "2097152"
  156. VLLM_ROCE_ALLGATHER_MAX_SIZE = "16777216"
  157. NCCL_IB_EXTENDED_IPV4_GIDS = "1"
  158. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  159. VLLM_USE_AOT_COMPILE = "0"
  160. VLLM_USE_STANDALONE_COMPILE = "1"
  161. VLLM_USE_FLASHINFER_SAMPLER = "1"
  162. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  163. TORCH_USE_RTLD_GLOBAL = "1"
  164. VLLM_NO_USAGE_STATS = "1"
  165. TORCH_CUDA_ARCH_LIST = "12.1a"
  166. FLASHINFER_CUDA_ARCH_LIST = "12.1f"
  167. # b12x CuTe kernels target sm_121a on GB10 (the lab launcher defaults to
  168. # sm_120a = RTX PRO; eugr's own recipes override it the same way).
  169. CUTE_DSL_ARCH = "sm_121a"
  170. CMAKE_CUDA_ARCHITECTURES = "121"
  171. OMP_NUM_THREADS = "2"