recipe.toml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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.84",
  62. "--block-size", "128",
  63. "--max-model-len", "524288",
  64. "--max-num-seqs", "4",
  65. "--max-num-batched-tokens", "4096",
  66. "--enable-chunked-prefill",
  67. "--async-scheduling",
  68. "--enable-prefix-caching",
  69. # B12X attention (lab-qualified on MiMo's 192/128 heads; non-causal now
  70. # supported by the nightly's b12x — the DFlash draft runs on B12X too).
  71. "--attention-backend", "B12X",
  72. # Mirror of the lab's serve-mimo26-flash.sh: b12x linear + MoE backends.
  73. "--linear-backend", "b12x",
  74. "--moe-backend", "b12x",
  75. # 2026-09-28 garble bisect, boot B1: mirror the lab launcher exactly —
  76. # the b12x loader (plugin env below), full Omni + --mm-encoder-tp-mode
  77. # weights instead of --language-model-only, explicit bf16 KV. instanttensor
  78. # was our deviation; MiMo's split-GDN weight mapping is what the b12x
  79. # loader path qualifies.
  80. "--load-format", "b12x",
  81. "--mm-encoder-tp-mode", "weights",
  82. "--kv-cache-dtype", "bfloat16",
  83. "--kernel-config", """
  84. '{"enable_cutedsl_warmup":false,"enable_flashinfer_autotune":false}'""",
  85. # DFlash draft from the checkpoint's dflash/ subfolder (7 tokens). The
  86. # karmic-kraken b12x supports non-causal attention, so the draft runs
  87. # B12X as well (the TRITON_ATTN workaround was only needed on r39).
  88. # DFlash-7 draft, B12X attention, kv_cache_dtype auto — the lab's
  89. # Pro-TP8 DFlash launcher contract verbatim. The 2026-09-28 garble was
  90. # NOT spec-related: instanttensor mis-mapped the split-GDN weights; the
  91. # b12x loader fixed it (see --load-format comment).
  92. "--speculative-config", """
  93. '{"method":"dflash","model":"{{dflash}}","num_speculative_tokens":7,"kv_cache_dtype":"auto","attention_backend":"B12X"}'""",
  94. # (the --language-model-only line removed for boot B1 — see above)
  95. "--reasoning-parser", "mimo",
  96. "--tool-call-parser", "mimo",
  97. "--enable-auto-tool-choice",
  98. "--generation-config", "vllm",
  99. ]
  100. # DFlash draft weights: a subfolder of the main model repo, resolved per node
  101. # (same mount as the sglang lane; {{dflash}} in the speculative config).
  102. [[extra_mounts]]
  103. repo = "XiaomiMiMo/MiMo-V2.6-Flash-MOPD"
  104. subfolder = "dflash"
  105. container = "dflash"
  106. # JIT caches: same per-node dirs the GLM r39 lane warms (b12x/flashinfer/
  107. # torchinductor/vllm), so this lane boots JIT-warm off day zero.
  108. [[extra_mounts]]
  109. host = "~/sm121-cache/glm53-jit-121f/b12x"
  110. container = "/root/.cache/b12x"
  111. [[extra_mounts]]
  112. host = "~/sm121-cache/jit-121f/flashinfer"
  113. container = "/root/.cache/flashinfer"
  114. [[extra_mounts]]
  115. host = "~/sm121-cache/jit-121f/torchinductor"
  116. container = "/root/.cache/torchinductor"
  117. [[extra_mounts]]
  118. host = "~/sm121-cache/jit-121f/vllm"
  119. container = "/root/.cache/vllm"
  120. [env]
  121. HF_HUB_OFFLINE = "1"
  122. VLLM_PLUGINS = "b12x_loader"
  123. VLLM_ENABLE_ROCE_ALLREDUCE = "1"
  124. MAX_JOBS = "2"
  125. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  126. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  127. VLLM_USE_AOT_COMPILE = "0"
  128. VLLM_USE_STANDALONE_COMPILE = "1"
  129. VLLM_USE_FLASHINFER_SAMPLER = "1"
  130. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  131. TORCH_USE_RTLD_GLOBAL = "1"
  132. VLLM_NO_USAGE_STATS = "1"
  133. TORCH_CUDA_ARCH_LIST = "12.1a"
  134. FLASHINFER_CUDA_ARCH_LIST = "12.1f"
  135. # b12x CuTe kernels target sm_121a on GB10 (the lab launcher defaults to
  136. # sm_120a = RTX PRO; eugr's own recipes override it the same way).
  137. CUTE_DSL_ARCH = "sm_121a"
  138. CMAKE_CUDA_ARCHITECTURES = "121"
  139. OMP_NUM_THREADS = "2"