recipe.toml 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # GLM-5.3-Flash NVFP4 — RedHatAI quant (vLLM) — 2× DGX Spark, TP=2.
  2. #
  3. # RedHatAI/LLM-Compressor quant: MoE experts W4A4 NVFP4 (group-16, local
  4. # per-group FP8 scales, compressed-tensors nvfp4-pack-quantized). Vision /
  5. # embeddings / lm_head kept original precision. Quantizes via regex targets,
  6. # so no name-prefix matching bugs.
  7. # Model: https://huggingface.co/RedHatAI/GLM-5.3-Flash-NVFP4
  8. # (~177 GB → ~88 GB/node on 2 Sparks)
  9. # KV: pinned --kv-cache-memory-bytes 10 GiB (same as -lab, identical MLA
  10. # geometry) → ~1.16 M-token pool @ fp8_ds_mla = 2.22× concurrency at the
  11. # 524288 ctx. GMU 0.90 matches the proven lab config; the pin overrides
  12. # GMU-based KV sizing.
  13. #
  14. # ⚠ NO MTP DRAFTER IN THIS CHECKPOINT — the index has 146,745 tensors and
  15. # zero layer-45/MTP weights. `--speculative-config mtp` WILL fail to load.
  16. # This recipe is baseline decode only (~15 tok/s class on this arch —
  17. # spec decode buys 1.3–2×; use glm53-flash-nvfp4[-lab] when MTP matters).
  18. #
  19. # Image: the -lab overlay (day-0 vLLM image + NoPE-MLA mod + FujitsuPolycom
  20. # arch patches). The sparse_attn_indexer CC-12.0 guards are REQUIRED at the
  21. # 512K ctx: at 262K the indexer topk fit 48 SMs, at 512K it wants 62 CTAs and
  22. # the fallback needs 128 KB smem (GB10 has 99 KB) → hard boot abort
  23. # (launch_persistent_topk oversubscribe, 2026-08-28). The patches are
  24. # arch-level, not quant-level: the modelopt quantprobe is a no-op for this
  25. # compressed-tensors checkpoint, the model.py naming shim anchors on
  26. # arch-internal names.
  27. #
  28. # GB10 gotchas handled (see glm53-flash-nvfp4 header for detail):
  29. # --moe-backend marlin → if vLLM rejects marlin for W4A4 at startup (marlin
  30. # is mainly W4A16), remove the flag — but then verify output is not
  31. # token-loop garbage (the silent FLASHINFER_CUTLASS corruption) before
  32. # trusting it; `--moe-backend triton` is the other candidate.
  33. #
  34. # GB10 gotcha (MEASURED): at 524288 ctx WITH flashinfer autotune on, rank 0
  35. # dies mid-boot on a driver OOM (NVRM NV_ERR_NO_MEMORY _memdescAllocInternal,
  36. # 2026-08-28 05:01) — autotune/graph scratch at the 512K verify shapes doesn't
  37. # fit the unified-memory headroom. The 262144 ctx + autotune combo booted
  38. # fine. Fix = the lab-proven boot: autotune + cutedsl warmup off (a perf
  39. # micro-opt only; the sparse-MLA kernels have a non-autotuned fallback) and
  40. # expandable_segments to cut fragmentation.
  41. #
  42. # PREREQUISITES: weights cached on both nodes:
  43. # huggingface-cli download RedHatAI/GLM-5.3-Flash-NVFP4
  44. #
  45. # REFERENCE:
  46. # https://huggingface.co/RedHatAI/GLM-5.3-Flash-NVFP4 (vendor vLLM cmd)
  47. # https://github.com/kingjones30/GLM-5.3-Flash-2x-DGX-Spark (mod)
  48. engine = "vllm"
  49. name = "GLM-5.3-Flash NVFP4-redhat (vLLM, 2x Spark, no MTP)"
  50. docker_image = "glm53-flash-nvfp4-lab:local"
  51. docker_image_dir = "glm53-flash-nvfp4-lab"
  52. model = "RedHatAI/GLM-5.3-Flash-NVFP4"
  53. required_nodes = 2
  54. tensor_parallel_size = 2
  55. pipeline_parallel_size = 1
  56. distributed_backend = "mp"
  57. shm_size = "32gb"
  58. args = [
  59. # Stable served name — quant-agnostic (shared across glm53 quants)
  60. "--served-model-name", "glm53",
  61. "--trust-remote-code",
  62. "--distributed-executor-backend", "mp",
  63. # GMU is ONLY a startup guardrail here (KV pool is pinned below): 0.90
  64. # demands 109.46 GiB free on GB10's 121.63 GiB, but driver reserve +
  65. # page cache routinely leave ~108.5 (and ~106.6 after a crashed boot)
  66. # -> flaky "Free memory ... less than desired" boot deaths. 0.82 is
  67. # below any realistic dip and does NOT change what gets allocated.
  68. "--gpu-memory-utilization", "0.82",
  69. "--kv-cache-memory-bytes", "10737418240",
  70. "--max-model-len", "524288",
  71. # Scan/graph scratch scales with the prefill chunk: 8192 OOMs the driver
  72. # at 512K ctx (05:38 NVRM OOM), 4096 is the lab-proven ceiling here.
  73. "--max-num-batched-tokens", "4096",
  74. "--block-size", "256",
  75. "--max-num-seqs", "1",
  76. "--kv-cache-dtype", "fp8_ds_mla",
  77. "--language-model-only",
  78. "--moe-backend", "marlin",
  79. # NO --speculative-config: checkpoint ships no MTP weights (verified index)
  80. "--tool-call-parser", "glm47",
  81. "--enable-auto-tool-choice",
  82. "--reasoning-parser", "glm45",
  83. "--kernel-config", """
  84. '{"enable_cutedsl_warmup":false,"enable_flashinfer_autotune":false}'""",
  85. ]
  86. [env]
  87. HF_HUB_OFFLINE = "1"
  88. VLLM_MLA_NOPE_PAD_ROPE = "1"
  89. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  90. TORCH_CUDA_ARCH_LIST = "12.1a"
  91. CUTE_DSL_ARCH = "sm_121a"
  92. OMP_NUM_THREADS = "4"
  93. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"