recipe.toml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. # SparkRing shared image (ghcr.io/fujitsupolycom/sparkring, digest-pinned)
  2. # — the sparkring TP2 profile `glm53-flash-spark-tp2-mtp3` from
  3. # runtime/profiles/glm53-flash-spark-tp2 (profile.json), adapted to sm121:
  4. # structural flags (--tp/--pp/--nnodes/--node-rank/--master-addr/--master-port/
  5. # --host/--port) come from the launcher; everything else is the profile's.
  6. # Model: local-inference-lab/GLM-5.3-Flash-NVFP4-Spark @ df116c4f (already in
  7. # the shared HF cache; mounted at /models/target as the profile expects).
  8. # Transport: the image ships the RoCEnante TP2 transport bundle; our DAC pair
  9. # is on the f1 HCA pair (rocep1s0f1, roceP2p1s0f1), which the launcher
  10. # injects via NCCL_IB_HCA from the 2nodes-dac [nccl] block.
  11. engine = "vllm"
  12. name = "GLM-5.3-Flash NVFP4-Spark (SparkRing shared img, TP2 RoCEnante profile)"
  13. docker_image = "ghcr.io/fujitsupolycom/sparkring:glm53-shared-8b32ef2" # prebuilt (no docker_image_dir); the 4774a7c5 memory-guard build (2026-09-11 re-run)
  14. model = "local-inference-lab/GLM-5.3-Flash-NVFP4-Spark"
  15. parent_model = "zai-org/GLM-5.3-Flash"
  16. required_nodes = 2
  17. tensor_parallel_size = 2
  18. pipeline_parallel_size = 1
  19. distributed_backend = "mp"
  20. args = [
  21. "--decode-context-parallel-size", "1",
  22. "--mamba-cache-mode", "align",
  23. "--enable-prefix-caching",
  24. "--enable-chunked-prefill",
  25. "--dtype", "bfloat16",
  26. "--attention-backend", "B12X",
  27. "--moe-backend", "b12x",
  28. "--no-enable-flashinfer-autotune",
  29. "--reasoning-parser", "glm45",
  30. "--tool-call-parser", "glm47",
  31. "--enable-auto-tool-choice",
  32. "--served-model-name", "GLM-5.3-Flash-NVFP4-Spark",
  33. "--max-model-len", "262144",
  34. "--max-num-seqs", "8",
  35. "--max-num-batched-tokens", "8192",
  36. "--prefill-schedule-interval", "8",
  37. "--prefix-cache-retention-interval", "0",
  38. "--recurrent-checkpoint-policy", "aligned",
  39. "--block-size", "256",
  40. "--kv-cache-memory-bytes", "9395240960",
  41. "--kv-cache-dtype", "fp8",
  42. "--mm-processor-cache-gb", "0",
  43. "--mm-encoder-tp-mode", "data",
  44. "--linear-backend", "b12x",
  45. "--quantization", "modelopt_mixed",
  46. "--kda-prefill-backend", "b12x",
  47. "--gdn-decode-kernel", "b12x",
  48. "--generation-config", "auto",
  49. "--load-format", "b12x",
  50. "--model-loader-extra-config", "{\"allocation\":\"managed\"}",
  51. "--gpu-memory-utilization", "0.87",
  52. "--speculative-config", "{\"method\": \"mtp\", \"num_speculative_tokens\": 3, \"moe_backend\": \"humming\", \"attention_backend\": \"B12X\"}",
  53. "--compilation-config", "{\"mode\":0,\"cudagraph_mode\":\"FULL_AND_PIECEWISE\",\"cudagraph_capture_sizes\":[1,2,4,8,12,16,20,24,28,32],\"max_cudagraph_capture_size\":32}",
  54. "--limit-mm-per-prompt", "{\"image\": 4, \"video\": 0}",
  55. ]
  56. [env]
  57. B12X_POLICY_MODE = "auto"
  58. CUDA_DEVICE_MAX_CONNECTIONS = "32"
  59. CUDA_DEVICE_ORDER = "PCI_BUS_ID"
  60. CUTE_DSL_ARCH = "sm_121a"
  61. FLASHINFER_CUDA_ARCH_LIST = "12.1f"
  62. FLASHINFER_DISABLE_VERSION_CHECK = "1"
  63. HF_HUB_OFFLINE = "1"
  64. NCCL_CUMEM_ENABLE = "0"
  65. NCCL_DEBUG = "WARN"
  66. NCCL_IB_EXTENDED_IPV4_GIDS = "1"
  67. NCCL_IB_GID_INDEX = "3"
  68. NCCL_IB_PRESERVE_PCI_DOMAIN = "1"
  69. NCCL_IB_ROUTE_DIAGNOSTICS = "1"
  70. NCCL_IB_SUBNET_AWARE_ROUTING = "0"
  71. NCCL_LOCAL_INFERENCE_PATH = "/opt/sparkring/nccl-pci/libnccl.so.2.30.7"
  72. NCCL_NET = "IB"
  73. NCCL_NET_PLUGIN = "none"
  74. NCCL_P2P_LEVEL = "SYS"
  75. NCCL_PROTO = "LL,LL128,Simple"
  76. OMP_NUM_THREADS = "2"
  77. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  78. TORCH_USE_RTLD_GLOBAL = "1"
  79. TRANSFORMERS_OFFLINE = "1"
  80. VLLM_B12X_KDA_PREFILL_COALESCING = "1"
  81. VLLM_B12X_MOE_FP4_FORCE_A16 = "0"
  82. VLLM_ENABLE_PCIE_ALLREDUCE = "0"
  83. VLLM_GDN_SPEC_DECODE_METADATA_FASTPATH = "1"
  84. VLLM_GLM53_KDA_GATE_SIDE_STREAM = "0"
  85. VLLM_GLM53_MHC_PREFILL_SHARD = "1"
  86. VLLM_GLM53_SPLIT_MAMBA_BLOCK_SIZE = "256"
  87. VLLM_GLM53_SPLIT_TARGET_BLOCK_SIZE = "2048"
  88. VLLM_LM_HEAD_A16 = "1"
  89. VLLM_MEMORY_PROFILE_INCLUDE_ATTN = "1"
  90. VLLM_MEMORY_PROFILER_ESTIMATE_CUDAGRAPHS = "1"
  91. VLLM_MTP_NVFP4_LM_HEAD = "1"
  92. VLLM_MXFP8_LM_HEAD = "1"
  93. VLLM_NO_USAGE_STATS = "1"
  94. VLLM_NCCL_SO_PATH = "/opt/sparkring/nccl-pci/libnccl.so.2.30.7"
  95. VLLM_PLUGINS = "b12x_loader"
  96. VLLM_WORKER_MULTIPROC_METHOD = "spawn"
  97. VLLM_DISABLED_KERNELS = "MarlinFP8ScaledMMLinearKernel"
  98. PYTHONDONTWRITEBYTECODE = "1"
  99. # New image (8b32ef2/4774a7c5): b12x loader JIT-compiles its native module at
  100. # first boot; the linker needs the CUDA lib path (the old image prebaked it).
  101. # The build is cached in B12X_CACHE_DIR — persisted per node via the mount below.
  102. CUDA_HOME = "/usr/local/cuda"
  103. LIBRARY_PATH = "/usr/local/cuda/lib64"
  104. B12X_CACHE_DIR = "/root/.cache/b12x"
  105. LD_PRELOAD = "/opt/sparkring/nccl-pci/libnccl.so.2.30.7"
  106. # The serve-with-warmup wrapper polls the API at 127.0.0.1:$PORT — the value
  107. # resolves from the recipe's `port` field, so the two can't drift apart.
  108. PORT = { from = "port" }
  109. SERVED_MODEL_NAME = "GLM-5.3-Flash-NVFP4-Spark"
  110. DFLASH_WARMUP = "1"
  111. DFLASH_WARMUP_CONCURRENCIES = "1"
  112. DFLASH_WARMUP_SHAPE_WORDS = "8"
  113. DFLASH_WARMUP_MAX_TOKENS = "16"
  114. DFLASH_WARMUP_TIMEOUT_SECONDS = "1800"
  115. SPARKRING_LIVENESS_ENABLED = "1"
  116. SPARKRING_LIVENESS_PORT = "8001"
  117. # b12x JIT build cache (persists the first-boot native compile)
  118. [[extra_mounts]]
  119. host = "~/sm121-cache/jit-121f/sparkring-b12x"
  120. container = "/root/.cache/b12x"