recipe.toml 5.6 KB

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