recipe.toml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. engine = "vllm"
  2. name = "DeepSeek V4 Flash (vLLM)"
  3. docker_image = "aidendle94/sparkrun-vllm-ds4-gb10:production-2.9"
  4. model = "deepseek-ai/DeepSeek-V4-Flash"
  5. required_nodes = 2
  6. tensor_parallel_size = 2
  7. pipeline_parallel_size = 1
  8. distributed_backend = "mp"
  9. # --privileged makes --shm-size redundant; kept for documentation
  10. # shm_size = "64gb"
  11. entrypoint = ["vllm", "serve"]
  12. args = [
  13. "--kv-cache-dtype", "fp8",
  14. "--block-size", "256",
  15. "--max-model-len", "524288",
  16. "--max-num-seqs", "6",
  17. "--max-num-batched-tokens", "8192",
  18. "--max-cudagraph-capture-size", "192",
  19. "--attention-backend", "B12X_MLA_SPARSE",
  20. "--moe-backend", "flashinfer_cutlass",
  21. "--linear-backend", "b12x",
  22. "--enable-chunked-prefill",
  23. "--gpu-memory-utilization", "0.75",
  24. "--compilation-config", """
  25. '{"cudagraph_mode":"FULL_AND_PIECEWISE","custom_ops":["all"]}'""",
  26. "--enable-prefix-caching",
  27. "--load-format", "safetensors",
  28. "--speculative-config", """
  29. '{"method":"mtp","num_speculative_tokens":2}'""",
  30. "--tokenizer-mode", "deepseek_v4",
  31. "--tool-call-parser", "deepseek_v4",
  32. "--enable-auto-tool-choice",
  33. "--reasoning-parser", "deepseek_v4",
  34. "--reasoning-config", """
  35. '{"reasoning_parser":"deepseek_v4","reasoning_start_str":"","reasoning_end_str":""}'""",
  36. "--default-chat-template-kwargs", """
  37. '{"thinking":true,"preserve_thinking":true,"reasoning_effort":"high"}'""",
  38. "--override-generation-config", """
  39. '{"temperature": 1.0, "top_p": 1.0}'""",
  40. "--enable-flashinfer-autotune",
  41. "--trust-remote-code",
  42. "--served-model-name", "deepseek-v4-flash", "default",
  43. ]
  44. [env]
  45. # Ray memory management — prevents OOM during cudagraph compilation
  46. RAY_memory_monitor_refresh_ms = "0"
  47. RAY_num_prestart_python_workers = "0"
  48. RAY_object_store_memory = "1073741824"
  49. # vLLM features for DeepSeek V4 on Blackwell (GB10 / sm_120)
  50. VLLM_ALLOW_LONG_MAX_MODEL_LEN = "1"
  51. # --- backend selection (the working config) ---
  52. USES_B12X = "True"
  53. VLLM_USE_B12X_MOE = "0" # b12x MoE OFF -> cutlass W4A8 (b12x MoE prefill stalls on GB10)
  54. MOE_BACKEND = "flashinfer_cutlass" # W4A8 cutlass MoE
  55. ATTN_BACKEND = "B12X_MLA_SPARSE" # the only sparse-MLA that runs on GB10/sm_121a here
  56. ASYNC_SCHED = "0" # async-scheduling crashes 2-node TP — KEEP OFF
  57. # --- b12x suite = REQUIRED by this image (disabling any crashes engine init) ---
  58. VLLM_USE_B12X_MHC = "1"
  59. VLLM_USE_B12X_WO_PROJECTION = "1"
  60. VLLM_USE_B12X_FP8_GEMM = "1"
  61. VLLM_USE_B12X_SPARSE_INDEXER = "1"
  62. VLLM_USE_V2_MODEL_RUNNER = "1"
  63. VLLM_USE_FLASHINFER_SAMPLER = "1"
  64. VLLM_USE_AOT_COMPILE = "1"
  65. VLLM_USE_MEGA_AOT_ARTIFACT = "1"
  66. VLLM_USE_BREAKABLE_CUDAGRAPH = "0" # breakable mode regresses prefill on GB10 — keep off
  67. VLLM_MEMORY_PROFILE_INCLUDE_ATTN = "1"
  68. VLLM_PREFIX_CACHE_RETENTION_INTERVAL = "4096"
  69. VLLM_CACHE_ROOT = "/cache/jit/vllm-cache" # persist AOT/compile artifacts
  70. B12X_MLA_SM120_UNIFIED = "1"
  71. B12X_DENSE_SPLITK_TURBO = "1"
  72. B12X_W4A16_TC_DECODE = "1"
  73. B12X_MHC_MAX_TOKENS = "16384"
  74. VLLM_SPARSE_INDEXER_MAX_LOGITS_MB = "256"
  75. # Compile-time arch hints for PyTorch and FlashInfer on GB10
  76. TORCH_CUDA_ARCH_LIST = "12.1a"
  77. FLASHINFER_CUDA_ARCH_LIST = "12.1a"
  78. CUTE_DSL_ARCH = "sm_121a"
  79. OMP_NUM_THREADS = "4"
  80. #CUDA_HOME = "/opt/env/targets/sbsa-linux"
  81. FLASHINFER_DISABLE_VERSION_CHECK = "1"
  82. TILELANG_CLEANUP_TEMP_FILES = "1"
  83. DG_JIT_USE_NVRTC = "0"
  84. DG_JIT_PRINT_COMPILER_COMMAND = "1"
  85. #VLLM_NCCL_SO_PATH = "/opt/env/lib/python3.12/site-packages/nvidia/nccl/lib/libnccl.so.2"
  86. HF_HUB_OFFLINE = "1"
  87. TRANSFORMERS_OFFLINE = "1"