recipe.toml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # DeepSeek-V4-Flash-Vision-Exp on 2× GB10 — aiden image, flag route.
  2. #
  3. # aidendle94/sparkrun-vllm-ds4-gb10:production-3.72-vision, TP2 over ds4.
  4. # His production 2x DSpark-6 profile translated to our launcher shape: his
  5. # own serve line (moe/linear b12x, B12X_MLA_SPARSE attention, fp8 KV, block
  6. # 256, DSpark-6 greedy, graphs FULL_AND_PIECEWISE) as plain flags — the
  7. # image's BAKED-IN entrypoint is his env-script (which doubles our tail args
  8. # if left in place), so the recipe sets entrypoint = ["vllm","serve"] and one
  9. # mods line, which makes the launcher wrap everything in `--entrypoint sh -c`
  10. # and exec our tail directly with the image's system vllm — which IS his
  11. # multimodal wheel (the dist-packages vllm here carries the DeepseekV4 vision
  12. # wrap; the earlier "not multimodal" 400s came from OUR overlay image, not
  13. # this one).
  14. #
  15. # Weights from the SHARED NAS HF cache (all 4 nodes mount nas.lan:/sna as
  16. # /mnt/nas; the repo's refs/main resolves offline). 2x reference: his 4x
  17. # DCP1 DSpark profile is 73.8-75.2 tok/s; 2x should sit below that.
  18. # Boot markers: "Model loading took ~82 GiB" → "GPU KV cache size" →
  19. # "Application startup complete". Smoke: 47*83 → 3901 + image_url ask.
  20. #
  21. # PARKED 2026-09-03 (2x aiden image): after clean weight load (82 GiB), the
  22. # warmup dies in the B12X sparse attention O-proj —
  23. # DeepGEMM fp8_einsum "layout.hpp:39: t.dim() == N" (shared by the
  24. # FlashMLA/FlashInfer sparse paths). Reproduced on his verified TP2 values
  25. # (GMU 0.85, KV pin off) and with the KV pin at 12 GiB. The 4x production
  26. # shape (DCP2) is the lane that carries the profile; 2x vision stays on our
  27. # proven dsv4-flash-vision overlay image (88/100) until the TP2 o_proj path
  28. # is sorted.
  29. engine = "vllm"
  30. name = "DeepSeek V4 Flash Vision-Exp (aiden image, 2x Spark, DSpark-6)"
  31. docker_image = "aidendle94/sparkrun-vllm-ds4-gb10:production-3.72-vision"
  32. model = "deepseek-ai/DeepSeek-V4-Flash-Vision-Exp"
  33. required_nodes = 2
  34. tensor_parallel_size = 2
  35. pipeline_parallel_size = 1
  36. distributed_backend = "mp"
  37. shm_size = "32gb"
  38. # required for the launcher's `--entrypoint sh -c` override path (mods),
  39. # which also replaces the image's baked env-script entrypoint.
  40. entrypoint = ["vllm", "serve"]
  41. args = [
  42. "--served-model-name", "deepseek-v4-vision",
  43. "--trust-remote-code",
  44. "--attention-backend", "B12X_MLA_SPARSE",
  45. "--moe-backend", "b12x",
  46. "--linear-backend", "b12x",
  47. "--kv-cache-dtype", "fp8",
  48. "--block-size", "256",
  49. # his verified 2x (TP2) values: 0.75 fails KV alloc, 0.82 leaves one rank
  50. # short, 0.85 works; KV pin left OFF (a pin caps the pool ~26 GB/rank and
  51. # hides the layout headroom)
  52. "--gpu-memory-utilization", "0.85",
  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. # the pre-serve work — page-cache flush — is done host-side by before_serve)
  81. "true",
  82. ]
  83. [env]
  84. CUTE_DSL_ARCH = "sm_121a"
  85. VLLM_ENABLE_DSPARK = "1"
  86. VLLM_ENABLE_MTP = "0"
  87. NUM_SPECULATIVE_TOKENS = "6"
  88. DSPARK_DRAFT_SAMPLE_METHOD = "greedy"
  89. DSPARK_SPS_CURVE = "auto"
  90. VLLM_CUDAGRAPH_MODE = "FULL_AND_PIECEWISE"
  91. VISION_MHC = "1"
  92. MAX_CUDAGRAPH_CAPTURE_SIZE = "56"
  93. # (DCP prefill gather envs are DCP2-only; DCP1 here needs none)
  94. HF_HUB_OFFLINE = "1"
  95. TRANSFORMERS_OFFLINE = "1"
  96. VLLM_NO_USAGE_STATS = "1"