recipe.toml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # GLM-5.2 QuantTrio Int4-Int8Mix — 4× DGX Spark / GB10 (sm_121), TP=4.
  2. #
  3. # EXPERIMENT: Using aidendle94/sparkrun-vllm-ds4-gb10:production-hybrid-1.6
  4. # instead of locally-built sparkrun-vllm-ds4-gb10:glm52.
  5. # Pre-built on Docker Hub with CUDA 13.2.1, custom NCCL, b12x suite.
  6. #
  7. # Model: QuantTrio/GLM-5.2-Int4-Int8Mix (mixed Int4/Int8, 10% expert-pruned)
  8. # → https://huggingface.co/QuantTrio/GLM-5.2-Int4-Int8Mix
  9. # Includes in-checkpoint MTP draft model.
  10. #
  11. # PREREQUISITES:
  12. # - Weights cached on every node:
  13. # huggingface-cli download QuantTrio/GLM-5.2-Int4-Int8Mix
  14. #
  15. # REFERENCE:
  16. # https://forums.developer.nvidia.com/t/glm-5-2-int4-int8-on-8x-gb10-1200-t-s-prefill-33-54-t-s-avg-decode-generic-coding-structured/376831
  17. # https://github.com/ciprianveg/gb10-glm-5.2
  18. engine = "vllm"
  19. name = "GLM-5.2 Int4-Int8Mix (vLLM, DS4 image)"
  20. docker_image = "aidendle94/sparkrun-vllm-ds4-gb10:production-hybrid-1.6"
  21. model = "QuantTrio/GLM-5.2-Int4-Int8Mix"
  22. required_nodes = 4
  23. tensor_parallel_size = 4
  24. pipeline_parallel_size = 1
  25. distributed_backend = "mp"
  26. shm_size = "64gb"
  27. # docker_image_dir = "glm52" # removed for experiment
  28. entrypoint = ["vllm", "serve"]
  29. args = [
  30. # KV cache & memory
  31. "--kv-cache-dtype", "fp8",
  32. "--max-model-len", "150000",
  33. "--max-num-seqs", "1",
  34. "--max-num-batched-tokens", "4096",
  35. "--gpu-memory-utilization", "0.91",
  36. # Engine backends
  37. "--attention-backend", "B12X_MLA_SPARSE",
  38. "--moe-backend", "b12x",
  39. # Compilation
  40. "--compilation-config", """
  41. '{"cudagraph_mode":"FULL_AND_PIECEWISE","custom_ops":["all"]}'""",
  42. # Chunked prefill + prefix caching
  43. "--enable-chunked-prefill",
  44. "--enable-prefix-caching",
  45. "--enable-flashinfer-autotune",
  46. # MTP speculative decoding (in-checkpoint draft model)
  47. # "--speculative-config", """
  48. #'{"method":"mtp","num_speculative_tokens":4,"moe_backend":"b12x","draft_sample_method":"probabilistic"}'""",
  49. # Tokenizer / reasoning (GLM-5.2 family)
  50. "--tool-call-parser", "glm47",
  51. "--reasoning-parser", "glm45",
  52. "--enable-auto-tool-choice",
  53. "--trust-remote-code",
  54. "--served-model-name", "glm52",
  55. ]
  56. [env]
  57. # b12x suite (image requires this)
  58. VLLM_USE_B12X_MOE = "1"
  59. VLLM_USE_B12X_MHC = "1"
  60. VLLM_USE_B12X_WO_PROJECTION = "1"
  61. VLLM_USE_B12X_FP8_GEMM = "1"
  62. VLLM_USE_B12X_SPARSE_INDEXER = "1"
  63. VLLM_USE_V2_MODEL_RUNNER = "1"
  64. VLLM_USE_FLASHINFER_SAMPLER = "1"
  65. VLLM_USE_AOT_COMPILE = "1"
  66. VLLM_USE_MEGA_AOT_ARTIFACT = "0"
  67. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  68. VLLM_MEMORY_PROFILE_INCLUDE_ATTN = "1"
  69. B12X_MLA_SM120_UNIFIED = "1"
  70. B12X_DENSE_SPLITK_TURBO = "1"
  71. B12X_W4A16_TC_DECODE = "1"
  72. B12X_MHC_MAX_TOKENS = "16384"
  73. # GLM-5.2 support flags
  74. VLLM_ALLOW_LONG_MAX_MODEL_LEN = "1"
  75. VLLM_SPARSE_INDEXER_MAX_LOGITS_MB = "256"
  76. # Timeout safety net for cold boot (cudagraph + JIT)
  77. VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS = "1800"
  78. # Offline mode — weights must be cached on each node
  79. HF_HUB_OFFLINE = "1"
  80. # Architecture
  81. TORCH_CUDA_ARCH_LIST = "12.1a"
  82. CUTE_DSL_ARCH = "sm_121a"
  83. OMP_NUM_THREADS = "4"
  84. # GPU memory management
  85. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  86. # NCCL overrides
  87. NCCL_CROSS_NIC = "1"
  88. NCCL_CUMEM_ENABLE = "0"
  89. NCCL_IGNORE_CPU_AFFINITY = "1"
  90. NCCL_DEBUG = "WARN"
  91. # PCIe allreduce not needed on GB10 single-NIC
  92. VLLM_ENABLE_PCIE_ALLREDUCE = "0"
  93. VLLM_PCIE_ALLREDUCE_BACKEND = "cpp"
  94. # GPU device isolation
  95. CUDA_VISIBLE_DEVICES = "0"
  96. CUDA_DEVICE_ORDER = "PCI_BUS_ID"
  97. CUDA_CACHE_MAXSIZE = "4294967296"