recipe.toml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # DeepSeek-V4-Flash-Vision-Exp on 4× GB10 — aiden production profile. DEFERRED.
  2. #
  3. # Source: https://aidenle.com/recipes/deepseek-v4-flash-vision-4x-dgx-spark/
  4. # TP4 across 4 nodes with **DCP2 inside it** and DSpark-6 running together —
  5. # the combination stock vLLM refuses twice ("DSpark requires DCP_SIZE=1" +
  6. # "Non-causal DSpark SWA does not support DCP"); aiden's image resolves it by
  7. # marking the draft's sliding-window cache `dcp_replicated` (full ctx on every
  8. # rank, cost-free for a few hundred tokens). Shipped profile numbers:
  9. # decode 66-71 tok/s @ acceptance 3.5-3.8; cold 334K prefill 2,088 tok/s;
  10. # KV pool 3.51M tokens (8.9× full-length ctx); 393K ctx verified;
  11. # image request ~1.2 s warm / ~6 s first.
  12. #
  13. # Profile trade (his table): DSpark+DCP1 73.8-75.2 / DCP2-no-spec 34 /
  14. # DSpark+DCP2 66-71 (DCP1 pool 1.77M vs DCP2 3.51M — KV doubled at ~7% decode).
  15. #
  16. # NOT READY TO DEPLOY: needs a 4-node cluster window. Fabric NCCL envs omitted
  17. # here (launcher-managed, [nccl.*]). His runner envs carrying operational
  18. # requirements: earlyoom tuned on every node, root for RDMA passthrough +
  19. # memlock + page-cache flushing, ~120 GB free per node for weights + JIT cache.
  20. #
  21. # Env/flag deltas vs our 2x variant (dsv4-vision-aiden-2x): DCP_SIZE=2,
  22. # --decode-context-parallel-size 2 --dcp-comm-backend ag_rs (ag_rs = +12% KV
  23. # over a2a), KV_CACHE_MEMORY_BYTES unpin (empty — the ~26 GB cap off),
  24. # GPU_MEMORY_UTILIZATION 0.75 (0.82 → earlyoom kills a worker on his kit),
  25. # VLLM_DSV4_CKV_GATHER=1 + CKV_GATHER_MAX_TOKENS + ALLOW_IMAGES (prefill
  26. # gather required for images under DCP).
  27. engine = "vllm"
  28. name = "DeepSeek V4 Flash Vision-Exp (aiden image, 4x Spark, DSpark-6 + DCP2) [DEFERRED]"
  29. docker_image = "aidendle94/sparkrun-vllm-ds4-gb10:production-3.72-vision"
  30. model = "deepseek-ai/DeepSeek-V4-Flash-Vision-Exp"
  31. required_nodes = 4
  32. tensor_parallel_size = 4
  33. pipeline_parallel_size = 1
  34. distributed_backend = "mp"
  35. shm_size = "32gb"
  36. # image ships ENTRYPOINT ["vllm","serve"]; our launcher passes the recipe
  37. # entrypoint as CMD words after the image, which would double it. Empty clears.
  38. entrypoint = []
  39. args = [
  40. "--served-model-name", "deepseek-v4-vision",
  41. "--trust-remote-code",
  42. "--distributed-executor-backend", "mp",
  43. "--decode-context-parallel-size", "2",
  44. "--dcp-comm-backend", "ag_rs",
  45. "--attention-backend", "B12X_MLA_SPARSE",
  46. "--moe-backend", "b12x",
  47. "--linear-backend", "b12x",
  48. "--kv-cache-dtype", "fp8",
  49. "--block-size", "256",
  50. "--gpu-memory-utilization", "0.75",
  51. "--max-model-len", "393216",
  52. "--max-num-seqs", "8",
  53. "--max-num-batched-tokens", "8192",
  54. "--max-cudagraph-capture-size", "56",
  55. "--compilation-config", """
  56. '{"cudagraph_mode":"FULL_AND_PIECEWISE","custom_ops":["all"]}'""",
  57. "--async-scheduling",
  58. "--no-scheduler-reserve-full-isl",
  59. "--enable-chunked-prefill",
  60. "--enable-prefix-caching",
  61. "--tokenizer-mode", "deepseek_v4",
  62. "--tool-call-parser", "deepseek_v4",
  63. "--enable-auto-tool-choice",
  64. "--reasoning-parser", "deepseek_v4",
  65. "--reasoning-config", """
  66. '{"reasoning_parser":"deepseek_v4","reasoning_start_str":"","reasoning_end_str":""}'""",
  67. "--default-chat-template-kwargs", """
  68. '{"thinking":true}'""",
  69. "--speculative-config", """
  70. '{"method":"dspark","num_speculative_tokens":6,"draft_sample_method":"greedy"}'""",
  71. "--disable-chunked-mm-input",
  72. "--limit-mm-per-prompt", """
  73. '{"image":4}'""",
  74. ]
  75. [env]
  76. CUTE_DSL_ARCH = "sm_121a"
  77. VLLM_ENABLE_DSPARK = "1"
  78. VLLM_ENABLE_MTP = "0"
  79. NUM_SPECULATIVE_TOKENS = "6"
  80. DSPARK_DRAFT_SAMPLE_METHOD = "greedy"
  81. DSPARK_SPS_CURVE = "auto"
  82. VLLM_CUDAGRAPH_MODE = "FULL_AND_PIECEWISE"
  83. VISION_MHC = "1"
  84. MAX_CUDAGRAPH_CAPTURE_SIZE = "56"
  85. # DCP prefill gather (images)
  86. VLLM_DSV4_CKV_GATHER = "1"
  87. VLLM_DSV4_CKV_GATHER_MAX_TOKENS = "393216"
  88. VLLM_DSV4_CKV_ALLOW_IMAGES = "1"
  89. HF_HUB_OFFLINE = "1"
  90. TRANSFORMERS_OFFLINE = "1"
  91. VLLM_NO_USAGE_STATS = "1"
  92. [[extra_mounts]]
  93. host = "~/dsv4vision-hf"
  94. container = "/opt/local-hf"
  95. env = "HF_HOME"