recipe.toml 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # GLM-5.3-Flash on 4× DGX Spark — aidendle94 sparkrun image (TP=4).
  2. # 2026-09-07: retargeted at production-1.2 (hub, parity with the 159 2x lane);
  3. # zai-org FP8 weights (306 G) now cached in the NAS hub — the old DEFERRED
  4. # blocker (pending 328 GB download) is gone. All 4 nodes free (pluto switch).
  5. #
  6. # aiden's production 4-node profile, verbatim translation of
  7. # https://aidenle.com/recipes/glm-5-3-flash-4x-dgx-spark into our 4x launcher
  8. # shape. Reference numbers (his, single stream, idle cluster, thinking off):
  9. # ~84 tok/s decode (FP8, DFlash2 k=7) — NVFP4 +23% (110.7 structured);
  10. # prefill ~2,100 cold; TTFT 4 s @ 8K → 40 s @ 94K; KV 2.25M tokens at 16 GiB
  11. # pin; 393K context verified. Decode flat with context (34/45 KDA layers +
  12. # 11 sparse-MLA @ index_topk 2048).
  13. #
  14. # DFlash2: acceptance 0.5–0.8; k=7 (drafter block 8 − 1 target token); k=6
  15. # wins prose, loses structured. Native MTP fallback (production-1.0 image or
  16. # spec omitted) optimum k=5. ~15 min full relaunch on FP8 (963 s measured).
  17. # FP8-MLA + DFlash2 combination is STRUCTURALLY broken upstream (three trees
  18. # fail differently) — hence plain fp8_e4m3 KV.
  19. #
  20. # NOT READY TO DEPLOY: needs a 4-node cluster (ds4 + 2nodes-dac freed) and the
  21. # unsloth/GLM-5.3-Flash-FP8 checkpoint (328 GB — background download running
  22. # on dgx3, /tmp/dl_fp8.log; ~340 GB free per node required for weights + Triton
  23. # cache). Fabric: RoCE dual-HCA NCCL profile comes from the launcher (config
  24. # [nccl.*] / GID auto-detect) — his NCCL_* env block intentionally omitted.
  25. # NOTE: his launcher unsets VLLM_PREFIX_CACHE_RETENTION_INTERVAL via bash -lc
  26. # before exec; if our boot rejects it in the KV coordinator, add a mods script.
  27. engine = "vllm"
  28. name = "GLM-5.3-Flash aiden image (vLLM, 4x Spark, MTP-5, FP8)"
  29. docker_image = "sparkrun-vllm-glm53-flash-aiden:glm53" # production-1.2 + instanttensor (docker-images/glm53-flash-aiden/)
  30. docker_image_dir = "glm53-flash-aiden"
  31. model = "zai-org/GLM-5.3-Flash"
  32. required_nodes = 4
  33. tensor_parallel_size = 4
  34. pipeline_parallel_size = 1
  35. distributed_backend = "mp"
  36. shm_size = "32gb"
  37. # image ships ENTRYPOINT ["vllm","serve"]; our launcher passes the recipe
  38. # entrypoint as CMD words after the image, which would double it. Empty clears.
  39. entrypoint = []
  40. args = [
  41. "--served-model-name", "glm53",
  42. "--trust-remote-code",
  43. "--reasoning-parser", "glm45",
  44. "--tool-call-parser", "glm47",
  45. "--enable-auto-tool-choice",
  46. "--default-chat-template-kwargs", """
  47. '{"enable_thinking": true, "reasoning_effort": "max"}'""",
  48. "--kv-cache-dtype", "fp8_e4m3",
  49. "--block-size", "2304",
  50. "--moe-backend", "marlin",
  51. "--max-model-len", "393216",
  52. "--max-num-batched-tokens", "8192",
  53. "--max-num-seqs", "16",
  54. "--enable-chunked-prefill",
  55. "--enforce-eager",
  56. "--gpu-memory-utilization", "0.85",
  57. "--kv-cache-memory-bytes", "17179869184",
  58. # "--speculative-config", """
  59. #'{"method":"dflash","model":"incoai/GLM-5.3-Flash-DFlash2","num_speculative_tokens":7}'""",
  60. "--speculative-config", """
  61. '{"method":"mtp","num_speculative_tokens":5}'""",
  62. # instanttensor comes from our extension layer (base image lacks it)
  63. "--load-format", "instanttensor",
  64. "--language-model-only",
  65. # image requests need the mm template shipped/in-wallpaper on aiden's rigs:
  66. # "--chat-template", "<path-to>/chat_template_mm.jinja",
  67. ]
  68. [env]
  69. HF_HUB_OFFLINE = "1"
  70. TRANSFORMERS_OFFLINE = "1"
  71. TORCH_USE_RTLD_GLOBAL = "1"
  72. TORCHINDUCTOR_COMPILE_THREADS = "1"
  73. CUTE_DSL_ARCH = "sm_121a"
  74. TORCH_CUDA_ARCH_LIST = "12.1a"
  75. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  76. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  77. VLLM_ALLOW_LONG_MAX_MODEL_LEN = "1"
  78. VLLM_NO_USAGE_STATS = "1"
  79. OMP_NUM_THREADS = "2"