recipe.toml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Qwen3.8-27B (RedHatAI 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. The vLLM-only quant (lm_head FP8) — SGLang can't load it.
  6. #
  7. # Two nearly-identical NVFP4 builds are available:
  8. # RedHatAI/Qwen3.8-27B-NVFP4 (this recipe)
  9. # unsloth/Qwen3.8-27B-NVFP4 (qwen38-27b-nvfp4-unsloth recipe)
  10. # Speed/quality are close; benchmark both in the experiment.
  11. #
  12. # Image: ghcr.io/timothystewart6/vllm-gb10:v0.27.1-gb10.2
  13. # vLLM 0.27.1, torch 2.13+cuda130, FlashInfer built from source,
  14. # instanttensor. Stock vLLM — supports the qwen3_5 arch + MTP.
  15. #
  16. # Model: RedHatAI/Qwen3.8-27B-NVFP4
  17. # https://huggingface.co/RedHatAI/Qwen3.8-27B-NVFP4
  18. #
  19. # PREREQUISITES:
  20. # Weights cached on every node (dgx1 ~/.cache/huggingface → NAS):
  21. # huggingface-cli download RedHatAI/Qwen3.8-27B-NVFP4
  22. #
  23. # REFERENCE:
  24. # https://forums.developer.nvidia.com/t/qwen3-8-27b-on-dual-sparks/380350
  25. # https://forums.developer.nvidia.com/t/qwen3-8-27b-nvfp4-on-a-single-dgx-spark-up-to-1m-context-vllm-mtp-measurements/380244
  26. # https://forums.developer.nvidia.com/t/qwen3-8-27b-mixedint4-autoround-optimized-for-a-single-dgx-spark/380248
  27. engine = "vllm"
  28. name = "Qwen3.8-27B (NVFP4, RedHatAI)"
  29. docker_image = "ghcr.io/timothystewart6/vllm-gb10:v0.27.1-gb10.2"
  30. model = "RedHatAI/Qwen3.8-27B-NVFP4"
  31. parent_model = "Qwen/Qwen3.8-27B"
  32. required_nodes = 1
  33. tensor_parallel_size = 1
  34. pipeline_parallel_size = 1
  35. distributed_backend = "mp"
  36. shm_size = "32gb"
  37. entrypoint = ["vllm", "serve"]
  38. args = [
  39. # KV cache & memory
  40. "--kv-cache-dtype", "fp8",
  41. "--max-model-len", "262144",
  42. "--max-num-seqs", "6",
  43. "--max-num-batched-tokens", "8192",
  44. "--gpu-memory-utilization", "0.75",
  45. "--served-model-name", "qwen3.8-27b",
  46. # Engine backends (dense GQA — FlashInfer; NVFP4 route via compressed-tensors)
  47. "--attention-backend", "flashinfer",
  48. # Compilation / perf
  49. "--optimization-level", "3",
  50. "--performance-mode", "throughput",
  51. # Chunked prefill + prefix caching
  52. "--enable-chunked-prefill",
  53. "--enable-prefix-caching",
  54. "--enable-flashinfer-autotune",
  55. # MTP speculative decoding (in-checkpoint draft, model_mtp.safetensors)
  56. "--speculative-config", """
  57. '{"method":"mtp","num_speculative_tokens":5}'""",
  58. # Tokenizer / reasoning (Qwen3 family)
  59. "--tool-call-parser", "qwen3_xml",
  60. "--reasoning-parser", "qwen3",
  61. "--enable-auto-tool-choice",
  62. "--generation-config", "auto",
  63. "--default-chat-template-kwargs.preserve_thinking=true",
  64. # Proven generation defaults (thinking mode; Qwen3.8 model-card best
  65. # practices)
  66. "--override-generation-config", """
  67. '{"temperature":1.0,"top_p":0.95,"top_k":20,"min_p":0.0,"presence_penalty":0.0,"repetition_penalty":1.0}'""",
  68. "--trust-remote-code",
  69. ]
  70. [env]
  71. HF_HUB_OFFLINE = "1"
  72. TORCH_CUDA_ARCH_LIST = "12.1a"
  73. CUTE_DSL_ARCH = "sm_121a"
  74. OMP_NUM_THREADS = "4"
  75. PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True"
  76. CUDA_VISIBLE_DEVICES = "0"
  77. CUDA_DEVICE_ORDER = "PCI_BUS_ID"
  78. CUDA_CACHE_MAXSIZE = "4294967296"