recipe.toml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # DeepSeek-V4-Flash-Vision-Exp on 4× GB10 — aiden production profile. PARKED.
  2. #
  3. # 2026-09-03: parked — this image's FP8 O-proj einsum path (B12X/FlashMLA/
  4. # FlashInfer sparse attention shared kernel, DeepGEMM fp8_einsum) hard-asserts
  5. # "layout.hpp:39: t.dim() == N" at warmup on our GB10s in EVERY config tried
  6. # (2x TP2 GMU 0.85 no-pin; 4x TP4+DCP2 — his exact production shape). It is a
  7. # kernel/JIT layout issue in the image on our hardware, not a flag difference.
  8. # Vision lanes stay on our proven dsv4-flash-vision overlay image (2x: 88/100).
  9. #
  10. # Source: https://aidenle.com/recipes/deepseek-v4-flash-vision-4x-dgx-spark/
  11. # TP4 across 4 nodes with **DCP2 inside it** and DSpark-6 running together —
  12. # the combination stock vLLM refuses twice ("DSpark requires DCP_SIZE=1" +
  13. # "Non-causal DSpark SWA does not support DCP"); aiden's image resolves it by
  14. # marking the draft's sliding-window cache `dcp_replicated` (full ctx on every
  15. # rank, cost-free for a few hundred tokens). Shipped profile numbers:
  16. # decode 66-71 tok/s @ acceptance 3.5-3.8; cold 334K prefill 2,088 tok/s;
  17. # KV pool 3.51M tokens (8.9× full-length ctx); 393K ctx verified;
  18. # image request ~1.2 s warm / ~6 s first.
  19. #
  20. # Profile trade (his table): DSpark+DCP1 73.8-75.2 / DCP2-no-spec 34 /
  21. # DSpark+DCP2 66-71 (DCP1 pool 1.77M vs DCP2 3.51M — KV doubled at ~7% decode).
  22. #
  23. # NOT READY TO DEPLOY: needs a 4-node cluster window. Fabric NCCL envs omitted
  24. # here (launcher-managed, [nccl.*]). His runner envs carrying operational
  25. # requirements: earlyoom tuned on every node, root for RDMA passthrough +
  26. # memlock + page-cache flushing, ~120 GB free per node for weights + JIT cache.
  27. #
  28. # Env/flag deltas vs our 2x variant (dsv4-vision-aiden-2x): DCP_SIZE=2,
  29. # --decode-context-parallel-size 2 --dcp-comm-backend ag_rs (ag_rs = +12% KV
  30. # over a2a), KV_CACHE_MEMORY_BYTES unpin (empty — the ~26 GB cap off),
  31. # GPU_MEMORY_UTILIZATION 0.75 (0.82 → earlyoom kills a worker on his kit),
  32. # VLLM_DSV4_CKV_GATHER=1 + CKV_GATHER_MAX_TOKENS + ALLOW_IMAGES (prefill
  33. # gather required for images under DCP).
  34. engine = "vllm"
  35. name = "DeepSeek V4 Flash Vision-Exp (aiden image, 4x Spark, DSpark-6 + DCP2) [DEFERRED]"
  36. docker_image = "aidendle94/sparkrun-vllm-ds4-gb10:production-3.72-vision"
  37. model = "deepseek-ai/DeepSeek-V4-Flash-Vision-Exp"
  38. required_nodes = 4
  39. tensor_parallel_size = 4
  40. pipeline_parallel_size = 1
  41. distributed_backend = "mp"
  42. shm_size = "32gb"
  43. # the image's BAKED-IN entrypoint is aiden's env-script (doubles our tail
  44. # args if left in place). The entrypoint below + one mods line makes the
  45. # launcher wrap in `--entrypoint sh -c` and exec `vllm serve <model> <args>`
  46. # directly with the image's system vllm (his multimodal wheel).
  47. entrypoint = ["vllm", "serve"]
  48. args = [
  49. "--served-model-name", "deepseek-v4-vision",
  50. "--trust-remote-code",
  51. "--distributed-executor-backend", "mp",
  52. "--decode-context-parallel-size", "2",
  53. "--dcp-comm-backend", "ag_rs",
  54. "--attention-backend", "B12X_MLA_SPARSE",
  55. "--moe-backend", "b12x",
  56. "--linear-backend", "b12x",
  57. "--kv-cache-dtype", "fp8",
  58. "--block-size", "256",
  59. "--gpu-memory-utilization", "0.75",
  60. "--max-model-len", "393216",
  61. "--max-num-seqs", "8",
  62. "--max-num-batched-tokens", "8192",
  63. "--max-cudagraph-capture-size", "56",
  64. "--compilation-config", """
  65. '{"cudagraph_mode":"FULL_AND_PIECEWISE","custom_ops":["all"]}'""",
  66. "--async-scheduling",
  67. "--no-scheduler-reserve-full-isl",
  68. "--enable-chunked-prefill",
  69. "--enable-prefix-caching",
  70. "--tokenizer-mode", "deepseek_v4",
  71. "--tool-call-parser", "deepseek_v4",
  72. "--enable-auto-tool-choice",
  73. "--reasoning-parser", "deepseek_v4",
  74. "--reasoning-config", """
  75. '{"reasoning_parser":"deepseek_v4","reasoning_start_str":"","reasoning_end_str":""}'""",
  76. "--default-chat-template-kwargs", """
  77. '{"thinking":true}'""",
  78. "--speculative-config", """
  79. '{"method":"dspark","num_speculative_tokens":6,"draft_sample_method":"greedy"}'""",
  80. "--disable-chunked-mm-input",
  81. "--limit-mm-per-prompt", """
  82. '{"image":4}'""",
  83. ]
  84. [mods]
  85. commands = [
  86. # (mods exist so the launcher takes the --entrypoint sh override path)
  87. "true",
  88. ]
  89. [env]
  90. CUTE_DSL_ARCH = "sm_121a"
  91. VLLM_ENABLE_DSPARK = "1"
  92. VLLM_ENABLE_MTP = "0"
  93. NUM_SPECULATIVE_TOKENS = "6"
  94. DSPARK_DRAFT_SAMPLE_METHOD = "greedy"
  95. DSPARK_SPS_CURVE = "auto"
  96. VLLM_CUDAGRAPH_MODE = "FULL_AND_PIECEWISE"
  97. VISION_MHC = "1"
  98. MAX_CUDAGRAPH_CAPTURE_SIZE = "56"
  99. # DCP prefill gather (images)
  100. VLLM_DSV4_CKV_GATHER = "1"
  101. VLLM_DSV4_CKV_GATHER_MAX_TOKENS = "393216"
  102. VLLM_DSV4_CKV_ALLOW_IMAGES = "1"
  103. HF_HUB_OFFLINE = "1"
  104. TRANSFORMERS_OFFLINE = "1"
  105. VLLM_NO_USAGE_STATS = "1"