recipe.toml 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # GLM-5.3-Flash on 4× DGX Spark — aidendle94 sparkrun image (TP=4). DEFERRED.
  2. #
  3. # aiden's production 4-node profile, verbatim translation of
  4. # https://aidenle.com/recipes/glm-5-3-flash-4x-dgx-spark into our 4x launcher
  5. # shape. Reference numbers (his, single stream, idle cluster, thinking off):
  6. # ~84 tok/s decode (FP8, DFlash2 k=7) — NVFP4 +23% (110.7 structured);
  7. # prefill ~2,100 cold; TTFT 4 s @ 8K → 40 s @ 94K; KV 2.25M tokens at 16 GiB
  8. # pin; 393K context verified. Decode flat with context (34/45 KDA layers +
  9. # 11 sparse-MLA @ index_topk 2048).
  10. #
  11. # DFlash2: acceptance 0.5–0.8; k=7 (drafter block 8 − 1 target token); k=6
  12. # wins prose, loses structured. Native MTP fallback (production-1.0 image or
  13. # spec omitted) optimum k=5. ~15 min full relaunch on FP8 (963 s measured).
  14. # FP8-MLA + DFlash2 combination is STRUCTURALLY broken upstream (three trees
  15. # fail differently) — hence plain fp8_e4m3 KV.
  16. #
  17. # NOT READY TO DEPLOY: needs a 4-node cluster (ds4 + 2nodes-dac freed) and the
  18. # unsloth/GLM-5.3-Flash-FP8 checkpoint (328 GB — background download running
  19. # on dgx3, /tmp/dl_fp8.log; ~340 GB free per node required for weights + Triton
  20. # cache). Fabric: RoCE dual-HCA NCCL profile comes from the launcher (config
  21. # [nccl.*] / GID auto-detect) — his NCCL_* env block intentionally omitted.
  22. # NOTE: his launcher unsets VLLM_PREFIX_CACHE_RETENTION_INTERVAL via bash -lc
  23. # before exec; if our boot rejects it in the KV coordinator, add a mods script.
  24. engine = "vllm"
  25. name = "GLM-5.3 (full) NVFP4-Spark, aiden image (vLLM, 4x Spark)"
  26. docker_image = "aidendle94/sparkrun-vllm-glm53-gb10:production-1.2"
  27. model = "local-inference-lab/GLM-5.3-NVFP4-Spark"
  28. required_nodes = 4
  29. tensor_parallel_size = 4
  30. pipeline_parallel_size = 1
  31. distributed_backend = "mp"
  32. shm_size = "32gb"
  33. # image ships ENTRYPOINT ["vllm","serve"]; our launcher passes the recipe
  34. # entrypoint as CMD words after the image, which would double it. Empty clears.
  35. entrypoint = []
  36. args = [
  37. "--served-model-name", "glm53",
  38. "--trust-remote-code",
  39. "--reasoning-parser", "glm45",
  40. "--tool-call-parser", "glm47",
  41. "--enable-auto-tool-choice",
  42. "--default-chat-template-kwargs", """
  43. '{"enable_thinking": true, "reasoning_effort": "high"}'""",
  44. "--kv-cache-dtype", "fp8_e4m3",
  45. "--block-size", "2304",
  46. "--moe-backend", "marlin",
  47. # full-model weights ~101.5 GiB/node (406G/4): 4 GiB KV pin, ~79K-token
  48. # pool (same sizing the lab image computed); 393K context won't fit
  49. "--max-model-len", "79616",
  50. "--max-num-batched-tokens", "8192",
  51. "--max-num-seqs", "16",
  52. "--enable-chunked-prefill",
  53. "--enforce-eager",
  54. "--gpu-memory-utilization", "0.85",
  55. "--kv-cache-memory-bytes", "4294967296",
  56. # no spec: the DFlash2 drafter is the Flash model's; full-model plain run
  57. "--language-model-only",
  58. # PARKED 2026-09-04 (user call: stop full-model experiments): the
  59. # MIXED_PRECISION full model loads clean on this image (85/85 shards),
  60. # but dgx2.lan went down TWICE mid-full-model-boot (once during the first
  61. # compile-OOM episode, once during the MAX_JOBS=2 retry's init phase —
  62. # whether node instability under this workload or coincidence is open).
  63. # Resume when: dgx2 proves stable under this load, and/or the JIT cache
  64. # is pre-built (extra_mounts below persist it) / the image ships
  65. # prebuilt sm121a mxfp8 gemm cubins.
  66. # image requests need the mm template shipped/in-wallpaper on aiden's rigs:
  67. # "--chat-template", "<path-to>/chat_template_mm.jinja",
  68. ]
  69. [env]
  70. HF_HUB_OFFLINE = "1"
  71. TRANSFORMERS_OFFLINE = "1"
  72. TORCH_USE_RTLD_GLOBAL = "1"
  73. TORCHINDUCTOR_COMPILE_THREADS = "1"
  74. CUTE_DSL_ARCH = "sm_121a"
  75. TORCH_CUDA_ARCH_LIST = "12.1a"
  76. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  77. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  78. VLLM_ALLOW_LONG_MAX_MODEL_LEN = "1"
  79. VLLM_NO_USAGE_STATS = "1"
  80. OMP_NUM_THREADS = "2"
  81. # Compile-OOM fix (2026-09-04): first boot of the MIXED_PRECISION checkpoint
  82. # JIT-compiles mxfp8_gemm_cutlass_sm120 (12 nvcc/cicc jobs, ~3 GB RSS each)
  83. # while 101.5 GiB of weights sit in unified memory -> cicc OOM-killed.
  84. # flashinfer's run_ninja reads MAX_JOBS and passes -j N: cap at 2.
  85. MAX_JOBS = "2"
  86. # Persistent JIT caches (containers run with --rm; without these every boot
  87. # re-runs the ~10 min nvcc compile of the mxfp8 gemm module)
  88. [[extra_mounts]]
  89. host = "~/.cache/glm53-full-flashinfer"
  90. container = "/root/.cache/flashinfer"
  91. [[extra_mounts]]
  92. host = "~/.cache/glm53-full-triton"
  93. container = "/root/.triton"