recipe.toml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # DeepSeek-V4-Flash-Vision-Exp on 2× GB10 — aidendle94 sparkrun vision image.
  2. #
  3. # aiden's vision guide (https://aidenle.com/recipes/deepseek-v4-flash-vision-4x-dgx-spark/)
  4. # translated to 2× Spark / DCP1 (his "DSpark, DCP1" profile: 73.8-75.2 tok/s at
  5. # TP4/DCP1; on 2x expect roughly half). His production lane ships DCP2 + DSpark
  6. # (66-71 tok/s, 3.5M KV); DCP flags omitted here — DSpark runs fine under DCP1.
  7. #
  8. # Image: aidendle94/sparkrun-vllm-ds4-gb10:production-3.72-vision (published
  9. # vision stack: hand-ported tower/routing/CKV gather, cross-checked against
  10. # upstream vLLM PR #54566). Sibling comparison: dsv4-flash-vision:local (our
  11. # plugin overlay on his production-3.76.1 base) — the A/B pair for the vision
  12. # lane.
  13. #
  14. # Weights: deepseek-ai/DeepSeek-V4-Flash-Vision-Exp (cached; ~84 GiB/node at
  15. # TP2 via ~/dsv4vision-hf NVMe copies). Draft heads ship in the checkpoint
  16. # (mtp.*) — no extra download.
  17. #
  18. # DSpark: k=6, greedy draft, acceptance 3.5-3.8 tokens/step. Acceptance is the
  19. # DCP correctness signal; equal DSpark-DCP1 numbers here = draft sees full ctx.
  20. # max-cudagraph-capture-size = seqs × (spec tokens + 1) = 8 × 7 = 56.
  21. #
  22. # VISION_MHC=1 follows aiden's production profile; our plugin lane keeps
  23. # VLLM_USE_B12X_MHC=0 (checkpoint rms_norm_eps 1e-20 vs fused Gram kernel's
  24. # 1e-6 — upstream README). If this boot asserts on the mHC kernel, flip to 0.
  25. #
  26. # Boot markers: vision plugin registered → "Model loading took ~84 GiB" →
  27. # "GPU KV cache size" ≈ 1.25M → "Application startup complete".
  28. engine = "vllm"
  29. name = "DeepSeek V4 Flash Vision-Exp (aiden image, 2x Spark, DSpark-6)"
  30. docker_image = "aidendle94/sparkrun-vllm-ds4-gb10:production-3.72-vision"
  31. model = "deepseek-ai/DeepSeek-V4-Flash-Vision-Exp"
  32. required_nodes = 2
  33. tensor_parallel_size = 2
  34. pipeline_parallel_size = 1
  35. distributed_backend = "mp"
  36. shm_size = "32gb"
  37. entrypoint = ["vllm", "serve"]
  38. args = [
  39. "--served-model-name", "deepseek-v4-vision",
  40. "--trust-remote-code",
  41. "--distributed-executor-backend", "mp",
  42. "--attention-backend", "B12X_MLA_SPARSE",
  43. "--moe-backend", "b12x",
  44. "--linear-backend", "b12x",
  45. "--kv-cache-dtype", "fp8",
  46. "--block-size", "256",
  47. "--gpu-memory-utilization", "0.80",
  48. "--kv-cache-memory", "12884901888",
  49. "--max-model-len", "393216",
  50. "--max-num-seqs", "8",
  51. "--max-num-batched-tokens", "8192",
  52. "--max-cudagraph-capture-size", "56",
  53. "--compilation-config", """
  54. '{"cudagraph_mode":"FULL_AND_PIECEWISE","custom_ops":["all"],"cudagraph_capture_sizes":[1,2,3,4,5,6,7,8]}'""",
  55. "--async-scheduling",
  56. "--no-scheduler-reserve-full-isl",
  57. "--enable-chunked-prefill",
  58. "--enable-prefix-caching",
  59. "--tokenizer-mode", "deepseek_v4",
  60. "--tool-call-parser", "deepseek_v4",
  61. "--enable-auto-tool-choice",
  62. "--reasoning-parser", "deepseek_v4",
  63. "--reasoning-config", """
  64. '{"reasoning_parser":"deepseek_v4","reasoning_start_str":"","reasoning_end_str":""}'""",
  65. "--default-chat-template-kwargs", """
  66. '{"thinking":false,"reasoning_effort":"low"}'""",
  67. "--speculative-config", """
  68. '{"method":"dspark","num_speculative_tokens":6,"draft_sample_method":"greedy","attention_backend":"B12X_MLA_SPARSE"}'""",
  69. "--disable-chunked-mm-input",
  70. "--limit-mm-per-prompt", """
  71. '{"image":4}'""",
  72. ]
  73. [env]
  74. # aidee runner envs (his guide, minus DCP2-only and fabric knobs)
  75. CUTE_DSL_ARCH = "sm_121a"
  76. VLLM_ENABLE_DSPARK = "1"
  77. VLLM_ENABLE_MTP = "0"
  78. NUM_SPECULATIVE_TOKENS = "6"
  79. DSPARK_DRAFT_SAMPLE_METHOD = "greedy"
  80. DSPARK_SPS_CURVE = "auto"
  81. VLLM_CUDAGRAPH_MODE = "FULL_AND_PIECEWISE"
  82. VISION_MHC = "1"
  83. MAX_CUDAGRAPH_CAPTURE_SIZE = "56"
  84. # proven 2x-lane knobs carried over
  85. VLLM_USE_AOT_COMPILE = "1"
  86. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  87. VLLM_USE_FLASHINFER_SAMPLER = "1"
  88. VLLM_USE_B12X_WO_PROJECTION = "1"
  89. VLLM_USE_B12X_FP8_GEMM = "1"
  90. VLLM_USE_B12X_MOE = "1"
  91. VLLM_USE_B12X_SPARSE_INDEXER = "1"
  92. B12X_MLA_SM120_UNIFIED = "1"
  93. B12X_MOE_FORCE_A8 = "1"
  94. HF_HUB_OFFLINE = "1"
  95. TRANSFORMERS_OFFLINE = "1"
  96. VLLM_NO_USAGE_STATS = "1"
  97. # Weights from per-node NVMe copies; extra_mounts stay AFTER args.
  98. [[extra_mounts]]
  99. host = "~/dsv4vision-hf"
  100. container = "/opt/local-hf"
  101. env = "HF_HOME"