recipe.toml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # GLM-5.3-Flash (SGLang day-0) — 4× DGX Spark / GB10 (sm_121), TP=4.
  2. #
  3. # 320B-A18B native FP8, hybrid sparse + linear attention + mHC. First
  4. # natively multimodal GLM-5 (text + vision). No MTP/DFlash draft shipped —
  5. # plain decode until a drafter lands. Model:
  6. # https://huggingface.co/zai-org/GLM-5.3-Flash
  7. #
  8. # Engine: SGLang day-0 — no vLLM has glm5_next: local-inference-lab fork
  9. # idle since Aug 11; aidendle94 / eugr images all pre-release.
  10. #
  11. # Image: lmsysorg/sglang:glm-5.3-flash — multi-arch incl. arm64 (digest
  12. # sha256:989e2fff0…; re-verify at serve time). Day-0 = boots, not tuned.
  13. #
  14. # Memory: 305.8 GiB → 76.5 GiB/node on 4× Spark; ~43 GiB/node left for KV.
  15. # Sparse+linear attention keeps KV small, so long context should be feasible.
  16. #
  17. # PREREQUISITES:
  18. # Weights cached on every node (~/.cache/huggingface → NAS, 328 GB):
  19. # huggingface-cli download zai-org/GLM-5.3-Flash
  20. #
  21. # REFERENCE:
  22. # https://forums.developer.nvidia.com/t/glm-5-3-flash-320b-total-parameters-18b-active/381350
  23. engine = "sglang"
  24. name = "GLM-5.3-Flash (SGLang day-0)"
  25. docker_image = "lmsysorg/sglang:glm-5.3-flash"
  26. model = "zai-org/GLM-5.3-Flash"
  27. required_nodes = 4
  28. tensor_parallel_size = 4
  29. pipeline_parallel_size = 1
  30. distributed_backend = "mp"
  31. shm_size = "64gb"
  32. entrypoint = ["python3", "-m", "sglang.launch_server"]
  33. args = [
  34. # Memory — weights ~76.5 GiB of 119.6 GiB/node; KV gets the rest.
  35. "--mem-fraction-static", "0.87",
  36. "--max-running-requests", "10",
  37. # Context — 262K start; model card claims up to 1M, scale after measuring.
  38. "--max-model-len", "262144",
  39. # Attention / KV
  40. "--attention-backend", "flashinfer",
  41. "--kv-cache-dtype", "fp8_e4m3",
  42. # Chunked prefill
  43. "--chunked-prefill-size", "8192",
  44. # Compile + decode graphs
  45. "--enable-torch-compile", "--torch-compile-max-bs", "4",
  46. "--cuda-graph-max-bs-decode", "4",
  47. "--num-continuous-decode-steps", "2",
  48. # Tokenizer / reasoning / tool calling (GLM family; parser names carry
  49. # over from the vLLM glm52 recipes — verify they exist in this SGLang)
  50. "--reasoning-parser", "glm45",
  51. "--tool-call-parser", "glm47",
  52. # Observability
  53. "--enable-metrics",
  54. "--enable-cache-report",
  55. ]
  56. [env]
  57. # Offline — weights must be cached on each node
  58. HF_HUB_OFFLINE = "1"
  59. # Architecture
  60. TORCH_CUDA_ARCH_LIST = "12.1a"
  61. CUTE_DSL_ARCH = "sm_121a"
  62. OMP_NUM_THREADS = "4"