recipe.toml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # NVIDIA GLM-5.3-Flash-FP4-Local — official NVFP4 (QAD) GLM-5.3-Flash, 2x DGX Spark.
  2. # Source: model card https://huggingface.co/nvidia/GLM-5.3-Flash-FP4-Local
  3. # ("2 x NVIDIA DGX Spark" section, transcribed). Quantized with nvidia-modelopt
  4. # v0.47.0 via quantization-aware distillation (QAD). NVFP4 routed experts
  5. # (E2M1 + E4M3 block scales + FP32 global scale). 2M tokens FP8 KV on 2x Spark.
  6. #
  7. # CRITICAL: the NVFP4 scale factors use a NEW lossless-compression format that
  8. # upstream vLLM does NOT yet support — MUST run on eugr/spark-vllm-b12x (b12x
  9. # backend + --load-format b12x). Digest-pinned (arm64, built 2026-10-15).
  10. # This is the official NVFP4 counterpart to our kindling 2x lane (our own r35
  11. # build) — a direct A/B vs the 95/100 kindling anchor.
  12. #
  13. # The launcher supplies the NCCL/socket/IB env from the cluster config
  14. # (NCCL_IB_HCA, NCCL_SOCKET_IFNAME, MN_IF_NAME, UCX_NET_DEVICES, GLOO/TP_SOCKET,
  15. # NCCL_IB_DISABLE, master addr/port). Only the b12x + RoCE-allreduce + AOT env
  16. # from the card's "both nodes" block is added here.
  17. engine = "vllm"
  18. name = "GLM-5.3-Flash-FP4-Local (2x Spark, NVFP4 QAD, MTP n5)"
  19. docker_image = "eugr/spark-vllm-b12x@sha256:03a956544e9f9b4b7ba91690469fbe7848bdbef29a7d2e0f5788368467bb3595"
  20. entrypoint = ["vllm", "serve"]
  21. model = "nvidia/GLM-5.3-Flash-FP4-Local"
  22. parent_model = "zai-org/GLM-5.3-Flash"
  23. port = 30000
  24. required_nodes = 2
  25. tensor_parallel_size = 2
  26. args = [
  27. "--served-model-name", "glm53-fp4-local",
  28. "--dtype", "bfloat16",
  29. "--mamba-cache-mode", "align",
  30. "--enable-prefix-caching",
  31. "--enable-chunked-prefill",
  32. "--kv-cache-dtype", "fp8",
  33. "--quantization", "modelopt_mixed",
  34. "--attention-backend", "B12X",
  35. "--block-size", "256",
  36. "--moe-backend", "b12x",
  37. "--linear-backend", "b12x",
  38. "--no-enable-flashinfer-autotune",
  39. "--load-format", "b12x",
  40. "--max-model-len", "500000",
  41. "--max-num-seqs", "4",
  42. "--max-num-batched-tokens", "4096",
  43. "--reasoning-parser", "glm45",
  44. "--tool-call-parser", "glm47",
  45. "--enable-auto-tool-choice",
  46. "--gpu-memory-utilization", "0.87",
  47. "--speculative-config", """
  48. '{"method":"mtp","num_speculative_tokens":5,"moe_backend":"humming","attention_backend":"B12X"}'""",
  49. ]
  50. [env]
  51. # b12x MoE/FP4 path (card "both nodes" block)
  52. CUTE_DSL_ARCH = "sm_121a"
  53. SAFETENSORS_FAST_GPU = "1"
  54. B12X_POLICY_MODE = "auto"
  55. VLLM_B12X_MOE_FP4_FORCE_A16 = "1"
  56. B12X_W4A16_A4_PREFILL = "1"
  57. # RoCE allreduce + NCCL tuning (card)
  58. VLLM_ENABLE_ROCE_ALLREDUCE = "1"
  59. VLLM_ROCE_ALLREDUCE_MAX_SIZE = "2MB"
  60. NCCL_BUFFSIZE = "1048576"
  61. NCCL_MAX_CTAS = "8"
  62. VLLM_ENABLE_PCIE_ALLREDUCE = "0"
  63. # vLLM runner / compile flags (card)
  64. VLLM_WORKER_MULTIPROC_METHOD = "spawn"
  65. VLLM_SSM_CONV_STATE_LAYOUT = "DS"
  66. VLLM_USE_AOT_COMPILE = "1"
  67. VLLM_USE_MEGA_AOT_ARTIFACT = "1"
  68. VLLM_USE_V2_MODEL_RUNNER = "1"
  69. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  70. # JIT / AOT / b12x-autotune caches the card mounts on every node (speeds boot +
  71. # re-serve; docker creates the host dir if missing). Card: mkdir -p + mount.
  72. [[extra_mounts]]
  73. host = "~/.cache/vllm"
  74. container = "/root/.cache/vllm"
  75. [[extra_mounts]]
  76. host = "~/.cache/flashinfer"
  77. container = "/root/.cache/flashinfer"
  78. [[extra_mounts]]
  79. host = "~/.triton"
  80. container = "/root/.triton"
  81. [[extra_mounts]]
  82. host = "~/.cache/b12x"
  83. container = "/root/.cache/b12x"