recipe.toml 6.1 KB

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