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, r38) — C-track deadlock test"
  24. docker_image = "jovian-judgement:r38"
  25. docker_image_dir = "jovian-judgement" # r38 image is a prebuilt node artifact (no profile in the r35 dir)
  26. entrypoint = ["vllm", "serve"]
  27. model = "local-inference-lab/GLM-5.3-Flash-NVFP4"
  28. parent_model = "zai-org/GLM-5.3-Flash"
  29. required_nodes = 4
  30. tensor_parallel_size = 4
  31. pipeline_parallel_size = 1
  32. distributed_backend = "mp"
  33. shm_size = "32gb"
  34. args = [
  35. # Stable served name — quant-agnostic (shared across glm53 quants)
  36. "--served-model-name", "glm53",
  37. "--trust-remote-code",
  38. "--distributed-executor-backend", "mp",
  39. # GMU is ONLY a startup guardrail: 0.88 = 107.0 GiB, below any
  40. # realistic free-memory dip on GB10's 121.63 GiB (#48140).
  41. "--gpu-memory-utilization", "0.88",
  42. # no KV pin: ~46.5 GiB weights/rank leaves ~55 GiB — auto-sized pool
  43. "--block-size", "256",
  44. "--max-model-len", "524288",
  45. "--max-num-seqs", "16",
  46. "--max-num-batched-tokens", "4096",
  47. "--enable-chunked-prefill",
  48. "--async-scheduling",
  49. "--enable-prefix-caching",
  50. # B12X sparse-MLA (required for head-512 on sm_12x)
  51. "--attention-backend", "B12X",
  52. # pure I/O loader (baked into the r27-lineage images; ~1 min off local NVMe)
  53. "--load-format", "instanttensor",
  54. # Their proven boot: no flashinfer autotune, no CuTe-DSL warmup
  55. "--kernel-config", """
  56. '{"enable_cutedsl_warmup":false,"enable_flashinfer_autotune":false}'""",
  57. # Built-in MTP draft, 3 tokens (layer 45, in-checkpoint). The draft
  58. # model's vllm_config takes its attention backend from the SPECULATIVE
  59. # config, not the global flag — B12X mirrors the main model.
  60. "--speculative-config", """
  61. '{"method":"mtp","num_speculative_tokens":3,"attention_backend":"B12X"}'""",
  62. "--language-model-only",
  63. "--tool-call-parser", "glm47",
  64. "--enable-auto-tool-choice",
  65. "--reasoning-parser", "glm45",
  66. ]
  67. [env]
  68. HF_HUB_OFFLINE = "1"
  69. # RoCEnante (b12x one-shot RoCE all-reduce/all-gather) — default on for the
  70. # r27 lanes since the 2026-09-08 A/B (4x: decode +31..+90%, quality 160 vs
  71. # 155). Needs the RoCE fabric; single-node serves skip it silently.
  72. VLLM_ENABLE_ROCE_ALLREDUCE = "1"
  73. # Route mxfp8 linears away from flashinfer cutlass (rejects small GDN GEMMs: min n/k=128)
  74. VLLM_DISABLED_KERNELS = "FlashInferCutlassMxfp8LinearKernel"
  75. # FlashInfer JIT compiles at first boot with N parallel nvcc jobs ->
  76. # OOM-killed on GB10 while weights+KV are resident; cap the ninja jobs.
  77. MAX_JOBS = "2"
  78. # NoPE-MLA rope-pad runtime gate (mod baked into the image lineage)
  79. VLLM_MLA_NOPE_PAD_ROPE = "1"
  80. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  81. # Upstream launch-script env (memory + compile knobs)
  82. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  83. VLLM_USE_AOT_COMPILE = "0"
  84. VLLM_USE_STANDALONE_COMPILE = "1"
  85. VLLM_USE_FLASHINFER_SAMPLER = "1"
  86. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  87. TORCH_USE_RTLD_GLOBAL = "1"
  88. VLLM_NO_USAGE_STATS = "1"
  89. # Architecture (aarch64 / sm_121a DGX Spark)
  90. TORCH_CUDA_ARCH_LIST = "12.1a"
  91. FLASHINFER_CUDA_ARCH_LIST = "12.1f"
  92. CUTE_DSL_ARCH = "sm_121a"
  93. CMAKE_CUDA_ARCHITECTURES = "121"
  94. OMP_NUM_THREADS = "2"
  95. # JIT caches persist per-node across serves (cold /root/.cache per container
  96. # = ~20 min flashinfer/torch recompile every serve)
  97. [[extra_mounts]]
  98. host = "~/sm121-cache/glm53-jit-121f/b12x"
  99. container = "/root/.cache/b12x"
  100. [[extra_mounts]]
  101. host = "~/sm121-cache/jit-121f/flashinfer"
  102. container = "/root/.cache/flashinfer"
  103. [[extra_mounts]]
  104. host = "~/sm121-cache/jit-121f/torchinductor"
  105. container = "/root/.cache/torchinductor"
  106. [[extra_mounts]]
  107. host = "~/sm121-cache/jit-121f/vllm"
  108. container = "/root/.cache/vllm"