recipe.toml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. # GLM-5.3-Flash NVFP4-Spark — 4x DGX Spark, the lab's current Spark quant on
  2. # the LATEST jovian-judgement (r38 cut, 2026-09-19).
  3. #
  4. # Operator direction (2026-09-19): after the NAS disk death the interim
  5. # serving mode is 2x + 4x on local NVMe with the current lab quants. This
  6. # lane uses the latest lab engine (r38 = dev/jovian-judgement tip 8e1f1e5,
  7. # see profiles/jovian-r38-glm53.env) instead of the legacy r12 rebuild
  8. # (the r12 image is gone from the nodes; the r12 composition is a "phantom"
  9. # — the lab mainline keeps the split GDN naming the current quants carry,
  10. # and the r38 tip adds the B12X MXFP8 linear kernel that the r35-era
  11. # flashinfer-only path lacked for the small GDN GEMMs).
  12. #
  13. # Model: local-inference-lab/GLM-5.3-Flash-NVFP4-Spark (154.1 GiB, snapshot
  14. # a6082410, 09-17) — the "DSpark speculative embedded" checkpoint: the MTP
  15. # draft head lives in the model-mtp-*.safetensors shards (no separate
  16. # drafter download). NVFP4 routed experts + NVFP4 MTP expert layer. Split
  17. # GDN naming (q/k/g_a/g_b/f_a/f_b/b_proj) — loads on the JJ fork lineage
  18. # (r12..r38); the Aiden fork's fused in_proj_qkvbfg naming KeyErrors on it.
  19. #
  20. # Image: glm53-jovian-r38:local — the r27-lineage clone-at-pin build at the
  21. # r38 pins (normal in-build git, no pre-staged tarballs). Flags mirror the
  22. # proven r27-lineage GLM recipe (glm53-flash-r27-4x-dcp4, 160/176 bench)
  23. # minus the DCP4 pair:
  24. # * --attention-backend B12X — required: the sm12x auto-priority list never
  25. # offers the B12X sparse-MLA backend for GLM's head-512
  26. # * no --kv-cache-dtype — let the fork pick its default (explicit fp8 /
  27. # fp8_ds_mla both failed auto-selection on this build lineage)
  28. # * --load-format instanttensor — baked into the r27-lineage images
  29. # * no --moe-backend — the b12x MoE routing is the fork default for this
  30. # quant (the FINAL BISECT "+moe b12x" gain is in the default path)
  31. # * speculative-config carries attention_backend B12X — the draft model's
  32. # vllm_config takes its attention backend from the SPECULATIVE config
  33. # * --language-model-only, no --enforce-eager (r27-lineage: graphs+MTP is
  34. # clean on the r17+ refs; the day-0 graph bug does not apply)
  35. #
  36. # PREREQUISITES: weights on each node's LOCAL hub (the NAS disk died
  37. # 2026-09-19): /home/kilork/hf-local, ~/.cache/huggingface symlink
  38. # re-pointed per node (snapshot a6082410).
  39. engine = "vllm"
  40. name = "GLM-5.3-Flash NVFP4-Spark (vLLM, 2x Spark, MTP-3, r38 tip)"
  41. docker_image = "glm53-jovian-r35:local" # r35 loads the Spark checkpoint; r38 (JJ tip + b12x master) deadlocks in the b12x preparation pool on 2x GB10
  42. docker_image_dir = "glm53-jovian-r27"
  43. build_profile = "glm53-r35"
  44. entrypoint = ["vllm", "serve"]
  45. model = "local-inference-lab/GLM-5.3-Flash-NVFP4-Spark"
  46. parent_model = "zai-org/GLM-5.3-Flash"
  47. required_nodes = 2
  48. tensor_parallel_size = 2
  49. pipeline_parallel_size = 1
  50. distributed_backend = "mp"
  51. shm_size = "32gb"
  52. args = [
  53. # Stable served name — quant-agnostic (shared across glm53 quants)
  54. "--served-model-name", "glm53",
  55. "--trust-remote-code",
  56. "--distributed-executor-backend", "mp",
  57. # GMU is ONLY a startup guardrail here (KV pool is pinned below):
  58. # 0.88 = 107.0 GiB, below any realistic free-memory dip on GB10's
  59. # 121.63 GiB (the 0.90 admission flake, #48140).
  60. "--gpu-memory-utilization", "0.88",
  61. # 10 GiB KV (2x: 77 GB weights/node — the proven day-0/r27 pin; the
  62. # 524288 context ≈ 1.16M-token pool cap)
  63. "--kv-cache-memory-bytes", "10737418240",
  64. "--block-size", "256",
  65. "--max-model-len", "524288",
  66. "--max-num-seqs", "16",
  67. "--max-num-batched-tokens", "4096",
  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; ~5.5 min for the
  74. # full checkpoint off shared NFS, ~1 min off local NVMe)
  75. "--load-format", "instanttensor",
  76. # Their proven boot: no flashinfer autotune, no CuTe-DSL warmup
  77. "--kernel-config", """
  78. '{"enable_cutedsl_warmup":false,"enable_flashinfer_autotune":false}'""",
  79. # Built-in MTP draft, 3 tokens (the r12-qualified "mtp:3" mode). The
  80. # draft model's vllm_config takes its attention backend from the
  81. # SPECULATIVE config, not the global flag — B12X mirrors the main model.
  82. "--speculative-config", """
  83. '{"method":"mtp","num_speculative_tokens":3,"attention_backend":"B12X"}'""",
  84. "--language-model-only",
  85. "--tool-call-parser", "glm47",
  86. "--enable-auto-tool-choice",
  87. "--reasoning-parser", "glm45",
  88. ]
  89. [env]
  90. HF_HUB_OFFLINE = "1"
  91. # RoCEnante (b12x one-shot RoCE all-reduce/all-gather) — default on for the
  92. # r27 lanes since the 2026-09-08 A/B (4x: decode +31..+90%, quality 160 vs
  93. # 155). Needs the RoCE fabric; single-node serves skip it silently.
  94. VLLM_ENABLE_ROCE_ALLREDUCE = "1"
  95. # Route mxfp8 linears away from flashinfer cutlass (rejects small GDN GEMMs: min n/k=128)
  96. VLLM_DISABLED_KERNELS = "FlashInferCutlassMxfp8LinearKernel"
  97. # FlashInfer JIT compiles at first boot with N parallel nvcc jobs ->
  98. # OOM-killed on GB10 while weights+KV are resident; cap the ninja jobs.
  99. MAX_JOBS = "2"
  100. # NoPE-MLA rope-pad runtime gate (mod baked into the image lineage)
  101. VLLM_MLA_NOPE_PAD_ROPE = "1"
  102. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  103. # Upstream launch-script env (memory + compile knobs)
  104. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  105. VLLM_USE_AOT_COMPILE = "0"
  106. VLLM_USE_STANDALONE_COMPILE = "1"
  107. VLLM_USE_FLASHINFER_SAMPLER = "1"
  108. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  109. TORCH_USE_RTLD_GLOBAL = "1"
  110. VLLM_NO_USAGE_STATS = "1"
  111. # Architecture (aarch64 / sm_121a DGX Spark)
  112. TORCH_CUDA_ARCH_LIST = "12.1a"
  113. FLASHINFER_CUDA_ARCH_LIST = "12.1f"
  114. CUTE_DSL_ARCH = "sm_121a"
  115. CMAKE_CUDA_ARCHITECTURES = "121"
  116. OMP_NUM_THREADS = "2"
  117. # JIT caches persist per-node across serves (cold /root/.cache per container
  118. # = ~20 min flashinfer/torch recompile every serve)
  119. [[extra_mounts]]
  120. host = "~/sm121-cache/glm53-jit-121f/b12x"
  121. container = "/root/.cache/b12x"
  122. [[extra_mounts]]
  123. host = "~/sm121-cache/jit-121f/flashinfer"
  124. container = "/root/.cache/flashinfer"
  125. [[extra_mounts]]
  126. host = "~/sm121-cache/jit-121f/torchinductor"
  127. container = "/root/.cache/torchinductor"
  128. [[extra_mounts]]
  129. host = "~/sm121-cache/jit-121f/vllm"
  130. container = "/root/.cache/vllm"