recipe.toml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. required_nodes = 1
  27. tensor_parallel_size = 1
  28. pipeline_parallel_size = 1
  29. distributed_backend = "mp"
  30. shm_size = "32gb"
  31. entrypoint = ["vllm", "serve"]
  32. args = [
  33. # KV cache & memory
  34. "--kv-cache-dtype", "fp8",
  35. "--max-model-len", "262144",
  36. "--max-num-seqs", "6",
  37. "--max-num-batched-tokens", "8192",
  38. "--gpu-memory-utilization", "0.75",
  39. "--served-model-name", "qwen3.8-27b",
  40. # Engine backends (dense GQA — FlashInfer)
  41. "--attention-backend", "flashinfer",
  42. # Compilation / perf (AutoRound community tuning)
  43. "--optimization-level", "3",
  44. "--performance-mode", "throughput",
  45. # Chunked prefill + prefix caching
  46. "--enable-chunked-prefill",
  47. "--enable-prefix-caching",
  48. "--enable-flashinfer-autotune",
  49. # MTP speculative decoding (quantized draft)
  50. "--speculative-config", """
  51. '{"method":"mtp","num_speculative_tokens":4}'""",
  52. # Tokenizer / reasoning (Qwen3 family)
  53. "--tool-call-parser", "qwen3_xml",
  54. "--reasoning-parser", "qwen3",
  55. "--enable-auto-tool-choice",
  56. "--generation-config", "auto",
  57. "--default-chat-template-kwargs.preserve_thinking=true",
  58. # Proven generation defaults (thinking mode; Qwen3.8 model-card best
  59. # practices)
  60. "--override-generation-config", """
  61. '{"temperature":1.0,"top_p":0.95,"top_k":20,"min_p":0.0,"presence_penalty":0.0,"repetition_penalty":1.0}'""",
  62. "--trust-remote-code",
  63. ]
  64. [env]
  65. # AutoRound community tuning (thread 380248 post #39): faster load + higher
  66. # compile level for the 4-bit kernels.
  67. VLLM_TORCH_COMPILE_LEVEL = "3"
  68. VLLM_TRITON_COMPILE_ON_LOAD = "1"
  69. VLLM_WARMUP_BEFORE_SERVING = "1"
  70. VLLM_SKIP_WARMUP = "false"
  71. TORCH_MATMUL_PRECISION = "high"
  72. NVIDIA_FORWARD_COMPAT = "1"
  73. NVIDIA_DISABLE_REQUIRE = "1"
  74. CUDA_DEVICE_MAX_CONNECTIONS = "1"
  75. VLLM_MARLIN_USE_ATOMIC_ADD = "1"
  76. FLASHINFER_DISABLE_VERSION_CHECK = "1"
  77. # Offline mode
  78. HF_HUB_OFFLINE = "1"
  79. # Architecture
  80. TORCH_CUDA_ARCH_LIST = "12.1a"
  81. CUTE_DSL_ARCH = "sm_121a"
  82. OMP_NUM_THREADS = "4"
  83. # GPU memory management
  84. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  85. # GPU device isolation
  86. CUDA_VISIBLE_DEVICES = "0"
  87. CUDA_DEVICE_ORDER = "PCI_BUS_ID"
  88. CUDA_CACHE_MAXSIZE = "4294967296"