recipe.toml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. # the image's BAKED-IN entrypoint is aiden's env-script (doubles our tail
  37. # args if left in place). The entrypoint below + one mods line makes the
  38. # launcher wrap in `--entrypoint sh -c` and exec `vllm serve <model> <args>`
  39. # directly with the image's system vllm (his multimodal wheel).
  40. entrypoint = ["vllm", "serve"]
  41. args = [
  42. "--served-model-name", "deepseek-v4-vision",
  43. "--trust-remote-code",
  44. "--distributed-executor-backend", "mp",
  45. "--decode-context-parallel-size", "2",
  46. "--dcp-comm-backend", "ag_rs",
  47. "--attention-backend", "B12X_MLA_SPARSE",
  48. "--moe-backend", "b12x",
  49. "--linear-backend", "b12x",
  50. "--kv-cache-dtype", "fp8",
  51. "--block-size", "256",
  52. "--gpu-memory-utilization", "0.75",
  53. "--max-model-len", "393216",
  54. "--max-num-seqs", "8",
  55. "--max-num-batched-tokens", "8192",
  56. "--max-cudagraph-capture-size", "56",
  57. "--compilation-config", """
  58. '{"cudagraph_mode":"FULL_AND_PIECEWISE","custom_ops":["all"]}'""",
  59. "--async-scheduling",
  60. "--no-scheduler-reserve-full-isl",
  61. "--enable-chunked-prefill",
  62. "--enable-prefix-caching",
  63. "--tokenizer-mode", "deepseek_v4",
  64. "--tool-call-parser", "deepseek_v4",
  65. "--enable-auto-tool-choice",
  66. "--reasoning-parser", "deepseek_v4",
  67. "--reasoning-config", """
  68. '{"reasoning_parser":"deepseek_v4","reasoning_start_str":"","reasoning_end_str":""}'""",
  69. "--default-chat-template-kwargs", """
  70. '{"thinking":true}'""",
  71. "--speculative-config", """
  72. '{"method":"dspark","num_speculative_tokens":6,"draft_sample_method":"greedy"}'""",
  73. "--disable-chunked-mm-input",
  74. "--limit-mm-per-prompt", """
  75. '{"image":4}'""",
  76. ]
  77. [mods]
  78. commands = [
  79. # (mods exist so the launcher takes the --entrypoint sh override path)
  80. "true",
  81. ]
  82. [env]
  83. CUTE_DSL_ARCH = "sm_121a"
  84. VLLM_ENABLE_DSPARK = "1"
  85. VLLM_ENABLE_MTP = "0"
  86. NUM_SPECULATIVE_TOKENS = "6"
  87. DSPARK_DRAFT_SAMPLE_METHOD = "greedy"
  88. DSPARK_SPS_CURVE = "auto"
  89. VLLM_CUDAGRAPH_MODE = "FULL_AND_PIECEWISE"
  90. VISION_MHC = "1"
  91. MAX_CUDAGRAPH_CAPTURE_SIZE = "56"
  92. # DCP prefill gather (images)
  93. VLLM_DSV4_CKV_GATHER = "1"
  94. VLLM_DSV4_CKV_GATHER_MAX_TOKENS = "393216"
  95. VLLM_DSV4_CKV_ALLOW_IMAGES = "1"
  96. HF_HUB_OFFLINE = "1"
  97. TRANSFORMERS_OFFLINE = "1"
  98. VLLM_NO_USAGE_STATS = "1"