recipe.toml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Qwen3.8-27B (Pilcothink Int4 AutoRound + MTP) — 1× DGX Spark / GB10 (sm_121),
  2. # TP=1.
  3. #
  4. # Mixed 4-bit AutoRound quant (20 GB) tuned for a single DGX Spark. Sensitive
  5. # layers kept FP8/FP16; vision layers unquantized. MTP quantized + included.
  6. # Dense 27B, GQA, hybrid DeltaNet+Attention. Text + vision. The community has
  7. # heavily tuned vLLM flags for this exact build (thread 380248 post #39).
  8. #
  9. # Image: ghcr.io/timothystewart6/vllm-gb10:v0.27.1-gb10.2
  10. # vLLM 0.27.1, torch 2.13+cuda130, FlashInfer built from source,
  11. # instanttensor. Stock vLLM — supports the qwen3_5 arch + MTP.
  12. #
  13. # Model: Pilcothink/Qwen3.8-27B-MixedInt4-AutoRound
  14. # https://huggingface.co/Pilcothink/Qwen3.8-27B-MixedInt4-AutoRound
  15. #
  16. # PREREQUISITES:
  17. # Weights cached on every node (dgx1 ~/.cache/huggingface → NAS):
  18. # huggingface-cli download Pilcothink/Qwen3.8-27B-MixedInt4-AutoRound
  19. #
  20. # REFERENCE:
  21. # https://forums.developer.nvidia.com/t/qwen3-8-27b-mixedint4-autoround-optimized-for-a-single-dgx-spark/380248
  22. engine = "vllm"
  23. name = "Qwen3.8-27B (Int4 AutoRound)"
  24. docker_image = "ghcr.io/timothystewart6/vllm-gb10:v0.27.1-gb10.2"
  25. model = "Pilcothink/Qwen3.8-27B-MixedInt4-AutoRound"
  26. parent_model = "Qwen/Qwen3.8-27B"
  27. required_nodes = 1
  28. tensor_parallel_size = 1
  29. pipeline_parallel_size = 1
  30. distributed_backend = "mp"
  31. shm_size = "32gb"
  32. entrypoint = ["vllm", "serve"]
  33. args = [
  34. # KV cache & memory
  35. "--kv-cache-dtype", "fp8",
  36. "--max-model-len", "262144",
  37. "--max-num-seqs", "6",
  38. "--max-num-batched-tokens", "8192",
  39. "--gpu-memory-utilization", "0.75",
  40. "--served-model-name", "qwen3.8-27b",
  41. # Engine backends (dense GQA — FlashInfer)
  42. "--attention-backend", "flashinfer",
  43. # Compilation / perf (AutoRound community tuning)
  44. "--optimization-level", "3",
  45. "--performance-mode", "throughput",
  46. # Chunked prefill + prefix caching
  47. "--enable-chunked-prefill",
  48. "--enable-prefix-caching",
  49. "--enable-flashinfer-autotune",
  50. # MTP speculative decoding (quantized draft)
  51. "--speculative-config", """
  52. '{"method":"mtp","num_speculative_tokens":4}'""",
  53. # Tokenizer / reasoning (Qwen3 family)
  54. "--tool-call-parser", "qwen3_xml",
  55. "--reasoning-parser", "qwen3",
  56. "--enable-auto-tool-choice",
  57. "--generation-config", "auto",
  58. "--default-chat-template-kwargs.preserve_thinking=true",
  59. # Proven generation defaults (thinking mode; Qwen3.8 model-card best
  60. # practices)
  61. "--override-generation-config", """
  62. '{"temperature":1.0,"top_p":0.95,"top_k":20,"min_p":0.0,"presence_penalty":0.0,"repetition_penalty":1.0}'""",
  63. "--trust-remote-code",
  64. ]
  65. [env]
  66. # AutoRound community tuning (thread 380248 post #39): faster load + higher
  67. # compile level for the 4-bit kernels.
  68. VLLM_TORCH_COMPILE_LEVEL = "3"
  69. VLLM_TRITON_COMPILE_ON_LOAD = "1"
  70. VLLM_WARMUP_BEFORE_SERVING = "1"
  71. VLLM_SKIP_WARMUP = "false"
  72. TORCH_MATMUL_PRECISION = "high"
  73. NVIDIA_FORWARD_COMPAT = "1"
  74. NVIDIA_DISABLE_REQUIRE = "1"
  75. CUDA_DEVICE_MAX_CONNECTIONS = "1"
  76. VLLM_MARLIN_USE_ATOMIC_ADD = "1"
  77. FLASHINFER_DISABLE_VERSION_CHECK = "1"
  78. # Offline mode
  79. HF_HUB_OFFLINE = "1"
  80. # Architecture
  81. TORCH_CUDA_ARCH_LIST = "12.1a"
  82. CUTE_DSL_ARCH = "sm_121a"
  83. OMP_NUM_THREADS = "4"
  84. # GPU memory management
  85. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  86. # GPU device isolation
  87. CUDA_VISIBLE_DEVICES = "0"
  88. CUDA_DEVICE_ORDER = "PCI_BUS_ID"
  89. CUDA_CACHE_MAXSIZE = "4294967296"