2026-09-22_062914_r39-4x-v270.recipe.toml 4.8 KB

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