recipe.toml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. parent_model = "Qwen/Qwen3.8-Flash-Next"
  30. required_nodes = 2
  31. tensor_parallel_size = 2
  32. pipeline_parallel_size = 1
  33. distributed_backend = "mp"
  34. shm_size = "32gb"
  35. entrypoint = ["vllm", "serve"]
  36. args = [
  37. # Stable served name — quant-agnostic, shared with qwen38-flash-next-nvfp4
  38. "--served-model-name", "qwen3.8-flash-next",
  39. # Expert parallelism — the fix for the FP8 MoE block-divisibility crash
  40. "--distributed-executor-backend", "mp",
  41. "--enable-expert-parallel",
  42. "--all2all-backend", "allgather_reducescatter",
  43. # Weight loading (no fastsafetensors day-0; lazy strategy keeps boot sane)
  44. "--load-format", "safetensors",
  45. "--safetensors-load-strategy", "lazy",
  46. # Context / batching (verified; raise max-num-seqs once stable)
  47. "--max-model-len", "262144",
  48. "--max-num-seqs", "1",
  49. "--max-num-batched-tokens", "8192",
  50. "--gpu-memory-utilization", "0.83",
  51. "--enable-chunked-prefill",
  52. # MTP speculative decoding (in-checkpoint draft)
  53. "--speculative-config", """
  54. '{"method":"mtp","num_speculative_tokens":3}'""",
  55. "--compilation-config", """
  56. '{"mode":0,"cudagraph_mode":"FULL_DECODE_ONLY"}'""",
  57. # Tokenizer / reasoning / tools (Qwen3 family)
  58. "--reasoning-parser", "qwen3",
  59. "--enable-auto-tool-choice",
  60. "--tool-call-parser", "qwen3_coder",
  61. # m-emm perf (post #113): disable multimodal to save VRAM/bandwidth
  62. "--limit-mm-per-prompt", """
  63. '{"image":0,"video":0}'""",
  64. ]
  65. [env]
  66. # Offline — weights must be cached on each node
  67. HF_HUB_OFFLINE = "1"
  68. TRANSFORMERS_OFFLINE = "1"
  69. # m-emm (post #113): eager mode for the 45 tok/s config (overrides the
  70. # cudagraph request above; day-0 stability knob)
  71. ENFORCE_EAGER = "1"
  72. # Architecture (aarch64 / sm_121a DGX Spark)
  73. TORCH_CUDA_ARCH_LIST = "12.1a"
  74. CUTE_DSL_ARCH = "sm_121a"
  75. OMP_NUM_THREADS = "4"