recipe.toml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Qwen3.8-27B (FP8 + DSpark draft) — 1× DGX Spark / GB10 (sm_121), TP=1.
  2. #
  3. # DSpark: a dedicated semi-autoregressive draft model (~2.6 GB, 5 layers,
  4. # block_size 7) proposes blocks of tokens that the full model verifies in one
  5. # weight-read. 3× cheaper per guess than the in-checkpoint MTP head, so it wins
  6. # on edit-heavy / structured workloads (blog: 45-48 t/s edit, 17 t/s free-gen,
  7. # 66 t/s aggregate @ c10 on the FP8 target). DSpark blocks are verifier-rejected,
  8. # so no quality risk.
  9. #
  10. # Target: Qwen/Qwen3.8-27B-FP8 (official FP8 quant, 28.75 GB).
  11. # Draft: RadixArk/Qwen3.8-27B-DSpark (arch DSparkDraftModel, bf16, 5 layers,
  12. # dspark_block_size 7). Downloaded via hfrs into the node HF cache.
  13. #
  14. # Image: ghcr.io/timothystewart6/vllm-gb10:v0.27.1-gb10.2
  15. # vLLM 0.27.1 (installed 0.27.2.dev0+g6e448d0ea), supports method "dspark"
  16. # (SpeculativeMethod Literal includes dspark) + Qwen3DSparkModel draft.
  17. #
  18. # PREREQUISITES:
  19. # Target + draft cached on the node (dgx1 ~/.cache/huggingface → NAS):
  20. # hfrs download Qwen/Qwen3.8-27B-FP8
  21. # hfrs download RadixArk/Qwen3.8-27B-DSpark
  22. #
  23. # REFERENCE:
  24. # https://blog.kubesimplify.com/qwen3-8-27b-on-dgx-spark (DSpark section)
  25. # https://huggingface.co/RadixArk/Qwen3.8-27B-DSpark
  26. # https://forums.developer.nvidia.com/t/qwen3-8-27b-on-dual-sparks/380350
  27. engine = "vllm"
  28. name = "Qwen3.8-27B (FP8 + DSpark)"
  29. docker_image = "ghcr.io/timothystewart6/vllm-gb10:v0.27.1-gb10.2"
  30. model = "Qwen/Qwen3.8-27B-FP8"
  31. parent_model = "Qwen/Qwen3.8-27B"
  32. required_nodes = 1
  33. tensor_parallel_size = 1
  34. pipeline_parallel_size = 1
  35. distributed_backend = "mp"
  36. shm_size = "32gb"
  37. entrypoint = ["vllm", "serve"]
  38. args = [
  39. # KV cache & memory
  40. "--kv-cache-dtype", "fp8",
  41. "--max-model-len", "262144",
  42. "--max-num-seqs", "6",
  43. "--max-num-batched-tokens", "8192",
  44. "--gpu-memory-utilization", "0.75",
  45. "--served-model-name", "qwen3.8-27b",
  46. # Engine backends (dense GQA — FlashInfer)
  47. "--attention-backend", "flashinfer",
  48. # Compilation / perf
  49. "--optimization-level", "3",
  50. "--performance-mode", "throughput",
  51. # Chunked prefill + prefix caching
  52. "--enable-chunked-prefill",
  53. "--enable-prefix-caching",
  54. "--enable-flashinfer-autotune",
  55. # DSpark speculative decoding — dedicated draft model (not the in-checkpoint
  56. # MTP head). num_speculative_tokens must equal the draft's block size (7).
  57. # The draft lives in a local dir (arch-patched copy of RadixArk/Qwen3.8-27B-DSpark
  58. # re-labelled `Qwen3DSparkModel` so vLLM routes it to qwen3_dspark, not the
  59. # DeepSeek-V4 DSpark code path) bind-mounted at /dspark-draft below.
  60. "--speculative-config", """
  61. '{"method":"dspark","model":"/dspark-draft","num_speculative_tokens":7}'""",
  62. # Tokenizer / reasoning (Qwen3 family)
  63. "--tool-call-parser", "qwen3_xml",
  64. "--reasoning-parser", "qwen3",
  65. "--enable-auto-tool-choice",
  66. "--generation-config", "auto",
  67. "--default-chat-template-kwargs.preserve_thinking=true",
  68. # Proven generation defaults (thinking mode; Qwen3.8 model-card best
  69. # practices)
  70. "--override-generation-config", """
  71. '{"temperature":1.0,"top_p":0.95,"top_k":20,"min_p":0.0,"presence_penalty":0.0,"repetition_penalty":1.0}'""",
  72. "--trust-remote-code",
  73. ]
  74. # DSpark draft model — arch-patched local copy of RadixArk/Qwen3.8-27B-DSpark,
  75. # mounted at /dspark-draft so vLLM loads it via the qwen3_dspark draft class.
  76. [[extra_mounts]]
  77. host = "/home/kilork/dspark-draft"
  78. container = "/dspark-draft"
  79. [env]
  80. HF_HUB_OFFLINE = "1"
  81. TORCH_CUDA_ARCH_LIST = "12.1a"
  82. CUTE_DSL_ARCH = "sm_121a"
  83. OMP_NUM_THREADS = "4"
  84. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  85. CUDA_VISIBLE_DEVICES = "0"
  86. CUDA_DEVICE_ORDER = "PCI_BUS_ID"
  87. CUDA_CACHE_MAXSIZE = "4294967296"