recipe.toml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. # GLM-5.3 (full, NATIVE zai-org FP8) + DSpark K8 speculator — 8x @64K.
  2. #
  3. # The operator's "whole model" lane (2026-09-18 night): NOT the RedHatAI
  4. # MXFP4 quant — the original `zai-org/GLM-5.3` checkpoint (753.3 GB, FP8
  5. # e4m3 block-128, 141 shards, already on the NAS: blobs 704 GB, refs/main
  6. # aca966e4). Same glm_moe_dsa architecture as the GLM-5.2 lane (the
  7. # operator's read: the architecture did not change between 5.2 and 5.3),
  8. # so the Aiden GLM image family carries it.
  9. #
  10. # Image: aidendle94/sparkrun-vllm-glm53-gb10:production-1.2 (31.2 GB,
  11. # Aiden's GLM-5.2/5.3 production stack — the "aiden 5.2" image). Verified
  12. # in-image (2026-09-18): vLLM dev20051+g487ecf187 has both the
  13. # DSparkDraftModel speculators loader (config/speculative.py +
  14. # models/registry.py) and the glm_moe_dsa path
  15. # (models/deepseek_v32/nvidia/model.py). Their DFlash2 drafter runs on
  16. # this image WITHOUT the r37 workarounds (no skip-layers flag, no draft
  17. # page patch) -> the shared-cache-contamination bug is absent from this
  18. # tree, so the 4x-dspark8 r37 workarounds are NOT ported.
  19. #
  20. # Loader (operator call): the standard safetensors loader
  21. # (`--load-format auto`), NOT InstantTensor. InstantTensor streams the
  22. # WHOLE checkpoint per rank (~750 GB/rank over the 10G NFS mgmt NIC,
  23. # ~90-100 min); the standard loader reads each rank's TP slices
  24. # (page-cache shared) and the dspark38 Aiden precedent already runs on
  25. # `auto`.
  26. #
  27. # Memory math (121.63 GiB/node): weights 753.3/8 = 94.2 GB/node;
  28. # GMU 0.85 -> 111.0 GB budget; 111.0 - 94.2 - ~10 (process) = ~6.8 GB KV.
  29. # 64K request = 3.45 GB/rank (52.7 KB/token) -> ~1.9x; 96K = 5.1 GB ->
  30. # ~1.3x; 512K (26.3 GB) DOES NOT FIT — physical limit, hence
  31. # max-model-len 65536 (the lab r34 doc's qualified Model limit; their
  32. # GMU 0.97/0.98 numbers are RTX 6000 (96 GB, smaller baseline reservation)
  33. # and do not pass the GB10 admission check — measured free 108.78 GiB).
  34. #
  35. # Speculator: RedHatAI/GLM-5.3-speculator.dspark (2.3 GB, NAS snapshot
  36. # 198b3ced) at K8, `method: dspark` — the same drafter as the 4x dspark8
  37. # lane (that one on the r37 image; here on Aiden's tree, DSpark support
  38. # verified in-image).
  39. #
  40. # Contract mirrors the proven Aiden precedents on this image family:
  41. # glm53-flash-aiden-2x (same image, DFlash2: kv fp8_e4m3, moe-backend
  42. # marlin, block 2304, no --attention-backend — the image routes B12X
  43. # natively) + deepseek-v4-flash-dspark38 (DSpark + CUDA graphs without
  44. # enforce-eager, --load-format auto, block 256) + the r34 doc's scheduler
  45. # bounds (seqs 8, batched tokens 2048).
  46. engine = "vllm"
  47. name = "GLM-5.3 (full native FP8) + DSpark K8 (aiden prod-1.2 img, zai-org ckpt, 8x @64K)"
  48. docker_image = "aidendle94/sparkrun-vllm-glm53-gb10:production-1.2"
  49. entrypoint = []
  50. model = "zai-org/GLM-5.3"
  51. parent_model = "zai-org/GLM-5.3"
  52. required_nodes = 8
  53. tensor_parallel_size = 8
  54. pipeline_parallel_size = 1
  55. distributed_backend = "mp"
  56. shm_size = "32gb"
  57. args = [
  58. # Stable served name — quant-agnostic (shared across glm53 lanes)
  59. "--served-model-name", "glm53",
  60. "--trust-remote-code",
  61. "--reasoning-parser", "glm45",
  62. "--tool-call-parser", "glm47",
  63. "--enable-auto-tool-choice",
  64. "--default-chat-template-kwargs", """
  65. '{"enable_thinking": true, "reasoning_effort": "high"}'""",
  66. # Aiden-image-proven spellings (glm53-flash-aiden-2x baseline):
  67. "--kv-cache-dtype", "fp8_e4m3",
  68. "--moe-backend", "marlin",
  69. # the plain safetensors loader (operator call 2026-09-18): InstantTensor
  70. # streams the WHOLE checkpoint per rank (~704 GB/rank at 130 MB/s = ~90
  71. # min, and it hung in the first Aiden boot); `auto` on this image =
  72. # InstantTensor (verified in the boot log), so the format is spelled
  73. # explicitly. The standard loader reads each rank's TP slices with mmap
  74. # (page-cache shared) — per-node NFS traffic ≈ the model, not 8x it.
  75. "--load-format", "safetensors",
  76. # block 256 (dspark38 precedent; the baseline's 2304 is an NVFP4-Flash
  77. # knob)
  78. "--block-size", "256",
  79. # No KV pin: the pool is GMU-driven (~6.8 GB, see header).
  80. "--max-model-len", "65536",
  81. "--max-num-seqs", "8",
  82. "--max-num-batched-tokens", "2048",
  83. "--enable-chunked-prefill",
  84. "--enable-prefix-caching",
  85. "--gpu-memory-utilization", "0.85",
  86. # DSpark K8 speculator (RedHatAI/GLM-5.3-speculator.dspark, 2.3 GB, in
  87. # the shared HF cache; HF_HUB_OFFLINE=1 resolves it there).
  88. "--speculative-config", """
  89. '{"model":"RedHatAI/GLM-5.3-speculator.dspark","num_speculative_tokens":8,"method":"dspark"}'""",
  90. "--language-model-only",
  91. ]
  92. [env]
  93. HF_HUB_OFFLINE = "1"
  94. TRANSFORMERS_OFFLINE = "1"
  95. TORCH_USE_RTLD_GLOBAL = "1"
  96. TORCHINDUCTOR_COMPILE_THREADS = "1"
  97. CUTE_DSL_ARCH = "sm_121a"
  98. TORCH_CUDA_ARCH_LIST = "12.1a"
  99. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  100. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  101. VLLM_NO_USAGE_STATS = "1"
  102. OMP_NUM_THREADS = "2"
  103. # Compile-OOM guard (cold /root/.cache compiles behind 94 GB of resident
  104. # weights; the JIT mounts below keep it warm after the first boot).
  105. MAX_JOBS = "2"
  106. # JIT caches persist per-node across serves (cold /root/.cache -> ~20 min
  107. # recompile every serve). The host dirs are shared between lanes of the
  108. # same arch — each cache self-namespaces by its engine version internally.
  109. [[extra_mounts]]
  110. host = "~/sm121-cache/glm53-jit-121f/b12x"
  111. container = "/root/.cache/b12x"
  112. [[extra_mounts]]
  113. host = "~/sm121-cache/jit-121f/flashinfer"
  114. container = "/root/.cache/flashinfer"
  115. [[extra_mounts]]
  116. host = "~/sm121-cache/jit-121f/torchinductor"
  117. container = "/root/.cache/torchinductor"
  118. [[extra_mounts]]
  119. host = "~/sm121-cache/jit-121f/vllm"
  120. container = "/root/.cache/vllm"