recipe.toml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # Qwen3.8-Flash-Next-125B-A5B INT4-AutoRound (azampatti) on a single DGX
  2. # Spark — the "5 experts per token" cut with the healed shared expert.
  3. #
  4. # Source: forum 382733 (posts 167-171, 2026-09-25) + github.com/azampatti/
  5. # Qwen3.8-Flash-Next-Int4-FAST (recipe repo, public). Numbers: 60-75 tok/s
  6. # single Spark, ~645K-token KV pool at 20 GB, tool-eval 93/100 (his 69-scen
  7. # v2.6-era harness; we re-bench on v2.7.0). BENCH NOTE: his quant defaults
  8. # to MEDIUM thinking (the stock model is xhigh) → the chat template matters
  9. # for A/B fairness (three switchable templates ship in the model repo; the
  10. # served view mounts medium_chat_template.jinja — the template the
  11. # speculative head was trained on).
  12. #
  13. # Image: eugr/spark-vllm-b12x (Docker Hub; the b12x stack his 2x recipe uses,
  14. # ~75 tok/s vs 70 on the classic image). Prebuilt — no docker_image_dir.
  15. #
  16. # Model: azampatti/Qwen3.8-Flash-Next-125B-A5B-INT4-AutoRound (130.8 GB)
  17. # staged at /home/kilork/hf-local on the launch node (dgx5); serve with
  18. # --hf-cache /home/kilork/hf-local.
  19. #
  20. # The mod (mods/flashnext-int4-b12x, vendored from his repo) checks the model
  21. # in the container's HF cache, builds /workspace/flashnext/{model,draft-k10}
  22. # (symlink views + small JSON, zero copy) and patches the container's vLLM
  23. # (fp8 hybrid, int4 lm_head, loader index filter, draft x2, GDN fixes).
  24. # It must run per node (single node here) before the engine.
  25. engine = "vllm"
  26. name = "Qwen3.8-Flash-Next-Int4-AutoRound (b12x, 1x Spark)"
  27. docker_image = "eugr/spark-vllm-b12x:latest"
  28. # Empty recipe model: the launcher emits no positional model, and args[0] is
  29. # the mod-built view (vllm serves the view, not the raw repo — the view carries
  30. # the PLE-table index + the b12x arch rename that the raw snapshot lacks).
  31. model = ""
  32. parent_model = "Qwen/Qwen3.8-Flash-Next"
  33. port = 8000
  34. required_nodes = 1
  35. entrypoint = ["vllm", "serve"]
  36. # vllm serves the mod-built view (not the raw repo): the launcher passes the
  37. # recipe model to the mod via the HF cache; the mod builds /workspace/...
  38. # and run.sh validates it. The command targets the view, per his yaml.
  39. args = [
  40. "/workspace/flashnext/model",
  41. "--served-model-name", "azampatti/Qwen3.8-Flash-Next-125B-A5B-INT4-AutoRound",
  42. "--trust-remote-code",
  43. "--enable-expert-parallel",
  44. "--mamba-cache-mode", "align",
  45. "--linear-backend", "b12x",
  46. "--enable-prefix-caching",
  47. "--enable-chunked-prefill",
  48. "--dtype", "bfloat16",
  49. "--kv-cache-dtype", "auto",
  50. "--block-size", "16",
  51. "--load-format", "fastsafetensors",
  52. "--max-model-len", "262144",
  53. "--max-num-seqs", "8",
  54. "--max-num-batched-tokens", "8192",
  55. "--gpu-memory-utilization", "0.01",
  56. "--kv-cache-memory-bytes", "20g",
  57. "--gdn-decode-kernel", "b12x",
  58. "--no-enable-flashinfer-autotune",
  59. "--mm-encoder-tp-mode", "data",
  60. "--enable-auto-tool-choice",
  61. "--tool-call-parser", "qwen3_coder",
  62. "--reasoning-parser", "qwen3",
  63. "--chat-template", "/workspace/flashnext/model/medium_chat_template.jinja",
  64. "--speculative-config",
  65. '{"method":"mtp","num_speculative_tokens":4,"model":"/workspace/flashnext/draft-k10","rejection_sample_method":"block","draft_sample_method":"probabilistic"}',
  66. ]
  67. [mods]
  68. commands = ["bash /mods/flashnext-int4-b12x/run.sh"]
  69. [env]
  70. HF_HUB_OFFLINE = "1"
  71. # b12x stack (his solo yaml, verbatim)
  72. CUTE_DSL_ARCH = "sm_121a"
  73. VLLM_WORKER_MULTIPROC_METHOD = "spawn"
  74. VLLM_SSM_CONV_STATE_LAYOUT = "DS"
  75. VLLM_USE_AOT_COMPILE = "1"
  76. VLLM_USE_MEGA_AOT_ARTIFACT = "1"
  77. VLLM_USE_V2_MODEL_RUNNER = "1"
  78. B12X_POLICY_MODE = "auto"
  79. VLLM_PLE_TABLE_MEMORY = "disk"
  80. # this checkpoint (the mod patches them into the container's vLLM)
  81. VLLM_FP8_HYBRID = "1"
  82. VLLM_MARLIN_USE_ATOMIC_ADD = "1"
  83. VLLM_USE_DEEP_GEMM = "0"
  84. VLLM_USE_FLASHINFER_SAMPLER = "1"
  85. VLLM_MTP_DRAFT_SCALE = "2"