recipe.toml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # GLM-5.3-Flash on 4× DGX Spark — aiden image with the LAB's own DFlash2
  2. # drafter (local-inference-lab/GLM-5.3-Flash-DFlash2, 1.2 GB, on the shared
  3. # NAS HF) instead of incoai's — the competitive A/B the user asked for:
  4. # same image, same NVFP4 checkpoint, only the speculative model differs.
  5. # (This recipe = glm53-flash-aiden-4x with the drafter swapped.)
  6. #
  7. # aiden's production 4-node profile, verbatim translation of
  8. # https://aidenle.com/recipes/glm-5-3-flash-4x-dgx-spark into our 4x launcher
  9. # shape. Reference numbers (his, single stream, idle cluster, thinking off):
  10. # ~84 tok/s decode (FP8, DFlash2 k=7) — NVFP4 +23% (110.7 structured);
  11. # prefill ~2,100 cold; TTFT 4 s @ 8K → 40 s @ 94K; KV 2.25M tokens at 16 GiB
  12. # pin; 393K context verified. Decode flat with context (34/45 KDA layers +
  13. # 11 sparse-MLA @ index_topk 2048).
  14. #
  15. # DFlash2: acceptance 0.5–0.8; k=7 (drafter block 8 − 1 target token); k=6
  16. # wins prose, loses structured. Native MTP fallback (production-1.0 image or
  17. # spec omitted) optimum k=5. ~15 min full relaunch on FP8 (963 s measured).
  18. # FP8-MLA + DFlash2 combination is STRUCTURALLY broken upstream (three trees
  19. # fail differently) — hence plain fp8_e4m3 KV.
  20. #
  21. # NOT READY TO DEPLOY: needs a 4-node cluster (ds4 + 2nodes-dac freed) and the
  22. # unsloth/GLM-5.3-Flash-FP8 checkpoint (328 GB — background download running
  23. # on dgx3, /tmp/dl_fp8.log; ~340 GB free per node required for weights + Triton
  24. # cache). Fabric: RoCE dual-HCA NCCL profile comes from the launcher (config
  25. # [nccl.*] / GID auto-detect) — his NCCL_* env block intentionally omitted.
  26. # NOTE: his launcher unsets VLLM_PREFIX_CACHE_RETENTION_INTERVAL via bash -lc
  27. # before exec; if our boot rejects it in the KV coordinator, add a mods script.
  28. engine = "vllm"
  29. name = "GLM-5.3-Flash aiden image (vLLM, 4x Spark, LAB DFlash2-7, NVFP4)"
  30. docker_image = "aidendle94/sparkrun-vllm-glm53-gb10:production-1.1"
  31. model = "LibertAIDAI/GLM-5.3-Flash-NVFP4"
  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": "high"}'""",
  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":"local-inference-lab/GLM-5.3-Flash-DFlash2","num_speculative_tokens":7}'""",
  60. "--language-model-only",
  61. # image requests need the mm template shipped/in-wallpaper on aiden's rigs:
  62. # "--chat-template", "<path-to>/chat_template_mm.jinja",
  63. ]
  64. [env]
  65. HF_HUB_OFFLINE = "1"
  66. TRANSFORMERS_OFFLINE = "1"
  67. TORCH_USE_RTLD_GLOBAL = "1"
  68. TORCHINDUCTOR_COMPILE_THREADS = "1"
  69. CUTE_DSL_ARCH = "sm_121a"
  70. TORCH_CUDA_ARCH_LIST = "12.1a"
  71. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  72. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  73. VLLM_ALLOW_LONG_MAX_MODEL_LEN = "1"
  74. VLLM_NO_USAGE_STATS = "1"
  75. OMP_NUM_THREADS = "2"