recipe.toml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. engine = "vllm"
  21. name = "DeepSeek V4 Flash Vision-Exp (aiden image, 2x Spark, DSpark-6)"
  22. docker_image = "aidendle94/sparkrun-vllm-ds4-gb10:production-3.72-vision"
  23. model = "deepseek-ai/DeepSeek-V4-Flash-Vision-Exp"
  24. required_nodes = 2
  25. tensor_parallel_size = 2
  26. pipeline_parallel_size = 1
  27. distributed_backend = "mp"
  28. shm_size = "32gb"
  29. # required for the launcher's `--entrypoint sh -c` override path (mods),
  30. # which also replaces the image's baked env-script entrypoint.
  31. entrypoint = ["vllm", "serve"]
  32. args = [
  33. "--served-model-name", "deepseek-v4-vision",
  34. "--trust-remote-code",
  35. "--attention-backend", "B12X_MLA_SPARSE",
  36. "--moe-backend", "b12x",
  37. "--linear-backend", "b12x",
  38. "--kv-cache-dtype", "fp8",
  39. "--block-size", "256",
  40. # his verified 2x (TP2) values: 0.75 fails KV alloc, 0.82 leaves one rank
  41. # short, 0.85 works; KV pin left OFF (a pin caps the pool ~26 GB/rank and
  42. # hides the layout headroom)
  43. "--gpu-memory-utilization", "0.85",
  44. "--max-model-len", "393216",
  45. "--max-num-seqs", "8",
  46. "--max-num-batched-tokens", "8192",
  47. "--max-cudagraph-capture-size", "56",
  48. "--compilation-config", """
  49. '{"cudagraph_mode":"FULL_AND_PIECEWISE","custom_ops":["all"]}'""",
  50. "--async-scheduling",
  51. "--no-scheduler-reserve-full-isl",
  52. "--enable-chunked-prefill",
  53. "--enable-prefix-caching",
  54. "--tokenizer-mode", "deepseek_v4",
  55. "--tool-call-parser", "deepseek_v4",
  56. "--enable-auto-tool-choice",
  57. "--reasoning-parser", "deepseek_v4",
  58. "--reasoning-config", """
  59. '{"reasoning_parser":"deepseek_v4","reasoning_start_str":"","reasoning_end_str":""}'""",
  60. "--default-chat-template-kwargs", """
  61. '{"thinking":true}'""",
  62. "--speculative-config", """
  63. '{"method":"dspark","num_speculative_tokens":6,"draft_sample_method":"greedy"}'""",
  64. "--disable-chunked-mm-input",
  65. "--limit-mm-per-prompt", """
  66. '{"image":4}'""",
  67. ]
  68. [mods]
  69. commands = [
  70. # (mods exist so the launcher takes the --entrypoint sh override path;
  71. # the pre-serve work — page-cache flush — is done host-side by before_serve)
  72. "true",
  73. ]
  74. [env]
  75. CUTE_DSL_ARCH = "sm_121a"
  76. VLLM_ENABLE_DSPARK = "1"
  77. VLLM_ENABLE_MTP = "0"
  78. NUM_SPECULATIVE_TOKENS = "6"
  79. DSPARK_DRAFT_SAMPLE_METHOD = "greedy"
  80. DSPARK_SPS_CURVE = "auto"
  81. VLLM_CUDAGRAPH_MODE = "FULL_AND_PIECEWISE"
  82. VISION_MHC = "1"
  83. MAX_CUDAGRAPH_CAPTURE_SIZE = "56"
  84. # (DCP prefill gather envs are DCP2-only; DCP1 here needs none)
  85. HF_HUB_OFFLINE = "1"
  86. TRANSFORMERS_OFFLINE = "1"
  87. VLLM_NO_USAGE_STATS = "1"