2026-09-22_020128_r39-2x-v270.recipe.toml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. # GLM-5.3-Flash NVFP4-lab RE-CUT on r39 (jovian-judgement tip 2026-09-21),
  2. # 2× DGX Spark, TP=2 — the E-track test lane.
  3. #
  4. # Purpose: does the lab's new tip (vLLM 9e5d1793fa3 + b12x c2dc1cf022)
  5. # fix the r38 b12x preparation-pool deadlock (BUG-2026-09-19) on 2x GB10,
  6. # and what does the RoCE traffic-class commit ("switched Spark fabrics")
  7. # change? Same model/config as the proven re-cut 2x lane (r35, 91/100 @512K)
  8. # — only the engine image moves (r35-glm53 -> r39-glm53, dir
  9. # jovian-judgement-r39, profile r39). Everything else identical so the
  10. # bench is a clean engine A/B.
  11. #
  12. # Note: r39 moved the external-dep contract (all cmake pins + DeepSelect),
  13. # so the image builds from docker-images/jovian-judgement-r39 (its own
  14. # fetch-deps.sh + deps.lock); the r27/r35 dir keeps the r38-era contract.
  15. #
  16. # Structure (verified from model.safetensors.index.json, identical to the
  17. # Spark checkpoint): `model.language_model.layers.*` with SPLIT GDN naming
  18. # (q/k/g_a/g_b/f_a/f_b/b_proj + hc_* hybrid-conv), a `model.visual.*`
  19. # tower (skipped via --language-model-only), and the MTP head embedded at
  20. # layer 45 (eh_proj/enorm/hnorm) — no separate drafter download. Same
  21. # loader path as the Spark lane: the JJ fork lineage (r35) maps it natively
  22. # (no KeyError); r38 is out — b12x preparation-pool deadlock on 2x GB10.
  23. #
  24. # Image: jovian-judgement:r35-glm53 + VLLM_DISABLED_KERNELS (the small GDN
  25. # mxfp8 GEMMs reject flashinfer cutlass' min n/k=128 — routed to the b12x
  26. # Mxfp8 backend; proven on the Spark lanes 162/176 + 161/176).
  27. #
  28. # Memory: 199.4 GB / 2 ranks ≈ 93 GiB weights/node at GMU 0.88 (107.0 GiB)
  29. # — no KV pin (auto-sizing takes the remaining ~10 GiB; a 10 GiB pin as in
  30. # the old 186 GB cut would overshoot the tighter budget).
  31. #
  32. # PREREQUISITES: weights on each node's LOCAL hub (the NAS disk died
  33. # 2026-09-19): /home/kilork/hf-local, ~/.cache/huggingface symlink
  34. # re-pointed per node. Re-cut re-download in progress on all 4 nodes
  35. # (dgx1 is the tightest: ~40 GiB left after the model).
  36. engine = "vllm"
  37. name = "GLM-5.3-Flash NVFP4-lab re-cut (vLLM, 2x Spark, MTP-3, r39 tip)"
  38. docker_image = "jovian-judgement:r39-glm53"
  39. docker_image_dir = "jovian-judgement-r39"
  40. build_profile = "r39"
  41. entrypoint = ["vllm", "serve"]
  42. model = "local-inference-lab/GLM-5.3-Flash-NVFP4"
  43. parent_model = "zai-org/GLM-5.3-Flash"
  44. required_nodes = 2
  45. tensor_parallel_size = 2
  46. pipeline_parallel_size = 1
  47. distributed_backend = "mp"
  48. shm_size = "32gb"
  49. args = [
  50. # Stable served name — quant-agnostic (shared across glm53 quants)
  51. "--served-model-name", "glm53",
  52. "--trust-remote-code",
  53. "--distributed-executor-backend", "mp",
  54. # GMU is ONLY a startup guardrail: 0.88 = 107.0 GiB, below any
  55. # realistic free-memory dip on GB10's 121.63 GiB (#48140).
  56. "--gpu-memory-utilization", "0.88",
  57. # no KV pin: ~93 GiB weights/rank. 512K config (2026-09-20, benched):
  58. # max-num-seqs 4 + prefill budget 2048 free the profile-run peak so an
  59. # explicit 10 GiB KV pin fits (auto-sizing would take ~2.4 GiB); pool
  60. # 1,406,229 tokens = 2.68x a 512K request (matches the Spark 2x lane).
  61. # Host memory after boot: ~2-3 GiB available/node (weights+KV+graphs),
  62. # a 12 GiB pin is the realistic ceiling if ever needed.
  63. "--block-size", "256",
  64. "--max-model-len", "524288",
  65. "--max-num-seqs", "4",
  66. "--max-num-batched-tokens", "2048",
  67. "--kv-cache-memory-bytes", "10737418240",
  68. "--enable-chunked-prefill",
  69. "--async-scheduling",
  70. "--enable-prefix-caching",
  71. # B12X sparse-MLA (required for head-512 on sm_12x)
  72. "--attention-backend", "B12X",
  73. # pure I/O loader (baked into the r27-lineage images; ~1 min off local NVMe)
  74. "--load-format", "instanttensor",
  75. # Their proven boot: no flashinfer autotune, no CuTe-DSL warmup
  76. "--kernel-config", """
  77. '{"enable_cutedsl_warmup":false,"enable_flashinfer_autotune":false}'""",
  78. # Built-in MTP draft, 3 tokens (layer 45, in-checkpoint). The draft
  79. # model's vllm_config takes its attention backend from the SPECULATIVE
  80. # config, not the global flag — B12X mirrors the main model.
  81. "--speculative-config", """
  82. '{"method":"mtp","num_speculative_tokens":3,"attention_backend":"B12X"}'""",
  83. "--language-model-only",
  84. "--tool-call-parser", "glm47",
  85. "--enable-auto-tool-choice",
  86. "--reasoning-parser", "glm45",
  87. ]
  88. [env]
  89. HF_HUB_OFFLINE = "1"
  90. # RoCEnante (b12x one-shot RoCE all-reduce/all-gather) — default on for the
  91. # r27 lanes since the 2026-09-08 A/B (4x: decode +31..+90%, quality 160 vs
  92. # 155). Needs the RoCE fabric; single-node serves skip it silently.
  93. VLLM_ENABLE_ROCE_ALLREDUCE = "1"
  94. # Route mxfp8 linears away from flashinfer cutlass (rejects small GDN GEMMs: min n/k=128)
  95. VLLM_DISABLED_KERNELS = "FlashInferCutlassMxfp8LinearKernel"
  96. # FlashInfer JIT compiles at first boot with N parallel nvcc jobs ->
  97. # OOM-killed on GB10 while weights+KV are resident; cap the ninja jobs.
  98. MAX_JOBS = "2"
  99. # NoPE-MLA rope-pad runtime gate (mod baked into the image lineage)
  100. VLLM_MLA_NOPE_PAD_ROPE = "1"
  101. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  102. # Upstream launch-script env (memory + compile knobs)
  103. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  104. VLLM_USE_AOT_COMPILE = "0"
  105. VLLM_USE_STANDALONE_COMPILE = "1"
  106. VLLM_USE_FLASHINFER_SAMPLER = "1"
  107. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  108. TORCH_USE_RTLD_GLOBAL = "1"
  109. VLLM_NO_USAGE_STATS = "1"
  110. # Architecture (aarch64 / sm_121a DGX Spark)
  111. TORCH_CUDA_ARCH_LIST = "12.1a"
  112. FLASHINFER_CUDA_ARCH_LIST = "12.1f"
  113. CUTE_DSL_ARCH = "sm_121a"
  114. CMAKE_CUDA_ARCHITECTURES = "121"
  115. OMP_NUM_THREADS = "2"
  116. # JIT caches persist per-node across serves (cold /root/.cache per container
  117. # = ~20 min flashinfer/torch recompile every serve)
  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"