recipe.toml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. required_nodes = 2
  45. tensor_parallel_size = 2
  46. pipeline_parallel_size = 1
  47. distributed_backend = "mp"
  48. shm_size = "32gb"
  49. args = [
  50. # Stable served name — quant-agnostic (shared across glm53 quants)
  51. "--served-model-name", "glm53",
  52. "--trust-remote-code",
  53. # AutoRound int4 pack → GPTQ-style safetensors; explicit quant route (the
  54. # timothystewart6 upstream-stack build knows quant_method auto-round).
  55. "--quantization", "gptq_marlin",
  56. # Required for the head-512 MLA layers on sm_12x: the auto-selection
  57. # list (TRITON_MLA / FLASHINFER_MLA_SPARSE_SM120) has no backend that
  58. # fits GLM's 512 (SM120 flashinfer supports head 576 only).
  59. "--attention-backend", "B12X",
  60. "--distributed-executor-backend", "mp",
  61. # GMU is ONLY a startup guardrail (KV pool is pinned below): 0.90
  62. # flaked boots on GB10 ("Free memory ... less than desired") because
  63. # driver reserve + page cache leave ~106-109 GiB free of 121.63.
  64. # 0.82 = 99.7 GiB, below any realistic dip; changes nothing allocated.
  65. "--gpu-memory-utilization", "0.82",
  66. "--kv-cache-memory-bytes", "10737418240",
  67. # DEVIATION from lab: plain fp8 KV (this image's mla cache kernel asserts
  68. # "pe_dim must be 64 for fp8_ds_mla" — its NoPE handling differs from the
  69. # lab image's rope-pad mod; plain fp8 is what the vendor GLM-5.3 recipe
  70. # uses and doesn't assert pe layout).
  71. "--kv-cache-dtype", "fp8",
  72. "--block-size", "256",
  73. "--max-model-len", "524288",
  74. "--max-num-seqs", "8",
  75. "--max-num-batched-tokens", "4096",
  76. "--enable-chunked-prefill",
  77. "--async-scheduling",
  78. "--enable-prefix-caching",
  79. "--disable-custom-all-reduce",
  80. # Pin the MoE backend: the lab image's `auto` resolves to MARLIN for
  81. # this quant; this image's `auto` resolves to a TileLang/deepgemm JIT
  82. # path that compiles 97 CUDA kernels AT BOOT (all cores, evicted the
  83. # kernel's own worker via OOM — dmesg 08:30, cicc/cudafe++ storms).
  84. # MARLIN = proven lab path, no JIT at boot.
  85. "--moe-backend", "marlin",
  86. # Proven day-0 boot: no flashinfer autotune, no CuTe-DSL warmup
  87. "--kernel-config", """
  88. '{"enable_cutedsl_warmup":false,"enable_flashinfer_autotune":false}'""",
  89. # DEVIATION from lab recipe: no MTP here. This image lacks the lab
  90. # image's FuijitsuPolycom modelopt-MTP namespace fix (boot dies at
  91. # layers.45.mtp_block.mlp.experts.routed_experts.w2_weight_scale —
  92. # verified 2026-08-30 on ds4). Spec layers are skipped entirely when
  93. # no spec config is set, so the base model loads clean.
  94. "--language-model-only",
  95. # Day-0 guard: on the lab image, graphs+MTP regressed tool quality. Keep
  96. # while unverified on this build; A/B if you want graphs.
  97. "--enforce-eager",
  98. "--tool-call-parser", "glm47",
  99. "--enable-auto-tool-choice",
  100. "--reasoning-parser", "glm45",
  101. ]
  102. [env]
  103. HF_HUB_OFFLINE = "1"
  104. # NoPE-MLA rope-pad runtime gate (baked into our lab image; no-op if this
  105. # image gates it differently — boot marker will tell)
  106. VLLM_MLA_NOPE_PAD_ROPE = "1"
  107. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  108. VLLM_NO_USAGE_STATS = "1"
  109. # Upstream launch-script env (memory + compile knobs)
  110. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  111. VLLM_USE_AOT_COMPILE = "0"
  112. TORCH_USE_RTLD_GLOBAL = "1"
  113. # Architecture (aarch64 / sm_121a DGX Spark)
  114. TORCH_CUDA_ARCH_LIST = "12.1a"
  115. FLASHINFER_CUDA_ARCH_LIST = "12.1f"
  116. CUTE_DSL_ARCH = "sm_121a"
  117. CMAKE_CUDA_ARCHITECTURES = "121"
  118. OMP_NUM_THREADS = "4"
  119. # NAS-backed HF cache (read-only use; HF writes nothing in offline mode).
  120. # Direct host path — NAS is mounted at /mnt/nas on every node; use
  121. # [mount_aliases] in config.toml when paths differ per site.
  122. [[extra_mounts]]
  123. host = "/mnt/nas/ai/huggingface"
  124. container = "/mnt/nas/ai/huggingface"
  125. env = "HF_HOME"
  126. # The image ships a CUDA 13 runtime WITHOUT dev headers (no nvrtc.h —
  127. # 105 headers total) and flashinfer's deepgemm JIT compiles at warmup with
  128. # nvcc -> "nvrtc.h: No such file or directory" (verified 2026-08-30 on
  129. # ds4). Bind the host's nvrtc.h through; it is an API-decl header, ABI-
  130. # independent of the 13.x minor in this image.
  131. [[extra_mounts]]
  132. host = "/usr/local/cuda/include/nvrtc.h"
  133. container = "/usr/local/cuda/include/nvrtc.h"
  134. read_only = true