2026-09-28_102330_config-c-512k.recipe.toml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # MiMo-V2.6-Flash-MOPD (Xiaomi, ~310B total / 12B-active MoE, fp8 attention +
  2. # MXFP4 experts, 1M native context, image+video+audio input) on 2x DGX Spark
  3. # with SGLang + DFlash speculative decoding.
  4. #
  5. # SGLang variant of forum thread 383968 (tonyd2wild's proven vLLM 2x recipe:
  6. # 45.6/155.8 t/s, 1.87M-token fp8 KV pool, 300K ctx, code 70.5 t/s). The
  7. # vLLM recipe needed 4 drop-in patches; the biggest (fused fp8 QKV stored
  8. # pre-sharded for TP4) is already handled natively by SGLang's MiMo-V2
  9. # loader (same approach as vllm#57508 — the provenance of the 8x Pro recipe
  10. # working on this image family), so we run the stock a14 image.
  11. #
  12. # Image: docker-images/mimo26-spark (a14) — same build as the 8x Pro recipe:
  13. # SGLang 06008c17 base + 12 patches (MiMo-V2 day-0, DFlash, RoCEnante, FP8
  14. # tiles) + b12x. The FP8 tile tables are tuned for MiMo's per-rank shapes —
  15. # at TP2 the shapes differ from TP8; stock fallbacks apply if a tile misses.
  16. #
  17. # Model: XiaomiMiMo/MiMo-V2.6-Flash-MOPD (178 GB, same architecture as the
  18. # RL sibling — config.json is byte-identical; MOPD is a post-RL preference
  19. # distillation of the checkpoint). Resolved from the shared NAS hub
  20. # (config hf_cache_dir; both nodes' ~/.cache/huggingface point there). The
  21. # dflash/ subfolder carries the DFlash draft weights — wired as a
  22. # {{dflash}} path ref.
  23. #
  24. # KV math: ~89 GB weights/rank (178 GB / TP2), GMU 0.85 of 128 GB → the pool
  25. # lands ~6 GB under the RL sibling's 362,560 tokens (measured there
  26. # 2026-09-27); expect ~300–340K. Quality/perf of the RL lane
  27. # (recipes/mimo26-flash-rl-2x/reports, 161/184 on v2.7.1.dev7) is the
  28. # comparison baseline until this lane has its own bench.
  29. # Config C (2026-09-28): GMU 0.90 + --context-length 524288 → full pool
  30. # 570,752 tokens, the 512K target met (see the args note for the probe).
  31. engine = "sglang"
  32. name = "MiMo-V2.6-Flash-MOPD (SGLang DFlash, 2x Spark TP2)"
  33. docker_image = "mimo26-spark:a14"
  34. docker_image_dir = "mimo26-spark"
  35. model = "XiaomiMiMo/MiMo-V2.6-Flash-MOPD"
  36. parent_model = "XiaomiMiMo/MiMo-V2.6-Flash-MOPD"
  37. port = 30000
  38. required_nodes = 2
  39. tensor_parallel_size = 2
  40. distributed_backend = "mp"
  41. shm_size = "16gb"
  42. entrypoint = ["python3", "-m", "sglang.launch_server"]
  43. args = [
  44. "--trust-remote-code",
  45. "--served-model-name", "mimo-v2.6-flash",
  46. # Attention / MoE backends (a13/a14 profile, same as the 8x Pro recipe)
  47. "--attention-backend", "triton",
  48. "--prefill-attention-backend", "fa4",
  49. "--mm-attention-backend", "triton_attn",
  50. "--enable-multimodal",
  51. "--moe-runner-backend", "marlin",
  52. "--moe-a2a-backend", "none",
  53. # Memory / scheduling (128 GB unified per node). Config C (2026-09-28,
  54. # VERIFIED): 0.88 → 0.90 for the 512K target — pool at 0.88 was 481,600,
  55. # short of 524,288 by ~43K tokens. Measured at 0.90: full pool 570,752
  56. # tokens (+ SWA 57,024), context_len 524288 accepted; a 515,001-token
  57. # completion prefilled + decoded clean (625 s ≈ 825 t/s), >524,288 inputs
  58. # rejected with the clean context-length error. Host free after the run
  59. # 7.0/8.1 GB per node, ~8 GB GPU headroom left — no OOM pressure.
  60. "--mem-fraction-static", "0.90",
  61. # Model is natively 1M; the measured pool at GMU 0.85 is 340,736 tokens
  62. # (2x TP2: 83 GB weights/rank leaves ~25 GB/rank; 39/48 SWA layers keep it
  63. # large in tokens). 320K fits a single long request with headroom; a
  64. # 524K request is pool-infeasible on 2x (the 8x Pro lane runs 512K).
  65. "--context-length", "524288",
  66. "--max-running-requests", "8",
  67. "--chunked-prefill-size", "8192",
  68. "--page-size", "64",
  69. # MiMo hybrid SWA attention
  70. "--swa-full-tokens-ratio", "0.1",
  71. # Reasoning / tool parsers
  72. "--reasoning-parser", "mimo",
  73. "--tool-call-parser", "mimo",
  74. # DFlash speculative decoding (draft weights ship inside the model repo)
  75. "--speculative-algorithm", "DFLASH",
  76. "--speculative-draft-model-path", "{{dflash}}",
  77. "--speculative-num-draft-tokens", "8",
  78. # CUDA graphs
  79. "--cuda-graph-max-bs-decode", "8",
  80. "--disable-prefill-cuda-graph",
  81. # Unified memory: page cache from weight loading competes with the KV pool
  82. "--weight-loader-drop-cache-after-load",
  83. # Observability
  84. "--enable-metrics",
  85. "--enable-cache-report",
  86. "--watchdog-timeout", "1800",
  87. ]
  88. # DFlash draft weights: a subfolder of the main model repo, resolved per node
  89. # (table header — all bare keys above).
  90. [[extra_mounts]]
  91. repo = "XiaomiMiMo/MiMo-V2.6-Flash-MOPD"
  92. subfolder = "dflash"
  93. container = "dflash"
  94. [env]
  95. # NOTE: SGLANG8_ROCE_ALLREDUCE is deliberately NOT set — the RoCEnante
  96. # one-shot all-reduce overlay in the a14 image hard-requires the TP8 Gloo
  97. # exchange group ("SG17 RoCEnante requires the TP8 Gloo exchange group"),
  98. # so on TP2 we fall back to stock NCCL over the DAC link.
  99. # a13/a14 tuning switches
  100. MIMO26_FP8_OPROJ = "1"
  101. MIMO26_FP8_DRAFT = "1"
  102. MIMO26_DFLASH_ADAPTIVE = "1"
  103. # NCCL extras from the reference deployment (HCAs/ifname from [nccl."2nodes-dac"])
  104. NCCL_CUMEM_ENABLE = "0"
  105. NCCL_NVLS_ENABLE = "0"
  106. NCCL_PROTO = "^LL128"
  107. NCCL_BUFFSIZE = "1048576"
  108. NCCL_LL128_BUFFSIZE = "262144"
  109. NCCL_MAX_NCHANNELS = "8"
  110. NCCL_DEBUG = "WARN"