recipe.toml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # DeepSeek-V4-Flash-Vision-Exp on 2× GB10 — AIDEN'S IMAGE (production-3.72-vision).
  2. #
  3. # aiden's vision guide translated to our 2-node ds4 launcher, RUN THROUGH HIS
  4. # OWN env-script entrypoint (/usr/local/bin/deepseek-v4-flash-2x-spark-
  5. # entrypoint → /tmp copy of /opt/vllm-src/serve-ds4-flash-spark.sh). The script
  6. # generates the full vllm serve command from the env below; do NOT add args —
  7. # the mod drops our launcher tail ($@) so his env stays the single source.
  8. #
  9. # Image: aidendle94/sparkrun-vllm-ds4-gb10:production-3.72-vision. Their TWO
  10. # vllm wheels: dist-packages (plain, no vision) and /opt/vllm-src/.venv
  11. # (multimodal-wrapped DeepseekV4 + DSpark/DCP fixes) — only his script picks
  12. # the right one. Production profile at TP4/DCP2: 66-71 tok/s @ acceptance
  13. # 3.5-3.8; this 2x run is his "DSpark, DCP1" profile (73.8-75.2 @ TP4).
  14. #
  15. # Required envs his script demands: NODE_RANK (mod derives from VLLM_HOST_IP
  16. # vs rank-0's IB IP), MASTER_ADDR (mod; ds4 = 192.168.200.17), VLLM_HOST_IP +
  17. # NCCL_IB_HCA/GID/SOCKET/GLOO/UCX/TP (launcher [nccl.ds4] + auto-GID).
  18. #
  19. # Boot markers: "DSpark draft model loaded: 97 params" → "Model loading took
  20. # ~82 GiB" → "GPU KV cache size" ≈ 600K (12 GiB pin at this GMU) → "Application
  21. # startup complete". Smoke: 47*83 → 3901 (thinking off) + image_url color ask.
  22. #
  23. # Known quirk: first image request ~6 s cold, ~1-2 s warm (partition kernel).
  24. engine = "vllm"
  25. name = "DeepSeek V4 Flash Vision-Exp (aiden image + env-script, 2x Spark, DSpark-6)"
  26. docker_image = "aidendle94/sparkrun-vllm-ds4-gb10:production-3.72-vision"
  27. model = "deepseek-ai/DeepSeek-V4-Flash-Vision-Exp"
  28. required_nodes = 2
  29. tensor_parallel_size = 2
  30. pipeline_parallel_size = 1
  31. distributed_backend = "mp"
  32. shm_size = "32gb"
  33. # his script copies /opt/vllm-src/serve-ds4-flash-spark.sh to /tmp and execs
  34. # it; the mod block below seds the "$@" tail off the SOURCE before that copy
  35. # (our launcher's appended model/args would otherwise duplicate his generated
  36. # ones), and derives NODE_RANK/MASTER_ADDR.
  37. entrypoint = ["/usr/local/bin/deepseek-v4-flash-2x-spark-entrypoint"]
  38. # (no args: the env-script builds everything; the launcher tail is dropped by
  39. # the mod below — if the sed ever fails, vllm errors on duplicate positional
  40. # and the boot aborts loudly instead of misconfiguring.)
  41. [mods]
  42. commands = [
  43. # rank-0 IB ip on ds4 (config.toml [cluster.ds4] rank 0 = dgx3 192.168.200.17)
  44. "export MASTER_ADDR=\"192.168.200.17\"",
  45. "if [ \"${VLLM_HOST_IP:-}\" = \"192.168.200.17\" ]; then export NODE_RANK=0; else export NODE_RANK=1; fi",
  46. "export MASTER_PORT=\"29511\"",
  47. "export PORT=\"30000\"",
  48. "export NODE_RANK=\"${NODE_RANK:-0}\"",
  49. # drop the forwarded "$@" his launcher appends to its generated vllm call
  50. # (our tail would duplicate his model positional); fail loudly if absent
  51. "sed -i '$s/ \\\"\\$@\\\"$//' /opt/vllm-src/serve-ds4-flash-spark.sh || exit 1",
  52. "grep -q 'vllm.entrypoints.cli.main serve' /opt/vllm-src/serve-ds4-flash-spark.sh",
  53. ]
  54. [env]
  55. # his script's inputs (same names verbatim; all other B12X_*/AOT/JIT knobs
  56. # the script exports itself)
  57. SPARK_HF_HOME = "/opt/local-hf"
  58. HF_HUB_OFFLINE = "1"
  59. TRANSFORMERS_OFFLINE = "1"
  60. NNODES = "2"
  61. TP_SIZE = "2"
  62. DCP_SIZE = "1"
  63. MODEL_ID = "deepseek-ai/DeepSeek-V4-Flash-Vision-Exp"
  64. DSPARK_MODEL_ID = "deepseek-ai/DeepSeek-V4-Flash-Vision-Exp"
  65. SERVED_MODEL_NAME = "deepseek-v4-vision"
  66. GPU_MEMORY_UTILIZATION = "0.80"
  67. KV_CACHE_MEMORY_BYTES = "12884901888"
  68. MAX_MODEL_LEN = "393216"
  69. MAX_NUM_SEQS = "8"
  70. MAX_NUM_BATCHED_TOKENS = "8192"
  71. MAX_CUDAGRAPH_CAPTURE_SIZE = "56"
  72. ENABLE_PREFIX_CACHING = "1"
  73. VLLM_ENABLE_DSPARK = "1"
  74. VLLM_ENABLE_MTP = "0"
  75. NUM_SPECULATIVE_TOKENS = "6"
  76. DSPARK_DRAFT_SAMPLE_METHOD = "greedy"
  77. DSPARK_SPS_CURVE = "auto"
  78. VLLM_CUDAGRAPH_MODE = "FULL_AND_PIECEWISE"
  79. VISION_MHC = "1"
  80. # KDA/CKV gather is a DCP-side lane; DCP1 needs none of the VLLM_DSV4_CKV_*
  81. # Weights from the SHARED NAS HF cache (all 4 nodes mount nas.lan:/sna as
  82. # /mnt/nas; dgx4 got a /mnt/nas -> /mnt symlink). The Vision-Exp snapshot AND
  83. # the DSpark draft repo live there — the local NVMe copy lacked the draft
  84. # (LocalEntryNotFound). One shared source of truth beats a per-node copy.
  85. [[extra_mounts]]
  86. host = "/mnt/nas/ai/huggingface"
  87. container = "/opt/local-hf"
  88. env = "HF_HOME"