recipe.toml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # GLM-5.3-Flash NVFP4 — local-inference-lab quant (vLLM) — 2× DGX Spark, TP=2.
  2. #
  3. # local-inference-lab's mixed-precision quant: main MoE experts NVFP4
  4. # (group-16), MTP layer-45 routed experts in MXFP8, W4A4 input scales
  5. # included. tool-eval-bench 89/100 (vs 85 LibertAIDAI, 90 official FP8) —
  6. # best quant for agents so far.
  7. # Model: https://huggingface.co/local-inference-lab/GLM-5.3-Flash-NVFP4
  8. # (~186 GB → ~93 GB/node on 2 Sparks; GMU 0.85 = ~101 GiB budget)
  9. #
  10. # Image: shared glm53-flash-nvfp4:local overlay (day-0 vLLM image + the
  11. # NoPE-MLA / sm120 sparse-MLA mod). Rebuilt from docker-images/glm53-flash-nvfp4/.
  12. #
  13. # ⚠ KNOWN DAY-0 ISSUE (forum 381350 #41): vLLM needs a small `modelopt.py`
  14. # fix for THIS quant — the MTP weights are stored under
  15. # `language_model.model.layers.45.*` while the quant config lists
  16. # `model.language_model.layers.45.*`, so the drafter's scale lookup misses.
  17. # Until the fix is vendored into the overlay (as patch part 5), a boot with
  18. # --speculative-config may fail at MTP weight load. Fallback: comment the
  19. # speculative-config line → clean baseline serve (~15 tok/s class).
  20. #
  21. # GB10 gotchas handled here (same as glm53-flash-nvfp4 / LibertAIDAI):
  22. # --moe-backend marlin (silent FP4 MoE corruption fix)
  23. # VLLM_ENGINE_READY_TIMEOUT_S (60-min FlashInfer autotune is not a hang)
  24. # --language-model-only (vision front-end OOM-kills on GB10)
  25. #
  26. # PREREQUISITES: weights cached on both nodes:
  27. # huggingface-cli download local-inference-lab/GLM-5.3-Flash-NVFP4
  28. #
  29. # REFERENCE:
  30. # https://forums.developer.nvidia.com/t/glm-5-3-flash-320b-total-parameters-18b-active/381350/41
  31. # https://github.com/kingjones30/GLM-5.3-Flash-2x-DGX-Spark (mod + base config)
  32. engine = "vllm"
  33. name = "GLM-5.3-Flash NVFP4-lab (vLLM, 2x Spark)"
  34. docker_image = "glm53-flash-nvfp4:local"
  35. docker_image_dir = "glm53-flash-nvfp4"
  36. model = "local-inference-lab/GLM-5.3-Flash-NVFP4"
  37. required_nodes = 2
  38. tensor_parallel_size = 2
  39. pipeline_parallel_size = 1
  40. distributed_backend = "mp"
  41. shm_size = "32gb"
  42. args = [
  43. # Stable served name — quant-agnostic (shared across glm53 quants)
  44. "--served-model-name", "glm53",
  45. "--trust-remote-code",
  46. "--distributed-executor-backend", "mp",
  47. # ~93 GiB weights/node of 119.6 GiB; drop to 0.83 or 262144→131072 if the
  48. # UMA MemFree gate (vLLM #48140) refuses boot
  49. "--gpu-memory-utilization", "0.85",
  50. "--max-model-len", "262144",
  51. "--max-num-seqs", "1",
  52. "--kv-cache-dtype", "fp8_ds_mla",
  53. "--language-model-only",
  54. "--moe-backend", "marlin",
  55. # MTP-5 — REQUIRES the modelopt.py prefix fix (header). Remove if load aborts.
  56. "--speculative-config", """
  57. '{"method":"mtp","num_speculative_tokens":5}'""",
  58. "--tool-call-parser", "glm47",
  59. "--enable-auto-tool-choice",
  60. "--reasoning-parser", "glm45",
  61. ]
  62. [env]
  63. HF_HUB_OFFLINE = "1"
  64. # Activates the NoPE-MLA rope-pad mod baked into the image
  65. VLLM_MLA_NOPE_PAD_ROPE = "1"
  66. # FlashInfer autotune can legitimately loop 60+ min on first boot
  67. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  68. TORCH_CUDA_ARCH_LIST = "12.1a"
  69. CUTE_DSL_ARCH = "sm_121a"
  70. OMP_NUM_THREADS = "4"