recipe.toml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. required_nodes = 1
  32. tensor_parallel_size = 1
  33. pipeline_parallel_size = 1
  34. distributed_backend = "mp"
  35. shm_size = "32gb"
  36. entrypoint = ["vllm", "serve"]
  37. args = [
  38. # KV cache & memory
  39. "--kv-cache-dtype", "fp8",
  40. "--max-model-len", "262144",
  41. "--max-num-seqs", "6",
  42. "--max-num-batched-tokens", "8192",
  43. "--gpu-memory-utilization", "0.75",
  44. "--served-model-name", "qwen3.8-27b",
  45. # Engine backends (dense GQA — FlashInfer)
  46. "--attention-backend", "flashinfer",
  47. # Compilation / perf
  48. "--optimization-level", "3",
  49. "--performance-mode", "throughput",
  50. # Chunked prefill + prefix caching
  51. "--enable-chunked-prefill",
  52. "--enable-prefix-caching",
  53. "--enable-flashinfer-autotune",
  54. # DSpark speculative decoding — dedicated draft model (not the in-checkpoint
  55. # MTP head). num_speculative_tokens must equal the draft's block size (7).
  56. # The draft lives in a local dir (arch-patched copy of RadixArk/Qwen3.8-27B-DSpark
  57. # re-labelled `Qwen3DSparkModel` so vLLM routes it to qwen3_dspark, not the
  58. # DeepSeek-V4 DSpark code path) bind-mounted at /dspark-draft below.
  59. "--speculative-config", """
  60. '{"method":"dspark","model":"/dspark-draft","num_speculative_tokens":7}'""",
  61. # Tokenizer / reasoning (Qwen3 family)
  62. "--tool-call-parser", "qwen3_xml",
  63. "--reasoning-parser", "qwen3",
  64. "--enable-auto-tool-choice",
  65. "--generation-config", "auto",
  66. "--default-chat-template-kwargs.preserve_thinking=true",
  67. # Proven generation defaults (thinking mode; Qwen3.8 model-card best
  68. # practices)
  69. "--override-generation-config", """
  70. '{"temperature":1.0,"top_p":0.95,"top_k":20,"min_p":0.0,"presence_penalty":0.0,"repetition_penalty":1.0}'""",
  71. "--trust-remote-code",
  72. ]
  73. # DSpark draft model — arch-patched local copy of RadixArk/Qwen3.8-27B-DSpark,
  74. # mounted at /dspark-draft so vLLM loads it via the qwen3_dspark draft class.
  75. [[extra_mounts]]
  76. host = "/home/kilork/dspark-draft"
  77. container = "/dspark-draft"
  78. [env]
  79. HF_HUB_OFFLINE = "1"
  80. TORCH_CUDA_ARCH_LIST = "12.1a"
  81. CUTE_DSL_ARCH = "sm_121a"
  82. OMP_NUM_THREADS = "4"
  83. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  84. CUDA_VISIBLE_DEVICES = "0"
  85. CUDA_DEVICE_ORDER = "PCI_BUS_ID"
  86. CUDA_CACHE_MAXSIZE = "4294967296"