recipe.toml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. required_nodes = 1
  37. tensor_parallel_size = 1
  38. pipeline_parallel_size = 1
  39. distributed_backend = "mp"
  40. shm_size = "32gb"
  41. entrypoint = ["python3", "-m", "sglang.launch_server"]
  42. args = [
  43. # Memory — larger KV pool (mamba GDN state pool sized from concurrency)
  44. "--mem-fraction-static", "0.90",
  45. "--max-running-requests", "10",
  46. "--max-mamba-cache-size", "30",
  47. # Attention / KV
  48. "--attention-backend", "flashinfer",
  49. "--kv-cache-dtype", "fp8_e4m3",
  50. # Mamba GDN hybrid
  51. "--mamba-ssm-dtype", "bfloat16",
  52. "--mamba-full-memory-ratio", "4.21",
  53. "--mamba-radix-cache-strategy", "extra_buffer_lazy",
  54. # Chunked prefill
  55. "--chunked-prefill-size", "8192",
  56. # DSpark speculative decoding (block 7 / 8 draft tokens, unquant bf16 draft)
  57. "--speculative-algorithm", "DSPARK",
  58. "--speculative-draft-model-path", "RadixArk/Qwen3.8-27B-DSpark",
  59. "--speculative-dspark-block-size", "7",
  60. "--speculative-draft-model-quantization", "unquant",
  61. "--speculative-num-draft-tokens", "8",
  62. # Compile + decode graphs
  63. "--enable-torch-compile", "--torch-compile-max-bs", "4",
  64. "--cuda-graph-max-bs-decode", "4",
  65. "--num-continuous-decode-steps", "2",
  66. # Tokenizer / reasoning / tool calling (Qwen3 family)
  67. "--reasoning-parser", "qwen3",
  68. "--tool-call-parser", "qwen3_coder",
  69. # Observability
  70. "--enable-metrics",
  71. "--enable-cache-report",
  72. ]
  73. [env]
  74. # Offline — target + draft are both cached on the node
  75. HF_HUB_OFFLINE = "1"
  76. # Pin to GB10's Cortex-X5 big cores (scheduler/tokenizer off the A725 efficiency
  77. # cores — +2-7% decode per the MiaAI build)
  78. # CPUSET handled at the container layer; this is the SGLang-side hint.
  79. SGLANG_OPT_MAMBA_SKIP_DECODE_LOCK = "1"
  80. # Architecture
  81. TORCH_CUDA_ARCH_LIST = "12.1a"
  82. CUTE_DSL_ARCH = "sm_121a"
  83. OMP_NUM_THREADS = "4"