2026-09-20_090824_512k-kv10g.recipe.toml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. # GLM-5.3-Flash NVFP4-lab — the lab's NVFP4 quant (2026-09-16 RE-CUT,
  2. # local-inference-lab/GLM-5.3-Flash-NVFP4), 2× DGX Spark, TP=2.
  3. #
  4. # The 09-16 re-cut replaced the old ~186 GB upload in place: 199.4 GB
  5. # (36 expert shards + 4 nonexpert + 4 MTP shards, modelopt NVFP4).
  6. # Operator direction (2026-09-20): "they improved it a lot" — this lane
  7. # re-tests the re-cut against the old 89/100 anchor on the proven r35
  8. # engine (same interim mode as the Spark lanes).
  9. #
  10. # Structure (verified from model.safetensors.index.json, identical to the
  11. # Spark checkpoint): `model.language_model.layers.*` with SPLIT GDN naming
  12. # (q/k/g_a/g_b/f_a/f_b/b_proj + hc_* hybrid-conv), a `model.visual.*`
  13. # tower (skipped via --language-model-only), and the MTP head embedded at
  14. # layer 45 (eh_proj/enorm/hnorm) — no separate drafter download. Same
  15. # loader path as the Spark lane: the JJ fork lineage (r35) maps it natively
  16. # (no KeyError); r38 is out — b12x preparation-pool deadlock on 2x GB10.
  17. #
  18. # Image: glm53-jovian-r35:local + VLLM_DISABLED_KERNELS (the small GDN
  19. # mxfp8 GEMMs reject flashinfer cutlass' min n/k=128 — routed to the b12x
  20. # Mxfp8 backend; proven on the Spark lanes 162/176 + 161/176).
  21. #
  22. # Memory: 199.4 GB / 2 ranks ≈ 93 GiB weights/node at GMU 0.88 (107.0 GiB)
  23. # — no KV pin (auto-sizing takes the remaining ~10 GiB; a 10 GiB pin as in
  24. # the old 186 GB cut would overshoot the tighter budget).
  25. #
  26. # PREREQUISITES: weights on each node's LOCAL hub (the NAS disk died
  27. # 2026-09-19): /home/kilork/hf-local, ~/.cache/huggingface symlink
  28. # re-pointed per node. Re-cut re-download in progress on all 4 nodes
  29. # (dgx1 is the tightest: ~40 GiB left after the model).
  30. engine = "vllm"
  31. name = "GLM-5.3-Flash NVFP4-lab re-cut (vLLM, 2x Spark, MTP-3, r35)"
  32. docker_image = "glm53-jovian-r35:local" # r35 loads the lab quants (r38 pool-deadlock on 2x, see bug report)
  33. docker_image_dir = "glm53-jovian-r27"
  34. build_profile = "glm53-r35"
  35. entrypoint = ["vllm", "serve"]
  36. model = "local-inference-lab/GLM-5.3-Flash-NVFP4"
  37. parent_model = "zai-org/GLM-5.3-Flash"
  38. required_nodes = 2
  39. tensor_parallel_size = 2
  40. pipeline_parallel_size = 1
  41. distributed_backend = "mp"
  42. shm_size = "32gb"
  43. args = [
  44. # Stable served name — quant-agnostic (shared across glm53 quants)
  45. "--served-model-name", "glm53",
  46. "--trust-remote-code",
  47. "--distributed-executor-backend", "mp",
  48. # GMU is ONLY a startup guardrail: 0.88 = 107.0 GiB, below any
  49. # realistic free-memory dip on GB10's 121.63 GiB (#48140).
  50. "--gpu-memory-utilization", "0.88",
  51. # no KV pin: ~93 GiB weights/rank leaves only ~2.4 GiB KV at GMU 0.88
  52. # (the re-cut is heavier than the old 186 GB cut). 512K TEST (2026-09-20,
  53. # local-only, uncommitted until the boot proves the pool fits): max-num-seqs
  54. # 16->4 and prefill budget 4096->2048 to free the ~1.3 GiB/rank that one
  55. # 524288-token request needs (profile-run peak + CUDA-graph captures)
  56. "--block-size", "256",
  57. "--max-model-len", "524288",
  58. "--max-num-seqs", "4",
  59. "--max-num-batched-tokens", "2048",
  60. # explicit KV pin (same as the Spark variant): auto-sizing left headroom
  61. # on the table (logs showed more free than the ~2.4 GiB auto-pick); 10 GiB
  62. # per rank -> ~1.4M-token pool, 2.7 full 512K contexts
  63. "--kv-cache-memory-bytes", "10737418240",
  64. "--enable-chunked-prefill",
  65. "--async-scheduling",
  66. "--enable-prefix-caching",
  67. # B12X sparse-MLA (required for head-512 on sm_12x)
  68. "--attention-backend", "B12X",
  69. # pure I/O loader (baked into the r27-lineage images; ~1 min off local NVMe)
  70. "--load-format", "instanttensor",
  71. # Their proven boot: no flashinfer autotune, no CuTe-DSL warmup
  72. "--kernel-config", """
  73. '{"enable_cutedsl_warmup":false,"enable_flashinfer_autotune":false}'""",
  74. # Built-in MTP draft, 3 tokens (layer 45, in-checkpoint). The draft
  75. # model's vllm_config takes its attention backend from the SPECULATIVE
  76. # config, not the global flag — B12X mirrors the main model.
  77. "--speculative-config", """
  78. '{"method":"mtp","num_speculative_tokens":3,"attention_backend":"B12X"}'""",
  79. "--language-model-only",
  80. "--tool-call-parser", "glm47",
  81. "--enable-auto-tool-choice",
  82. "--reasoning-parser", "glm45",
  83. ]
  84. [env]
  85. HF_HUB_OFFLINE = "1"
  86. # RoCEnante (b12x one-shot RoCE all-reduce/all-gather) — default on for the
  87. # r27 lanes since the 2026-09-08 A/B (4x: decode +31..+90%, quality 160 vs
  88. # 155). Needs the RoCE fabric; single-node serves skip it silently.
  89. VLLM_ENABLE_ROCE_ALLREDUCE = "1"
  90. # Route mxfp8 linears away from flashinfer cutlass (rejects small GDN GEMMs: min n/k=128)
  91. VLLM_DISABLED_KERNELS = "FlashInferCutlassMxfp8LinearKernel"
  92. # FlashInfer JIT compiles at first boot with N parallel nvcc jobs ->
  93. # OOM-killed on GB10 while weights+KV are resident; cap the ninja jobs.
  94. MAX_JOBS = "2"
  95. # NoPE-MLA rope-pad runtime gate (mod baked into the image lineage)
  96. VLLM_MLA_NOPE_PAD_ROPE = "1"
  97. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  98. # Upstream launch-script env (memory + compile knobs)
  99. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  100. VLLM_USE_AOT_COMPILE = "0"
  101. VLLM_USE_STANDALONE_COMPILE = "1"
  102. VLLM_USE_FLASHINFER_SAMPLER = "1"
  103. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  104. TORCH_USE_RTLD_GLOBAL = "1"
  105. VLLM_NO_USAGE_STATS = "1"
  106. # Architecture (aarch64 / sm_121a DGX Spark)
  107. TORCH_CUDA_ARCH_LIST = "12.1a"
  108. FLASHINFER_CUDA_ARCH_LIST = "12.1f"
  109. CUTE_DSL_ARCH = "sm_121a"
  110. CMAKE_CUDA_ARCHITECTURES = "121"
  111. OMP_NUM_THREADS = "2"
  112. # JIT caches persist per-node across serves (cold /root/.cache per container
  113. # = ~20 min flashinfer/torch recompile every serve)
  114. [[extra_mounts]]
  115. host = "~/sm121-cache/glm53-jit-121f/b12x"
  116. container = "/root/.cache/b12x"
  117. [[extra_mounts]]
  118. host = "~/sm121-cache/jit-121f/flashinfer"
  119. container = "/root/.cache/flashinfer"
  120. [[extra_mounts]]
  121. host = "~/sm121-cache/jit-121f/torchinductor"
  122. container = "/root/.cache/torchinductor"
  123. [[extra_mounts]]
  124. host = "~/sm121-cache/jit-121f/vllm"
  125. container = "/root/.cache/vllm"