recipe.toml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. # GLM-5.3-Flash NVFP4 (lab quant) on the COMMUNITY sparkrun image — 2× DGX
  2. # Spark, TP=2.
  3. #
  4. # Image: aidendle94/sparkrun-vllm-glm53-gb10 (Spark Arena / sparkrun
  5. # orchestrator's GLM-5.3 vLLM build). Verified 2026-08-29: same day-0 vLLM
  6. # dev base as our lab image reports (v0.1.dev20051+g487ecf187, torch
  7. # 2.13.0+cu130), arm64-only (no manifest list — sm_121 target), generic
  8. # `vllm serve` entrypoint, no baked weights. Digest pin (single-arch
  9. # manifest, checked with `docker manifest inspect`):
  10. # sha256:9b0592293a0b0161a040568578aca330227a03d140fa1c5f8965f64292431ef0
  11. #
  12. # WHY THIS RECIPE: cross-checks our home-built lab image against the Spark
  13. # Arena community stack — same checkpoint, same proven flag set, different
  14. # runtime. If both boot and score alike, the flag set (not our patches) is
  15. # the load-bearing part; any delta localizes to the image overlay.
  16. # Flags are mirrored verbatim from recipes/glm53-flash-nvfp4-lab (their
  17. # launch config + our fabric/env deviations — see that header for the full
  18. # rationale of each knob).
  19. #
  20. # Weights live on the NAS (mounted at /mnt/nas on the nodes) and are
  21. # exposed to the container via extra_mounts + HF_HOME — no per-node
  22. # `hf download` needed (config.toml [mount_aliases] hf_cache repoints this
  23. # site-wide).
  24. #
  25. # Boot markers: "Model loading took ~92.7 GiB" → "[quantprobe] …
  26. # algo=MXFP8" (MTP/modelopt fix active in this image; algo=None means the
  27. # image lacks the mod — report and fall back to our lab image) →
  28. # "GPU KV cache size" → "Application startup complete".
  29. #
  30. # Chat needs "chat_template_kwargs":{"reasoning_effort":"low"} — omitted or
  31. # other values select MAX reasoning effort (empty content on short
  32. # max_tokens).
  33. engine = "vllm"
  34. name = "GLM-5.3-Flash W4A16-AutoRound Intel (vLLM, 2x Spark, r12 fork)"
  35. # glm53-jovian-r12:local — our in-docker build of local-inference-lab/vllm
  36. # (jovian-judgement composition + PR heads 550-557) with the native
  37. # Glm5NextForConditionalGeneration arch and B12X sparse-MLA attention.
  38. # The timothystewart6 image was abandoned: upstream vLLM 0.28 there has NO
  39. # native glm5_next arch (its Transformers-backend fallback lacks the
  40. # per-stream q_conv1d weight mapping — boot dies in the weight loader).
  41. docker_image = "glm53-jovian-r12:local"
  42. docker_image_dir = "glm53-jovian-r12"
  43. model = "Intel/GLM-5.3-Flash-W4A16-AutoRound"
  44. parent_model = "zai-org/GLM-5.3-Flash"
  45. required_nodes = 2
  46. tensor_parallel_size = 2
  47. pipeline_parallel_size = 1
  48. distributed_backend = "mp"
  49. shm_size = "32gb"
  50. args = [
  51. # Stable served name — quant-agnostic (shared across glm53 quants)
  52. "--served-model-name", "glm53",
  53. "--trust-remote-code",
  54. # AutoRound int4 pack → GPTQ-style safetensors; explicit quant route (the
  55. # timothystewart6 upstream-stack build knows quant_method auto-round).
  56. "--quantization", "gptq_marlin",
  57. # Required for the head-512 MLA layers on sm_12x: the auto-selection
  58. # list (TRITON_MLA / FLASHINFER_MLA_SPARSE_SM120) has no backend that
  59. # fits GLM's 512 (SM120 flashinfer supports head 576 only).
  60. "--attention-backend", "B12X",
  61. "--distributed-executor-backend", "mp",
  62. # GMU is ONLY a startup guardrail (KV pool is pinned below): 0.90
  63. # flaked boots on GB10 ("Free memory ... less than desired") because
  64. # driver reserve + page cache leave ~106-109 GiB free of 121.63.
  65. # 0.82 = 99.7 GiB, below any realistic dip; changes nothing allocated.
  66. "--gpu-memory-utilization", "0.82",
  67. "--kv-cache-memory-bytes", "10737418240",
  68. # DEVIATION from lab: plain fp8 KV (this image's mla cache kernel asserts
  69. # "pe_dim must be 64 for fp8_ds_mla" — its NoPE handling differs from the
  70. # lab image's rope-pad mod; plain fp8 is what the vendor GLM-5.3 recipe
  71. # uses and doesn't assert pe layout).
  72. "--kv-cache-dtype", "fp8",
  73. "--block-size", "256",
  74. "--max-model-len", "524288",
  75. "--max-num-seqs", "8",
  76. "--max-num-batched-tokens", "4096",
  77. "--enable-chunked-prefill",
  78. "--async-scheduling",
  79. "--enable-prefix-caching",
  80. "--disable-custom-all-reduce",
  81. # Pin the MoE backend: the lab image's `auto` resolves to MARLIN for
  82. # this quant; this image's `auto` resolves to a TileLang/deepgemm JIT
  83. # path that compiles 97 CUDA kernels AT BOOT (all cores, evicted the
  84. # kernel's own worker via OOM — dmesg 08:30, cicc/cudafe++ storms).
  85. # MARLIN = proven lab path, no JIT at boot.
  86. "--moe-backend", "marlin",
  87. # Proven day-0 boot: no flashinfer autotune, no CuTe-DSL warmup
  88. "--kernel-config", """
  89. '{"enable_cutedsl_warmup":false,"enable_flashinfer_autotune":false}'""",
  90. # DEVIATION from lab recipe: no MTP here. This image lacks the lab
  91. # image's FuijitsuPolycom modelopt-MTP namespace fix (boot dies at
  92. # layers.45.mtp_block.mlp.experts.routed_experts.w2_weight_scale —
  93. # verified 2026-08-30 on ds4). Spec layers are skipped entirely when
  94. # no spec config is set, so the base model loads clean.
  95. "--language-model-only",
  96. # Day-0 guard: on the lab image, graphs+MTP regressed tool quality. Keep
  97. # while unverified on this build; A/B if you want graphs.
  98. "--enforce-eager",
  99. "--tool-call-parser", "glm47",
  100. "--enable-auto-tool-choice",
  101. "--reasoning-parser", "glm45",
  102. ]
  103. [env]
  104. HF_HUB_OFFLINE = "1"
  105. # NoPE-MLA rope-pad runtime gate (baked into our lab image; no-op if this
  106. # image gates it differently — boot marker will tell)
  107. VLLM_MLA_NOPE_PAD_ROPE = "1"
  108. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  109. VLLM_NO_USAGE_STATS = "1"
  110. # Upstream launch-script env (memory + compile knobs)
  111. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  112. VLLM_USE_AOT_COMPILE = "0"
  113. TORCH_USE_RTLD_GLOBAL = "1"
  114. # Architecture (aarch64 / sm_121a DGX Spark)
  115. TORCH_CUDA_ARCH_LIST = "12.1a"
  116. FLASHINFER_CUDA_ARCH_LIST = "12.1f"
  117. CUTE_DSL_ARCH = "sm_121a"
  118. CMAKE_CUDA_ARCHITECTURES = "121"
  119. OMP_NUM_THREADS = "4"
  120. # NAS-backed HF cache (read-only use; HF writes nothing in offline mode).
  121. # Direct host path — NAS is mounted at /mnt/nas on every node; use
  122. # [mount_aliases] in config.toml when paths differ per site.
  123. [[extra_mounts]]
  124. host = "/mnt/nas/ai/huggingface"
  125. container = "/mnt/nas/ai/huggingface"
  126. env = "HF_HOME"
  127. # The image ships a CUDA 13 runtime WITHOUT dev headers (no nvrtc.h —
  128. # 105 headers total) and flashinfer's deepgemm JIT compiles at warmup with
  129. # nvcc -> "nvrtc.h: No such file or directory" (verified 2026-08-30 on
  130. # ds4). Bind the host's nvrtc.h through; it is an API-decl header, ABI-
  131. # independent of the 13.x minor in this image.
  132. [[extra_mounts]]
  133. host = "/usr/local/cuda/include/nvrtc.h"
  134. container = "/usr/local/cuda/include/nvrtc.h"
  135. read_only = true