recipe.toml 5.1 KB

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