|
@@ -1,39 +1,52 @@
|
|
|
# GLM-5.3-Flash NVFP4 — local-inference-lab quant (vLLM) — 2× DGX Spark, TP=2.
|
|
# GLM-5.3-Flash NVFP4 — local-inference-lab quant (vLLM) — 2× DGX Spark, TP=2.
|
|
|
#
|
|
#
|
|
|
-# local-inference-lab's mixed-precision quant: main MoE experts NVFP4
|
|
|
|
|
-# (group-16), MTP layer-45 routed experts in MXFP8, W4A4 input scales
|
|
|
|
|
-# included. tool-eval-bench 89/100 (vs 85 LibertAIDAI, 90 official FP8) —
|
|
|
|
|
-# best quant for agents so far.
|
|
|
|
|
|
|
+# local-inference-lab mixed quant: NVFP4 routed experts (layers 3–44,
|
|
|
|
|
+# group-16) + MXFP8 MTP experts (layer 45) + W4A4 input scales. Best agent
|
|
|
|
|
+# quant so far: tool-eval-bench 89/100 (vs 85 LibertAIDAI, 90 official FP8).
|
|
|
# Model: https://huggingface.co/local-inference-lab/GLM-5.3-Flash-NVFP4
|
|
# Model: https://huggingface.co/local-inference-lab/GLM-5.3-Flash-NVFP4
|
|
|
-# (~186 GB → ~93 GB/node on 2 Sparks; GMU 0.85 = ~101 GiB budget)
|
|
|
|
|
|
|
+# (~186 GB → 92.72 GiB weights/node; KV pinned at 10 GiB, see below)
|
|
|
#
|
|
#
|
|
|
-# Image: shared glm53-flash-nvfp4:local overlay (day-0 vLLM image + the
|
|
|
|
|
-# NoPE-MLA / sm120 sparse-MLA mod). Rebuilt from docker-images/glm53-flash-nvfp4/.
|
|
|
|
|
|
|
+# Image: glm53-flash-nvfp4-lab:local (docker-images/glm53-flash-nvfp4-lab/ —
|
|
|
|
|
+# day-0 arm64 image + NoPE-MLA mod + the four FujitsuPolycom lab-checkpoint
|
|
|
|
|
+# patches: model naming shim, modelopt MTP namespace fix, persistent_topk
|
|
|
|
|
+# CC-12.x guards). Their launch config is mirrored below.
|
|
|
|
|
+# PROVENANCE: https://github.com/FujitsuPolycom/glm53-flash-tp2-spark
|
|
|
|
|
+# (Apache-2.0; see patches/UPSTREAM.md) + forum 381350 #41.
|
|
|
#
|
|
#
|
|
|
-# ⚠ KNOWN DAY-0 ISSUE (forum 381350 #41): vLLM needs a small `modelopt.py`
|
|
|
|
|
-# fix for THIS quant — the MTP weights are stored under
|
|
|
|
|
-# `language_model.model.layers.45.*` while the quant config lists
|
|
|
|
|
-# `model.language_model.layers.45.*`, so the drafter's scale lookup misses.
|
|
|
|
|
-# Until the fix is vendored into the overlay (as patch part 5), a boot with
|
|
|
|
|
-# --speculative-config may fail at MTP weight load. Fallback: comment the
|
|
|
|
|
-# speculative-config line → clean baseline serve (~15 tok/s class).
|
|
|
|
|
|
|
+# Deviations from their launch script (intentional):
|
|
|
|
|
+# * no --kda-prefill-backend flashkda (needs their base-image patch — skipped)
|
|
|
|
|
+# * --kv-cache-dtype fp8_ds_mla instead of `fp8` (same packed layout; this
|
|
|
|
|
+# spelling is what the NoPE-MLA mod booted with on the LibertAIDAI stack)
|
|
|
|
|
+# * --language-model-only + no mm-renderer patch/env (text-only)
|
|
|
|
|
+# * no bundled NCCL/LD_PRELOAD, no NCCL_* fabric block (our switched fabric
|
|
|
|
|
+# is configured via [nccl.ds4] + launcher GID auto-detect)
|
|
|
|
|
+# * no --moe-backend marlin: their proven stack uses the default backend for
|
|
|
|
|
+# THIS quant and reports clean evals. Sanity-check output for token loops
|
|
|
|
|
+# anyway (the silent FP4 MoE corruption gotcha) before trusting a new node.
|
|
|
|
|
+# * flashinfer autotune disabled via --kernel-config (their proven boot);
|
|
|
|
|
+# VLLM_ENGINE_READY_TIMEOUT_S stays high regardless.
|
|
|
#
|
|
#
|
|
|
-# GB10 gotchas handled here (same as glm53-flash-nvfp4 / LibertAIDAI):
|
|
|
|
|
-# --moe-backend marlin (silent FP4 MoE corruption fix)
|
|
|
|
|
-# VLLM_ENGINE_READY_TIMEOUT_S (60-min FlashInfer autotune is not a hang)
|
|
|
|
|
-# --language-model-only (vision front-end OOM-kills on GB10)
|
|
|
|
|
|
|
+# Boot success markers (engine log, in order):
|
|
|
|
|
+# "Model loading took 92.72 GiB" → "[quantprobe] ... algo=MXFP8" (MTP fix
|
|
|
|
|
+# active; algo=None means broken) → "GPU KV cache size: 1,164,369 tokens" →
|
|
|
|
|
+# "Application startup complete". ~700 s sequential weight load.
|
|
|
#
|
|
#
|
|
|
-# PREREQUISITES: weights cached on both nodes:
|
|
|
|
|
-# huggingface-cli download local-inference-lab/GLM-5.3-Flash-NVFP4
|
|
|
|
|
|
|
+# Test request: chat completions need "chat_template_kwargs":{"reasoning_effort"
|
|
|
|
|
+# :"low"} — omitted/other values select MAX reasoning effort (empty content on
|
|
|
|
|
+# short max_tokens).
|
|
|
|
|
+#
|
|
|
|
|
+# Optional: instanttensor loader (~30 s weight load vs ~700 s):
|
|
|
|
|
+# FROM glm53-flash-nvfp4-lab:local + pip install --no-deps --no-build-isolation
|
|
|
|
|
+# instanttensor==0.1.9, then add --load-format instanttensor (--no-deps is
|
|
|
|
|
+# required: resolution would downgrade the image's NCCL).
|
|
|
#
|
|
#
|
|
|
-# REFERENCE:
|
|
|
|
|
-# https://forums.developer.nvidia.com/t/glm-5-3-flash-320b-total-parameters-18b-active/381350/41
|
|
|
|
|
-# https://github.com/kingjones30/GLM-5.3-Flash-2x-DGX-Spark (mod + base config)
|
|
|
|
|
|
|
+# PREREQUISITES: weights cached on both nodes:
|
|
|
|
|
+# hf download local-inference-lab/GLM-5.3-Flash-NVFP4
|
|
|
|
|
|
|
|
engine = "vllm"
|
|
engine = "vllm"
|
|
|
-name = "GLM-5.3-Flash NVFP4-lab (vLLM, 2x Spark)"
|
|
|
|
|
-docker_image = "glm53-flash-nvfp4:local"
|
|
|
|
|
-docker_image_dir = "glm53-flash-nvfp4"
|
|
|
|
|
|
|
+name = "GLM-5.3-Flash NVFP4-lab (vLLM, 2x Spark, MTP-3)"
|
|
|
|
|
+docker_image = "glm53-flash-nvfp4-lab:local"
|
|
|
|
|
+docker_image_dir = "glm53-flash-nvfp4-lab"
|
|
|
model = "local-inference-lab/GLM-5.3-Flash-NVFP4"
|
|
model = "local-inference-lab/GLM-5.3-Flash-NVFP4"
|
|
|
required_nodes = 2
|
|
required_nodes = 2
|
|
|
tensor_parallel_size = 2
|
|
tensor_parallel_size = 2
|
|
@@ -46,17 +59,27 @@ args = [
|
|
|
"--served-model-name", "glm53",
|
|
"--served-model-name", "glm53",
|
|
|
"--trust-remote-code",
|
|
"--trust-remote-code",
|
|
|
"--distributed-executor-backend", "mp",
|
|
"--distributed-executor-backend", "mp",
|
|
|
- # ~93 GiB weights/node of 119.6 GiB; drop to 0.83 or 262144→131072 if the
|
|
|
|
|
- # UMA MemFree gate (vLLM #48140) refuses boot
|
|
|
|
|
- "--gpu-memory-utilization", "0.85",
|
|
|
|
|
- "--max-model-len", "262144",
|
|
|
|
|
- "--max-num-seqs", "1",
|
|
|
|
|
|
|
+ # GMU is superseded by the pinned KV pool; 0.90 as upstream boots with it
|
|
|
|
|
+ "--gpu-memory-utilization", "0.90",
|
|
|
|
|
+ # Pinned 10 GiB KV (≈1.16M tokens) — GMU sizing has no headroom at
|
|
|
|
|
+ # 92.72 GiB weights/node; pinning also keeps warmup off the swap path
|
|
|
|
|
+ "--kv-cache-memory-bytes", "10737418240",
|
|
|
"--kv-cache-dtype", "fp8_ds_mla",
|
|
"--kv-cache-dtype", "fp8_ds_mla",
|
|
|
- "--language-model-only",
|
|
|
|
|
- "--moe-backend", "marlin",
|
|
|
|
|
- # MTP-5 — REQUIRES the modelopt.py prefix fix (header). Remove if load aborts.
|
|
|
|
|
|
|
+ "--block-size", "256",
|
|
|
|
|
+ "--max-model-len", "524288",
|
|
|
|
|
+ "--max-num-seqs", "8",
|
|
|
|
|
+ "--max-num-batched-tokens", "4096",
|
|
|
|
|
+ "--enable-chunked-prefill",
|
|
|
|
|
+ "--async-scheduling",
|
|
|
|
|
+ "--enable-prefix-caching",
|
|
|
|
|
+ "--disable-custom-all-reduce",
|
|
|
|
|
+ # Their proven boot: no flashinfer autotune, no CuTe-DSL warmup
|
|
|
|
|
+ "--kernel-config", """
|
|
|
|
|
+'{"enable_cutedsl_warmup":false,"enable_flashinfer_autotune":false}'""",
|
|
|
|
|
+ # MTP-3 draft from the MXFP8 layer-45 shard (needs modelopt.patch in image)
|
|
|
"--speculative-config", """
|
|
"--speculative-config", """
|
|
|
-'{"method":"mtp","num_speculative_tokens":5}'""",
|
|
|
|
|
|
|
+'{"method":"mtp","num_speculative_tokens":3}'""",
|
|
|
|
|
+ "--language-model-only",
|
|
|
"--tool-call-parser", "glm47",
|
|
"--tool-call-parser", "glm47",
|
|
|
"--enable-auto-tool-choice",
|
|
"--enable-auto-tool-choice",
|
|
|
"--reasoning-parser", "glm45",
|
|
"--reasoning-parser", "glm45",
|
|
@@ -64,11 +87,18 @@ args = [
|
|
|
|
|
|
|
|
[env]
|
|
[env]
|
|
|
HF_HUB_OFFLINE = "1"
|
|
HF_HUB_OFFLINE = "1"
|
|
|
-# Activates the NoPE-MLA rope-pad mod baked into the image
|
|
|
|
|
|
|
+# NoPE-MLA rope-pad runtime gate (mod baked into the image)
|
|
|
VLLM_MLA_NOPE_PAD_ROPE = "1"
|
|
VLLM_MLA_NOPE_PAD_ROPE = "1"
|
|
|
-# FlashInfer autotune can legitimately loop 60+ min on first boot
|
|
|
|
|
VLLM_ENGINE_READY_TIMEOUT_S = "3600"
|
|
VLLM_ENGINE_READY_TIMEOUT_S = "3600"
|
|
|
|
|
+# Upstream launch-script env (memory + compile knobs)
|
|
|
|
|
+PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
|
|
|
|
|
+VLLM_USE_AOT_COMPILE = "0"
|
|
|
|
|
+TORCH_USE_RTLD_GLOBAL = "1"
|
|
|
|
|
+VLLM_NO_USAGE_STATS = "1"
|
|
|
|
|
|
|
|
|
|
+# Architecture (aarch64 / sm_121a DGX Spark)
|
|
|
TORCH_CUDA_ARCH_LIST = "12.1a"
|
|
TORCH_CUDA_ARCH_LIST = "12.1a"
|
|
|
|
|
+FLASHINFER_CUDA_ARCH_LIST = "12.1f"
|
|
|
CUTE_DSL_ARCH = "sm_121a"
|
|
CUTE_DSL_ARCH = "sm_121a"
|
|
|
|
|
+CMAKE_CUDA_ARCHITECTURES = "121"
|
|
|
OMP_NUM_THREADS = "4"
|
|
OMP_NUM_THREADS = "4"
|