recipe.toml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # Qwen3.8-27B (RadixArk NVFP4 + DSpark on SGLang) — 1× DGX Spark / GB10 (sm_121),
  2. # TP=1.
  3. #
  4. # SGLang + DSpark block-diffusion speculative decoding. The community (MiaAI)
  5. # measured DSpark on this box at ~51.5 tok/s on code vs vLLM+MTP's 22.8 — the
  6. # drafter is 3× cheaper per guess and edits/rewrites much faster. Uses the
  7. # pre-built cookbook image (no source build): lmsysorg/sglang:qwen38-27b.
  8. #
  9. # TARGET MUST BE RadixArk MODELOPT NVFP4: the cookbook image accelerates
  10. # modelopt-quantized NVFP4. The unsloth/RedHatAI compressed-tensors builds
  11. # fall back to a slow unquantized path ("Falling back to UnquantizedLinear-
  12. # Method") — prefill crawls at ~0.5 tok/s. Use RadixArk here.
  13. #
  14. # Draft: RadixArk/Qwen3.8-27B-DSpark (bf16, block 7). SGLang loads it natively
  15. # from the HF cache — no arch patch needed (unlike the vLLM qwen3_dspark path).
  16. #
  17. # Image: lmsysorg/sglang:qwen38-27b (multi-arch, incl. arm64; cookbook's
  18. # DGX Spark Qwen3.8 cell, pinned image digest febfb971). Pre-built — no
  19. # source build.
  20. #
  21. # Model: RadixArk/Qwen3.8-27B-NVFP4 (modelopt, cached locally on the node)
  22. # https://huggingface.co/RadixArk/Qwen3.8-27B-NVFP4
  23. #
  24. # PREREQUISITES:
  25. # Target + draft cached on the node (dgx1 ~/.cache/huggingface → NAS):
  26. # hfrs download RadixArk/Qwen3.8-27B-NVFP4
  27. # hfrs download RadixArk/Qwen3.8-27B-DSpark
  28. #
  29. # REFERENCE:
  30. # https://github.com/MiaAI-Lab/Qwen3.8-27B-SGLang-DGX-Spark (start-dspark.sh)
  31. # https://blog.kubesimplify.com/qwen3-8-27b-on-dgx-spark
  32. engine = "sglang"
  33. name = "Qwen3.8-27B (RadixArk NVFP4, SGLang DSpark)"
  34. docker_image = "lmsysorg/sglang:qwen38-27b"
  35. model = "RadixArk/Qwen3.8-27B-NVFP4"
  36. parent_model = "Qwen/Qwen3.8-27B"
  37. required_nodes = 1
  38. tensor_parallel_size = 1
  39. pipeline_parallel_size = 1
  40. distributed_backend = "mp"
  41. shm_size = "32gb"
  42. entrypoint = ["python3", "-m", "sglang.launch_server"]
  43. args = [
  44. # Memory — larger KV pool (mamba GDN state pool sized from concurrency)
  45. "--mem-fraction-static", "0.90",
  46. "--max-running-requests", "10",
  47. "--max-mamba-cache-size", "30",
  48. # Attention / KV
  49. "--attention-backend", "flashinfer",
  50. "--kv-cache-dtype", "fp8_e4m3",
  51. # Mamba GDN hybrid
  52. "--mamba-ssm-dtype", "bfloat16",
  53. "--mamba-full-memory-ratio", "4.21",
  54. "--mamba-radix-cache-strategy", "extra_buffer_lazy",
  55. # Chunked prefill
  56. "--chunked-prefill-size", "8192",
  57. # DSpark speculative decoding (block 7 / 8 draft tokens, unquant bf16 draft)
  58. "--speculative-algorithm", "DSPARK",
  59. "--speculative-draft-model-path", "RadixArk/Qwen3.8-27B-DSpark",
  60. "--speculative-dspark-block-size", "7",
  61. "--speculative-draft-model-quantization", "unquant",
  62. "--speculative-num-draft-tokens", "8",
  63. # Compile + decode graphs
  64. "--enable-torch-compile", "--torch-compile-max-bs", "4",
  65. "--cuda-graph-max-bs-decode", "4",
  66. "--num-continuous-decode-steps", "2",
  67. # Tokenizer / reasoning / tool calling (Qwen3 family)
  68. "--reasoning-parser", "qwen3",
  69. "--tool-call-parser", "qwen3_coder",
  70. # Observability
  71. "--enable-metrics",
  72. "--enable-cache-report",
  73. ]
  74. [env]
  75. # Offline — target + draft are both cached on the node
  76. HF_HUB_OFFLINE = "1"
  77. # Pin to GB10's Cortex-X5 big cores (scheduler/tokenizer off the A725 efficiency
  78. # cores — +2-7% decode per the MiaAI build)
  79. # CPUSET handled at the container layer; this is the SGLang-side hint.
  80. SGLANG_OPT_MAMBA_SKIP_DECODE_LOCK = "1"
  81. # Architecture
  82. TORCH_CUDA_ARCH_LIST = "12.1a"
  83. CUTE_DSL_ARCH = "sm_121a"
  84. OMP_NUM_THREADS = "4"