recipe.toml 4.8 KB

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