recipe.toml 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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). Pinned to the digest azampatti's repo
  15. # validates on (config.env B12X_IMAGE_PIN) — NOT floating :latest: the nightly
  16. # build we pulled on 2026-09-25 (c9e22735) intermittently garbles long
  17. # agent contexts (empty/degenerate replies, special-token leakage); the pinned
  18. # build is clean. Forum 382733 #195-198 (0rand: same corruption on unpinned,
  19. # fixed by the pinned digest). Do not "update" this image casually.
  20. #
  21. # Model: azampatti/Qwen3.8-Flash-Next-125B-A5B-INT4-AutoRound (130.8 GB)
  22. # staged at /home/kilork/hf-local on the launch node (dgx5); serve with
  23. # --hf-cache /home/kilork/hf-local.
  24. #
  25. # The mod (mods/flashnext-int4-b12x, vendored from his repo) checks the model
  26. # in the container's HF cache, builds /workspace/flashnext/{model,draft-k10}
  27. # (symlink views + small JSON, zero copy) and patches the container's vLLM
  28. # (fp8 hybrid, int4 lm_head, loader index filter, draft x2, GDN fixes).
  29. # It must run per node (single node here) before the engine.
  30. engine = "vllm"
  31. name = "Qwen3.8-Flash-Next-Int4-AutoRound (b12x, 1x Spark)"
  32. docker_image = "eugr/spark-vllm-b12x@sha256:8e7e062186f841453ef0ec6f713043c5b65447decc3835206685128c18e42262"
  33. # Empty recipe model: the launcher emits no positional model, and args[0] is
  34. # the mod-built view (vllm serves the view, not the raw repo — the view carries
  35. # the PLE-table index + the b12x arch rename that the raw snapshot lacks).
  36. model = ""
  37. parent_model = "Qwen/Qwen3.8-Flash-Next"
  38. required_nodes = 1
  39. entrypoint = ["vllm", "serve"]
  40. # vllm serves the mod-built view (not the raw repo): the launcher passes the
  41. # recipe model to the mod via the HF cache; the mod builds /workspace/...
  42. # and run.sh validates it. The command targets the view, per his yaml.
  43. args = [
  44. "/workspace/flashnext/model",
  45. "--served-model-name", "qwen3.8",
  46. "--trust-remote-code",
  47. "--enable-expert-parallel",
  48. "--mamba-cache-mode", "align",
  49. "--linear-backend", "b12x",
  50. "--enable-prefix-caching",
  51. "--enable-chunked-prefill",
  52. "--dtype", "bfloat16",
  53. "--kv-cache-dtype", "auto",
  54. "--block-size", "16",
  55. "--load-format", "fastsafetensors",
  56. "--max-model-len", "262144",
  57. "--max-num-seqs", "8",
  58. "--max-num-batched-tokens", "8192",
  59. "--gpu-memory-utilization", "0.01",
  60. "--kv-cache-memory-bytes", "20g",
  61. "--gdn-decode-kernel", "b12x",
  62. "--no-enable-flashinfer-autotune",
  63. "--mm-encoder-tp-mode", "data",
  64. "--enable-auto-tool-choice",
  65. "--tool-call-parser", "qwen3_coder",
  66. "--reasoning-parser", "qwen3",
  67. "--chat-template", "/workspace/flashnext/model/medium_chat_template.jinja",
  68. "--speculative-config",
  69. '{"method":"mtp","num_speculative_tokens":4,"model":"/workspace/flashnext/draft-k10","rejection_sample_method":"block","draft_sample_method":"probabilistic"}',
  70. ]
  71. [mods]
  72. commands = ["bash /mods/flashnext-int4-b12x/run.sh"]
  73. [env]
  74. HF_HUB_OFFLINE = "1"
  75. # b12x stack (his solo yaml, verbatim)
  76. CUTE_DSL_ARCH = "sm_121a"
  77. VLLM_WORKER_MULTIPROC_METHOD = "spawn"
  78. VLLM_SSM_CONV_STATE_LAYOUT = "DS"
  79. VLLM_USE_AOT_COMPILE = "1"
  80. VLLM_USE_MEGA_AOT_ARTIFACT = "1"
  81. VLLM_USE_V2_MODEL_RUNNER = "1"
  82. B12X_POLICY_MODE = "auto"
  83. VLLM_PLE_TABLE_MEMORY = "disk"
  84. # this checkpoint (the mod patches them into the container's vLLM)
  85. VLLM_FP8_HYBRID = "1"
  86. VLLM_MARLIN_USE_ATOMIC_ADD = "1" # 2026-09-26: back to 1 (the bench baseline). The 1→0 flip was a garble red herring — the real cause was the unpinned b12x image (see above).
  87. VLLM_USE_DEEP_GEMM = "0"
  88. VLLM_USE_FLASHINFER_SAMPLER = "1"
  89. VLLM_MTP_DRAFT_SCALE = "2"