recipe.toml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. # DFlash2 re-test on the r28 full stack (2026-09-08, operator: "может он
  2. # заработал"). The 2026-09-06 blocker (C4 parent-page stride assert + FP8-KV
  3. # drafter backend rejection) targeted the r27 tree; r28's vLLM carries
  4. # fa4720ea "fix(cache): restore GLM boundaries across DCP and DFlash groups"
  5. # + the #646 2048/256 page split, so the geometry may now line up.
  6. # Recipe = the r27-dflash2 2x shape (deleted at 17a91a9) retargeted:
  7. # method "dflash", incoai/GLM-5.3-Flash-DFlash2 draft, k=7, B12X backend,
  8. # block-size 256, 10 GiB KV pin (2x profile).
  9. #
  10. engine = "vllm"
  11. name = "GLM-5.3-Flash NVFP4 (r28 img, DFlash2 k=7, 2x re-test)"
  12. docker_image = "glm53-jovian-r28:local" # full r28 lock via build_profile
  13. build_profile = "glm53-r28"
  14. docker_image_dir = "glm53-jovian-r27"
  15. # Required: the clean r12 image follows the solar contract (ENTRYPOINT []
  16. # + CMD bash), so the recipe carries the entrypoint (the old day-0-based
  17. # r12 image had ["vllm","serve"] baked in, which is why this was absent
  18. # until the clean rebuild).
  19. entrypoint = ["vllm", "serve"]
  20. model = "local-inference-lab/GLM-5.3-Flash-NVFP4"
  21. required_nodes = 2
  22. tensor_parallel_size = 2
  23. pipeline_parallel_size = 1
  24. distributed_backend = "mp"
  25. shm_size = "32gb"
  26. args = [
  27. # Stable served name — quant-agnostic (shared across glm53 quants)
  28. "--served-model-name", "glm53",
  29. "--trust-remote-code",
  30. "--distributed-executor-backend", "mp",
  31. # GMU is ONLY a startup guardrail here (KV pool is pinned below): 0.90
  32. # demands 109.46 GiB free on GB10's 121.63 GiB, but driver reserve +
  33. # page cache routinely leave ~108.5 -> flaky
  34. # "Free memory ... less than desired" boot deaths (this was the class
  35. # of the old "54-second death"), and post-crash reruns see ~106.6 GiB.
  36. # 0.82 = 99.7 GiB, below any realistic dip; does NOT change what gets
  37. # allocated (weights ~93 + pinned KV 10 + activations).
  38. "--gpu-memory-utilization", "0.90",
  39. # Pinned 10 GiB KV (≈1.16M tokens) — GMU sizing has no headroom at
  40. # 92.72 GiB weights/node; pinning also keeps warmup off the swap path
  41. "--kv-cache-memory-bytes", "10737418240",
  42. # No --kv-cache-dtype: let the r12 fork pick its default (the explicit
  43. # fp8 / fp8_ds_mla both failed auto-selection on this build).
  44. # The GLM5Next model wires the B12X sparse-MLA backend (sm_120/sm_121)
  45. # when the global backend is B12X (glm5next/nvidia/attention.py:
  46. # _select_sparse_backend); the sm12x auto-priority list never offers it
  47. # (FLASHINFER_MLA_SPARSE_SM120 only supports head 576, not GLM's 512).
  48. "--attention-backend", "B12X",
  49. # pure I/O loader (kept across every config; 171 GB in ~5.5 min vs ~16 NFS)
  50. "--load-format", "instanttensor",
  51. # [R17 FULL-CLUSTER TEST] lil manifest backends (quality gate: hardmode
  52. # must stay ≥88; r12-era this cluster dropped it to 74 — r17 may carry
  53. # the fix through — one boot decides).
  54. "--block-size", "256",
  55. # FINAL BISECT (2026-09-03, hardmode 176pt, r17 img):
  56. # knobs-only 87: d0 c1 24.1, d8192 23.8
  57. # +moe b12x 88: d0 c1 23.5, d8192 26.6 <- SHIP (2 pts d8192)
  58. # +linear b12x 44: W4A4 linear kernel destroys numerics (param-precision 0%)
  59. # +align 88: but d0 c1 18.6 (-5) — perf-negative, dropped
  60. # (all three together = 44-74; the lab needs its private packed package)
  61. "--max-model-len", "524288",
  62. "--max-num-seqs", "16",
  63. "--max-num-batched-tokens", "4096",
  64. "--enable-chunked-prefill",
  65. "--async-scheduling",
  66. "--enable-prefix-caching",
  67. "--disable-custom-all-reduce",
  68. # Their proven boot: no flashinfer autotune, no CuTe-DSL warmup
  69. "--kernel-config", """
  70. '{"enable_cutedsl_warmup":false,"enable_flashinfer_autotune":false}'""",
  71. # Built-in MTP draft, 3 tokens (the r12-qualified "mtp:3" mode — their
  72. # x86 numbers: 254 tok/s CC1, 2.37 accept; the checkpoint embeds up to
  73. # 5 via the model-mtp-0000x shards but 3 is the verified depth). This is
  74. # the checkpoint's own MTP head (Glm5NextMTPModel), NOT dspark — dspark
  75. # is the DeepSeek-V4 family's mechanism; GLM's other r12 mode is
  76. # dflash2:7 with a separate trained draft checkpoint.
  77. # The draft model's vllm_config takes its attention backend from the
  78. # SPECULATIVE config, not the global flag (eagle/utils.py:
  79. # _make_eagle_draft_vllm_config) — B12X here mirrors the main model's.
  80. # r18 used draft_model/FLASH_ATTN/kv auto — both rejected on that fork
  81. # (FP8-KV-drafter backend check + C4-page stride assert). r27 qualifies
  82. # dflash2 upstream (the #646 2048+256 page split is in this tree); the
  83. # drafter/depth follow the working aiden GB10 lane (method "dflash").
  84. "--speculative-config", """
  85. '{"method":"dflash","model":"incoai/GLM-5.3-Flash-DFlash2","num_speculative_tokens":7}'""",
  86. "--language-model-only",
  87. # MTP + CUDA graphs degrades OUTPUT QUALITY on the glm53 day-0 dev build
  88. # (forum #381350/#44, CONFIRMED by A/B bench 2026-08-28: same seed/flags,
  89. # graphs on = 89/100, eager = 92/100; decode unchanged 28.4 t/s @ c1,
  90. # c2 -7%, TTFT +1.6s). The b12x glm52 stack does NOT need this (its
  91. # graphs+MTP combo benches clean at 100/100) — bug is build-specific.
  92. # graphs moved BEFORE tool-call-parser; enforce-eager removed for the
  93. # r17-graphs test (bisect A2 was 88/100 eager; graphs+MTP fix is public
  94. # in r17 refs? verify by bench).
  95. "--tool-call-parser", "glm47",
  96. "--enable-auto-tool-choice",
  97. "--reasoning-parser", "glm45",
  98. ]
  99. [env]
  100. HF_HUB_OFFLINE = "1"
  101. # FlashInfer JIT (mxfp8_gemm_cutlass_sm120, ~12 kernels) compiles at first
  102. # boot with 12 parallel nvcc jobs -> OOM-killed (code 137) on GB10's
  103. # 121 GB unified while the 93 GB weights + 10 GB KV pin are resident.
  104. # MAX_JOBS caps ninja parallelism so the JIT fits in the remaining ~20 GB.
  105. MAX_JOBS = "2"
  106. # NoPE-MLA rope-pad runtime gate (mod baked into the image)
  107. VLLM_MLA_NOPE_PAD_ROPE = "1"
  108. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  109. # Upstream launch-script env (memory + compile knobs)
  110. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  111. VLLM_USE_AOT_COMPILE = "0"
  112. VLLM_USE_STANDALONE_COMPILE = "1"
  113. VLLM_USE_FLASHINFER_SAMPLER = "1"
  114. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  115. TORCH_USE_RTLD_GLOBAL = "1"
  116. VLLM_NO_USAGE_STATS = "1"
  117. # Architecture (aarch64 / sm_121a DGX Spark)
  118. TORCH_CUDA_ARCH_LIST = "12.1a"
  119. FLASHINFER_CUDA_ARCH_LIST = "12.1f"
  120. CUTE_DSL_ARCH = "sm_121a"
  121. CMAKE_CUDA_ARCHITECTURES = "121"
  122. OMP_NUM_THREADS = "2"
  123. [[extra_mounts]]
  124. host = "~/sm121-cache/glm53-jit-121f/b12x"
  125. container = "/root/.cache/b12x"
  126. # JIT caches persist per-node across serves (was: cold /root/.cache per
  127. # container -> ~20 min flashinfer/torch recompile every serve). The host
  128. # dirs are shared between lanes of the same arch — each cache
  129. # self-namespaces by its engine version key internally.
  130. [[extra_mounts]]
  131. host = "~/sm121-cache/jit-121f/flashinfer"
  132. container = "/root/.cache/flashinfer"
  133. [[extra_mounts]]
  134. host = "~/sm121-cache/jit-121f/torchinductor"
  135. container = "/root/.cache/torchinductor"
  136. [[extra_mounts]]
  137. host = "~/sm121-cache/jit-121f/vllm"
  138. container = "/root/.cache/vllm"