recipe.toml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Qwen3.8-27B (unsloth NVFP4 + MTP) — 1× DGX Spark / GB10 (sm_121), TP=1.
  2. #
  3. # NVFP4 compressed-tensors quant (22 GB) with a separate MTP draft in
  4. # `model_mtp.safetensors`. Dense 27B, GQA, hybrid DeltaNet+Attention. Text +
  5. # vision. Unsloth Dynamic V3.0 (preview) quant — SOTA quality for NVFP4.
  6. # vLLM-only (lm_head FP8).
  7. #
  8. # Nearly identical to RedHatAI's NVFP4 build (qwen38-27b-nvfp4 recipe);
  9. # benchmark both to pick the faster / higher-quality one.
  10. #
  11. # Image: ghcr.io/timothystewart6/vllm-gb10:v0.27.1-gb10.2
  12. # vLLM 0.27.1, torch 2.13+cuda130, FlashInfer built from source,
  13. # instanttensor. Stock vLLM — supports the qwen3_5 arch + MTP.
  14. #
  15. # Model: unsloth/Qwen3.8-27B-NVFP4
  16. # https://huggingface.co/unsloth/Qwen3.8-27B-NVFP4
  17. #
  18. # PREREQUISITES:
  19. # Weights cached on every node (dgx1 ~/.cache/huggingface → NAS):
  20. # huggingface-cli download unsloth/Qwen3.8-27B-NVFP4
  21. #
  22. # REFERENCE:
  23. # https://forums.developer.nvidia.com/t/qwen3-8-27b-on-dual-sparks/380350
  24. # https://forums.developer.nvidia.com/t/qwen3-8-27b-nvfp4-on-a-single-dgx-spark-up-to-1m-context-vllm-mtp-measurements/380244
  25. # https://forums.developer.nvidia.com/t/qwen3-8-27b-mixedint4-autoround-optimized-for-a-single-dgx-spark/380248
  26. engine = "vllm"
  27. name = "Qwen3.8-27B (NVFP4, unsloth)"
  28. docker_image = "ghcr.io/timothystewart6/vllm-gb10:v0.27.1-gb10.2"
  29. model = "unsloth/Qwen3.8-27B-NVFP4"
  30. parent_model = "Qwen/Qwen3.8-27B"
  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; NVFP4 route via compressed-tensors)
  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. # MTP speculative decoding (in-checkpoint draft, model_mtp.safetensors)
  55. "--speculative-config", """
  56. '{"method":"mtp","num_speculative_tokens":5}'""",
  57. # Tokenizer / reasoning (Qwen3 family)
  58. "--tool-call-parser", "qwen3_xml",
  59. "--reasoning-parser", "qwen3",
  60. "--enable-auto-tool-choice",
  61. "--generation-config", "auto",
  62. "--default-chat-template-kwargs.preserve_thinking=true",
  63. # Proven generation defaults (thinking mode; Qwen3.8 model-card best
  64. # practices)
  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. HF_HUB_OFFLINE = "1"
  71. TORCH_CUDA_ARCH_LIST = "12.1a"
  72. CUTE_DSL_ARCH = "sm_121a"
  73. OMP_NUM_THREADS = "4"
  74. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  75. CUDA_VISIBLE_DEVICES = "0"
  76. CUDA_DEVICE_ORDER = "PCI_BUS_ID"
  77. CUDA_CACHE_MAXSIZE = "4294967296"