recipe.toml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. # GLM-5.3-Flash NVFP4 — eugr B12X 4-node test variant (vLLM) — 4× DGX Spark, TP=4.
  2. #
  3. # Night-shift A/B cell of `glm53-flash-nvfp4-eugr` (the 2x recipe is the
  4. # PRODUCTION default — keep it until 4x delivers a dramatic improvement).
  5. # Same image/model/spec/flags as the 2x lane; only the cluster shape differs
  6. # (4 nodes, TP4, 16 seqs / 8192 batched / 16 GiB KV pin — eugr's stock 4x
  7. # shape, confirmed public at forums.developer.nvidia.com/t/381350/364:
  8. # ~60 tok/s c1, ~73 c4 decode on this exact config). Requires the 4nodes
  9. # cluster to be free (the day's aiden 4x serve stopped first).
  10. #
  11. # Port of eugr's dual-Spark recipe (eugr/spark-vllm-docker @ 94b3c30,
  12. # 2026-09-04, recipes/glm-5.3-flash.yaml) onto our launcher, on their
  13. # prebuilt image. A/B cell against our r18 fork build: same lab branch line
  14. # (dev/jovian-judgement) — their image = 09-04 tip + lukealonso/b12x master
  15. # + their patch set; our r18 pin = 09-05 tip + lab b12x + eugr-derived
  16. # patches. Compare quality (hardmode) + decode + TTFT before trusting either.
  17. #
  18. # Image: eugr/spark-vllm-b12x:nightly-20260904 (digest c3b44d3f…, = :latest).
  19. # Built from local-inference-lab/vllm dev/jovian-judgement (their e91bc76,
  20. # 2026-09-03, switched the ref from dev/infernal-invocation) +
  21. # lukealonso/b12x @ master; torch 2.13.0, CUDA 13.0.2,
  22. # nvidia-cutlass-dsl 4.7.0; their docker/patch_vllm_*.py set +
  23. # instanttensor + fastsafetensors; system-NCCL symlink fix. Exact b12x
  24. # commit baked in-image: /workspace/b12x-source-commit (+ build-metadata.yaml).
  25. # NOTE: the image ships NO ENTRYPOINT — this recipe must carry
  26. # entrypoint = ["vllm","serve"] (unlike the sparkrun/aiden images).
  27. #
  28. # Model: local-inference-lab/GLM-5.3-Flash-NVFP4-Spark (their recipe's model —
  29. # NOT the GLM-5.3-NVFP4-Spark repo the aiden lane uses). ~180 GB class:
  30. # huggingface-cli download on BOTH nodes before the first serve
  31. # (HF_HUB_OFFLINE=1 below).
  32. #
  33. # What this lane tests (vs our r17/r18 findings):
  34. # - FULL b12x cluster: --attention-backend B12X + --moe-backend b12x +
  35. # --linear-backend b12x. On our r17 image, --linear-backend b12x was THE
  36. # quality TOXIN (44/100 hardmode). Their 09-04 b12x predates the SM121
  37. # A16-precision commits, so the answer is open — measure, don't trust.
  38. # - RoCEnante one-shot RoCE collectives: VLLM_ENABLE_ROCE_ALLREDUCE=1
  39. # (their vllm #597 / b12x #295 pair; −5–19% decode per-step,
  40. # +15–23% c16 measured on 4× Spark TP4).
  41. # - MTP k=5 with drafter moe_backend=humming + B12X attention (vendor-card
  42. # parity), AOT=1 + MEGA_AOT=1 + V2 runner, mamba-cache-mode align,
  43. # instanttensor buffered loader, prefix caching ON (we run prefix-cache
  44. # off elsewhere — perf-relevant, not quality-relevant).
  45. #
  46. # Deliberate parity deviations from our house lanes:
  47. # - NO --language-model-only (their recipe loads the vision tower; add the
  48. # flag only if memory is tight)
  49. # - --kv-cache-dtype fp8 (plain), not fp8_ds_mla
  50. # - no --decode-context-parallel-size (their DCP=1 is the default; no-op)
  51. # - NCCL/cluster env comes from the launcher (their NCCL_* block omitted)
  52. #
  53. # REFERENCE:
  54. # https://github.com/eugr/spark-vllm-docker (recipes/glm-5.3-flash.yaml)
  55. # https://hub.docker.com/r/eugr/spark-vllm-b12x/tags
  56. # https://forums.developer.nvidia.com/t/381350/364 — public confirmation of
  57. # this flag set (2026-09-05, tea24864 on 4x/TP4, perf-only: ~60 tok/s c1,
  58. # ~73 c4 decode, prefill 2.3-2.8k tok/s) + the DFlash2 alternative spec
  59. # ("method":"dflash" + "incoai/GLM-5.3-Flash-DFlash2" drafter, k=7, see
  60. # night queue 3b)
  61. engine = "vllm"
  62. name = "GLM-5.3-Flash NVFP4 eugr B12X 4x (vLLM, 4x Spark, MTP k=5, RoCE)"
  63. docker_image = "eugr/spark-vllm-b12x:nightly-20260904"
  64. model = "local-inference-lab/GLM-5.3-Flash-NVFP4-Spark"
  65. parent_model = "zai-org/GLM-5.3-Flash"
  66. required_nodes = 4
  67. tensor_parallel_size = 4
  68. pipeline_parallel_size = 1
  69. distributed_backend = "mp"
  70. shm_size = "32gb"
  71. # image ships no ENTRYPOINT — the launcher supplies the vllm command
  72. entrypoint = ["vllm", "serve"]
  73. args = [
  74. # Stable served name — quant-agnostic (shared across glm53 quants)
  75. "--served-model-name", "glm53",
  76. "--trust-remote-code",
  77. "--distributed-executor-backend", "mp",
  78. # eugr parity: FULL b12x cluster (linear-b12x = the r17 quality toxin —
  79. # measure before trusting)
  80. "--attention-backend", "B12X",
  81. "--moe-backend", "b12x",
  82. "--linear-backend", "b12x",
  83. "--mamba-cache-mode", "align",
  84. "--enable-prefix-caching",
  85. "--enable-chunked-prefill",
  86. "--dtype", "bfloat16",
  87. "--kv-cache-dtype", "fp8",
  88. "--quantization", "modelopt_mixed",
  89. "--no-enable-flashinfer-autotune",
  90. "--load-format", "instanttensor",
  91. "--model-loader-extra-config", """
  92. '{"instanttensor_copy":false}'""",
  93. "--block-size", "256",
  94. "--max-model-len", "1048576",
  95. "--max-num-seqs", "16",
  96. "--max-num-batched-tokens", "8192",
  97. # sparkring MTP3-mesh reference (DCP4 probe, night queue 1b): DCP4 +
  98. # 24 GiB fp8 KV/rank gave ~4.32M logical KV tokens on 4 Sparks. Flip the
  99. # next line ON for the DCP4 cell (stock vLLM flag, verified in our tree;
  100. # DCP>1 requires MLA — GLM53 qualifies). Keep OFF for the plain 4x cell.
  101. # "--decode-context-parallel-size", "4",
  102. # MTP k=5 (eugr recipe / vendor card); drafter on humming MoE + B12X attn
  103. "--speculative-config", """
  104. '{"method":"mtp","num_speculative_tokens":5,"moe_backend":"humming","attention_backend":"B12X"}'""",
  105. "--reasoning-parser", "glm45",
  106. "--tool-call-parser", "glm47",
  107. "--enable-auto-tool-choice",
  108. "--kv-cache-memory-bytes", "17179869184",
  109. "--gpu-memory-utilization", "0.87",
  110. ]
  111. [env]
  112. HF_HUB_OFFLINE = "1"
  113. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  114. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  115. CUTE_DSL_ARCH = "sm_121a"
  116. SAFETENSORS_FAST_GPU = "1"
  117. # RoCEnante one-shot RoCE collectives (ON in eugr's recipe; off-by-default flag)
  118. VLLM_ENABLE_ROCE_ALLREDUCE = "1"
  119. VLLM_ROCE_ALLREDUCE_MAX_SIZE = "2MB"
  120. VLLM_ENABLE_PCIE_ALLREDUCE = "0"
  121. VLLM_WORKER_MULTIPROC_METHOD = "spawn"
  122. VLLM_SSM_CONV_STATE_LAYOUT = "DS"
  123. VLLM_USE_AOT_COMPILE = "1"
  124. VLLM_USE_MEGA_AOT_ARTIFACT = "1"
  125. VLLM_USE_V2_MODEL_RUNNER = "1"
  126. B12X_POLICY_MODE = "auto"
  127. # instanttensor buffered loader (eugr's defaults)
  128. INSTANTTENSOR_BACKEND = "BUFFERED"
  129. INSTANTTENSOR_BUFFER_SIZE = "67108864"
  130. INSTANTTENSOR_CHUNK_SIZE = "8388608"
  131. INSTANTTENSOR_CONCURRENCY = "1"
  132. INSTANTTENSOR_IO_DEPTH = "3"