recipe.toml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Qwen3.8-27B (BF16) — 1× DGX Spark / GB10 (sm_121), TP=1.
  2. #
  3. # Native BF16 dense 27B (52 GB). Quality reference baseline; the quantized
  4. # variants (FP8 / NVFP4 / Int4) are the speed candidates. Runs text + vision.
  5. #
  6. # Image: ghcr.io/timothystewart6/vllm-gb10:v0.27.1-gb10.2
  7. # vLLM 0.27.1, torch 2.13+cuda130, FlashInfer built from source,
  8. # instanttensor. Stock vLLM — supports the qwen3_5 arch + MTP.
  9. #
  10. # Model: Qwen/Qwen3.8-27B
  11. # https://huggingface.co/Qwen/Qwen3.8-27B
  12. # Dense 27B, 64 layers, hidden 5120, GQA (4 KV heads × 256), Gated
  13. # DeltaNet + Gated Attention hybrid. MTP-1. Native 262,144 ctx (YaRN to 1M).
  14. # Multimodal (vision tower, `language_model_only: False`).
  15. #
  16. # PREREQUISITES:
  17. # Weights cached on every node (dgx1 ~/.cache/huggingface → NAS):
  18. # huggingface-cli download Qwen/Qwen3.8-27B
  19. #
  20. # REFERENCE:
  21. # https://forums.developer.nvidia.com/t/qwen3-8-27b-mixedint4-autoround-optimized-for-a-single-dgx-spark/380248
  22. # https://forums.developer.nvidia.com/t/qwen3-8-27b-on-dual-sparks/380350
  23. # https://forums.developer.nvidia.com/t/qwen3-8-27b-at-34-38-tok-s-on-dgx-spark-open-source-one-command-setup-sglang-nvfp4-dspark/380257
  24. engine = "vllm"
  25. name = "Qwen3.8-27B (BF16)"
  26. docker_image = "ghcr.io/timothystewart6/vllm-gb10:v0.27.1-gb10.2"
  27. model = "Qwen/Qwen3.8-27B"
  28. required_nodes = 1
  29. tensor_parallel_size = 1
  30. pipeline_parallel_size = 1
  31. distributed_backend = "mp"
  32. shm_size = "32gb"
  33. entrypoint = ["vllm", "serve"]
  34. args = [
  35. # KV cache & memory
  36. "--kv-cache-dtype", "fp8",
  37. "--max-model-len", "262144",
  38. "--max-num-seqs", "6",
  39. "--max-num-batched-tokens", "8192",
  40. "--gpu-memory-utilization", "0.75",
  41. "--served-model-name", "qwen3.8-27b",
  42. # Engine backends (dense GQA — FlashInfer, not the DeepSeek MLA path)
  43. "--attention-backend", "flashinfer",
  44. # Compilation / perf
  45. "--optimization-level", "3",
  46. "--performance-mode", "throughput",
  47. # Chunked prefill + prefix caching
  48. "--enable-chunked-prefill",
  49. "--enable-prefix-caching",
  50. "--enable-flashinfer-autotune",
  51. # MTP speculative decoding (in-checkpoint draft, mtp_num_hidden_layers=1
  52. # cycled across steps)
  53. "--speculative-config", """
  54. '{"method":"mtp","num_speculative_tokens":5}'""",
  55. # Tokenizer / reasoning (Qwen3 family)
  56. "--tool-call-parser", "qwen3_xml",
  57. "--reasoning-parser", "qwen3",
  58. "--enable-auto-tool-choice",
  59. "--generation-config", "auto",
  60. "--default-chat-template-kwargs.preserve_thinking=true",
  61. # Proven generation defaults (thinking mode; Qwen3.8 model-card best
  62. # practices). repetition_penalty 1.0 = identity: accepted but never
  63. # deviates from no-op during req handling (DSpark/MLA bug caveat — see
  64. # findings doc for the DeepSeek path; irrelevant to dense Qwen).
  65. "--override-generation-config", """
  66. '{"temperature":1.0,"top_p":0.95,"top_k":20,"min_p":0.0,"presence_penalty":0.0,"repetition_penalty":1.0}'""",
  67. "--trust-remote-code",
  68. ]
  69. [env]
  70. # Offline mode — weights must be cached on each node
  71. HF_HUB_OFFLINE = "1"
  72. # Architecture
  73. TORCH_CUDA_ARCH_LIST = "12.1a"
  74. CUTE_DSL_ARCH = "sm_121a"
  75. OMP_NUM_THREADS = "4"
  76. # GPU memory management
  77. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  78. # GPU device isolation
  79. CUDA_VISIBLE_DEVICES = "0"
  80. CUDA_DEVICE_ORDER = "PCI_BUS_ID"
  81. CUDA_CACHE_MAXSIZE = "4294967296"