recipe.toml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # DeepSeek-V4-Flash-Vision-Exp — eugr B12X variant (vLLM) — 2× DGX Spark, TP=2.
  2. #
  3. # The eugr-stack A/B cell against our fork lane `dsv4-flash-vision` (same
  4. # model, same node shape; their prebuilt image vs our dsv4-flash-vision:local
  5. # overlay + dsv4_vision plugin). Port of eugr's deepseek-v4-flash-0731.yaml
  6. # shape (eugr/spark-vllm-docker @ main) onto the Vision-Exp model.
  7. #
  8. # Image: eugr/spark-vllm-b12x:nightly-20260904 (digest c3b44d3f…, = :latest).
  9. # local-inference-lab/vllm dev/jovian-judgement 09-04 tip (ref switched from
  10. # dev/infernal-invocation by their e91bc76, 09-03) + lukealonso/b12x @ master
  11. # + their patch set; torch 2.13.0, CUDA 13.0.2, cutlass-dsl 4.7.0.
  12. # NOTE: image ships NO ENTRYPOINT → entrypoint = ["vllm","serve"] below.
  13. # Exact b12x pin baked in-image: /workspace/b12x-source-commit.
  14. #
  15. # Model: deepseek-ai/DeepSeek-V4-Flash-Vision-Exp (MIT; ~168 GB on disk,
  16. # experts MXFP4 / attention FP8, 32-layer ViT BF16). Reuse the per-node
  17. # local NVMe copies from the fork lane if present (~/dsv4vision-hf on
  18. # dgx3/dgx4, rsync'd 2026-09-01 — check the HF_HOME mapping); else
  19. # huggingface-cli download on BOTH nodes (HF_HUB_OFFLINE=1 below).
  20. #
  21. # Diffs vs the fork lane (dsv4-flash-vision) — deliberate parity choices:
  22. # - attention backend: plain B12X (their 09-03 switch away from
  23. # B12X_MLA_SPARSE) — the fork lane keeps B12X_MLA_SPARSE
  24. # - VLLM_USE_MEGA_AOT_ARTIFACT=1 (their 09-03 switch; fork lane: -1)
  25. # - max-cudagraph-capture-size 48 (their 09-03 value)
  26. # - spec: vendor card k=3 + enable_adaptive_verification (published:
  27. # 2.99 mean acceptance, 66.3%); k=6 (fork lane's proven value) is the
  28. # fallback if adaptive verification misbehaves on this stack
  29. # - VLLM_USE_B12X_MHC forced 0 like the fork lane: this checkpoint has
  30. # rms_norm_eps 1e-20, the fused Gram mHC kernel only accepts 1e-6
  31. # - no dsv4_vision plugin (their image has stock vLLM vision path) — if
  32. # boot fails on the vision processor, that's the first suspect
  33. #
  34. # REFERENCE:
  35. # https://github.com/eugr/spark-vllm-docker (recipes/deepseek-v4-flash-0731.yaml)
  36. # https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-Vision-Exp
  37. # https://recipes.vllm.ai/deepseek-ai/DeepSeek-V4-Flash-Vision-Exp
  38. engine = "vllm"
  39. name = "DeepSeek V4 Flash Vision-Exp (vLLM, 2x Spark, eugr B12X, DSpark-3)"
  40. docker_image = "eugr/spark-vllm-b12x:nightly-20260904"
  41. model = "deepseek-ai/DeepSeek-V4-Flash-Vision-Exp"
  42. required_nodes = 2
  43. tensor_parallel_size = 2
  44. pipeline_parallel_size = 1
  45. distributed_backend = "mp"
  46. shm_size = "32gb"
  47. # image ships no ENTRYPOINT — the launcher supplies the vllm command
  48. entrypoint = ["vllm", "serve"]
  49. args = [
  50. # Stable served name (shared with the fork lane — quant/stack-agnostic)
  51. "--served-model-name", "deepseek-v4-flash-vision",
  52. "--trust-remote-code",
  53. "--distributed-executor-backend", "mp",
  54. # eugr 0731 shape: full b12x cluster, plain B12X attention (09-03 switch)
  55. "--moe-backend", "b12x",
  56. "--linear-backend", "b12x",
  57. "--attention-backend", "B12X",
  58. "--max-model-len", "1048576",
  59. "--kv-cache-dtype", "fp8",
  60. # fork lane's proven pool for this checkpoint on 2 Sparks (1.25M tokens)
  61. "--kv-cache-memory-bytes", "12884901888",
  62. "--gpu-memory-utilization", "0.85",
  63. "--max-num-seqs", "2",
  64. "--max-num-batched-tokens", "8192",
  65. "--block-size", "256",
  66. "--max-cudagraph-capture-size", "48",
  67. # vendor card (published numbers): DSpark k=3, probabilistic, adaptive
  68. "--speculative-config", """
  69. '{"method":"dspark","num_speculative_tokens":3,"draft_sample_method":"probabilistic","attention_backend":"B12X","enable_adaptive_verification":true}'""",
  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":false,"reasoning_effort":"low"}'""",
  78. "--limit-mm-per-prompt", """
  79. '{"image":8}'""",
  80. "--enable-prefix-caching",
  81. "--load-format", "instanttensor",
  82. ]
  83. [env]
  84. CUTE_DSL_ARCH = "sm_121a"
  85. VLLM_USE_AOT_COMPILE = "1"
  86. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  87. VLLM_USE_MEGA_AOT_ARTIFACT = "1"
  88. VLLM_MEMORY_PROFILE_INCLUDE_ATTN = "1"
  89. VLLM_USE_FLASHINFER_SAMPLER = "1"
  90. VLLM_USE_B12X_WO_PROJECTION = "1"
  91. # OFF for this checkpoint (rms_norm_eps 1e-20 — see header); their 0731
  92. # text recipe sets it 1, but the model constraint wins
  93. VLLM_USE_B12X_MHC = "0"
  94. VLLM_USE_B12X_FP8_GEMM = "1"
  95. VLLM_USE_B12X_MOE = "1"
  96. VLLM_USE_B12X_SPARSE_INDEXER = "1"
  97. VLLM_USE_V2_MODEL_RUNNER = "1"
  98. B12X_MLA_SM120_UNIFIED = "1"
  99. B12X_MOE_FORCE_A8 = "1"
  100. HF_HUB_OFFLINE = "1"
  101. VLLM_ENGINE_READY_TIMEOUT_S = "3600"