recipe.toml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Qwen3.8-Flash-Next-FP8 (vLLM expert-parallel) — 2× DGX Spark / GB10 (sm_121), TP=2.
  2. #
  3. # Official FP8 quant of the Qwen4-architecture preview (176B total / 6B
  4. # active, GDN + QSA hybrid MoE, 512 experts, 51B n-gram "engram" PLE table,
  5. # in-checkpoint MTP). Text + vision. Native 262144 ctx.
  6. #
  7. # WHY vLLM + expert-parallel: the stock vLLM MoE path shards each expert's
  8. # intermediate by TP, and this FP8 checkpoint (weight_block_size=[128,128],
  9. # moe_intermediate_size=640) violates (intermediate/tp) % block_n == 0 at
  10. # tp=2 -> boot crash. --enable-expert-parallel splits the 512 *experts*
  11. # across the ranks instead (256 each, full 640-wide intermediate), so the
  12. # divisibility rule never fires. This is the verified 2× Spark FP8 path.
  13. #
  14. # Image: vllm/vllm-openai:qwen38-flash-next — vLLM's day-0 model tag (arm64).
  15. #
  16. # Model: Qwen/Qwen3.8-Flash-Next-FP8 (~186 GB)
  17. # https://huggingface.co/Qwen/Qwen3.8-Flash-Next-FP8
  18. #
  19. # REFERENCE (provenance — verified ~30-45 tok/s on 2× Sparks):
  20. # https://forums.developer.nvidia.com/t/qwen3-8-flash-next/381228/97 (foogitiff)
  21. # answers #106 / #113 (m-emm): ENFORCE_EAGER=1, disable MM, MTP=3 -> ~45 tok/s
  22. #
  23. # NOTE: day-0 config. foogitiff's base boots; m-emm's ENFORCE_EAGER + no-MM
  24. # gives the better throughput. Expect to tune max-num-seqs / mm limits.
  25. engine = "vllm"
  26. name = "Qwen3.8-Flash-Next FP8 (vLLM expert-parallel, 2x Spark)"
  27. docker_image = "vllm/vllm-openai:qwen38-flash-next"
  28. model = "Qwen/Qwen3.8-Flash-Next-FP8"
  29. required_nodes = 2
  30. tensor_parallel_size = 2
  31. pipeline_parallel_size = 1
  32. distributed_backend = "mp"
  33. shm_size = "32gb"
  34. entrypoint = ["vllm", "serve"]
  35. args = [
  36. # Stable served name — quant-agnostic, shared with qwen38-flash-next-nvfp4
  37. "--served-model-name", "qwen3.8-flash-next",
  38. # Expert parallelism — the fix for the FP8 MoE block-divisibility crash
  39. "--distributed-executor-backend", "mp",
  40. "--enable-expert-parallel",
  41. "--all2all-backend", "allgather_reducescatter",
  42. # Weight loading (no fastsafetensors day-0; lazy strategy keeps boot sane)
  43. "--load-format", "safetensors",
  44. "--safetensors-load-strategy", "lazy",
  45. # Context / batching (verified; raise max-num-seqs once stable)
  46. "--max-model-len", "262144",
  47. "--max-num-seqs", "1",
  48. "--max-num-batched-tokens", "8192",
  49. "--gpu-memory-utilization", "0.83",
  50. "--enable-chunked-prefill",
  51. # MTP speculative decoding (in-checkpoint draft)
  52. "--speculative-config", """
  53. '{"method":"mtp","num_speculative_tokens":3}'""",
  54. "--compilation-config", """
  55. '{"mode":0,"cudagraph_mode":"FULL_DECODE_ONLY"}'""",
  56. # Tokenizer / reasoning / tools (Qwen3 family)
  57. "--reasoning-parser", "qwen3",
  58. "--enable-auto-tool-choice",
  59. "--tool-call-parser", "qwen3_coder",
  60. # m-emm perf (post #113): disable multimodal to save VRAM/bandwidth
  61. "--limit-mm-per-prompt", """
  62. '{"image":0,"video":0}'""",
  63. ]
  64. [env]
  65. # Offline — weights must be cached on each node
  66. HF_HUB_OFFLINE = "1"
  67. TRANSFORMERS_OFFLINE = "1"
  68. # m-emm (post #113): eager mode for the 45 tok/s config (overrides the
  69. # cudagraph request above; day-0 stability knob)
  70. ENFORCE_EAGER = "1"
  71. # Architecture (aarch64 / sm_121a DGX Spark)
  72. TORCH_CUDA_ARCH_LIST = "12.1a"
  73. CUTE_DSL_ARCH = "sm_121a"
  74. OMP_NUM_THREADS = "4"