recipe.toml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. # DeepSeek-V4.1-Flash — local-inference-lab r36 (jovian-judgement), 4x DCP1.
  2. #
  3. # THE lab's first published DS4.1 lock (qualified 2026-09-12): their image
  4. # localinferencelab/vllm:jovian-judgement-community-20260912-r36 serves GLM
  5. # (r35 lane) + DS4.1 (this recipe) in one two-layer image. We build the same
  6. # source composition for GB10 sm_121a from our own build dir
  7. # (docker-images/glm53-jovian-r27, profile jovian-r36-ds41 — the r36 delta
  8. # over our r35 pins is only vLLM 202a11a98eb + b12x 323107ff + liburing 2.5;
  9. # LMCache/FlashKDA/DeepGEMM/FI/torch are the SAME pins as the r35 build).
  10. #
  11. # Lab DS4.1 serving profile (models/deepseek-v4.1-flash.md, compose +
  12. # serve-ds41-jovian.sh/serve-ds41-flash.sh in the repo): TP4/DCP1, native
  13. # DSpark K7 (draft weights INSIDE the target checkpoint — no separate draft
  14. # download), greedy draft + standard rejection + adaptive verification,
  15. # B12X attention/MoE/linear, 131K context, 4 seqs / 4096 batched, block 256,
  16. # FULL_AND_PIECEWISE graphs capped at 128, InstantTensor, Engram ngram tables
  17. # in disk mode (io_uring; their 188.83 GiB RAM mode cannot fit a GB10 node —
  18. # 121.63 GiB unified pool).
  19. #
  20. # GB10 deviations from the RTX-qualified profile (documented):
  21. # - GMU 0.88 (theirs 0.95 on 96 GB RTX hosts; 0.95 fails GB10's startup
  22. # free-mem gate — the #48140 class, see the glm53 r35 recipe notes).
  23. # - CUTE_DSL_ARCH=sm_121a / arch 12.1a (theirs sm_120a; the published
  24. # image's native extension is sm_120 SASS — ours is built for GB10).
  25. # - NO VLLM_ENABLE_PCIE_ALLREDUCE (theirs is single-host PCIe; on our
  26. # 4-node switch fabric the launcher's NCCL/RoCE env is the transport).
  27. # - Engram disk mode on the shared NAS: our current dsv41 prod already
  28. # runs this checkpoint with Engram-on-disk over the same NFS, so the
  29. # storage path is proven; their liburing io_uring fast path is the new
  30. # bit (falls through to normal reads if the kernel/NFS combo refuses).
  31. # - VLLM_USE_V2_MODEL_RUNNER/AOT/MEGA_AOT env from their serve script
  32. # (their image bakes them; ours must carry them explicitly).
  33. #
  34. # A/B target: the current dsv41 prod (eugr image, DSpark K5 probabilistic,
  35. # 167/176, 1,642 pp / 47.0 tg / 1,738 ms TTFT @d0 c1, 512K, dev65). Same
  36. # bench (tool-eval-bench dev65, seed 42, hardmode, c1/c2) — the clean delta
  37. # isolates the engine stack (K7+adaptive+V2-runner+AOT+b12x-moe vs K5).
  38. engine = "vllm"
  39. name = "DeepSeek-V4.1-Flash (jovian r36 img, 4x DCP1, DSpark K7 greedy + Engram disk)"
  40. docker_image = "jovian-r36-ds41:local"
  41. docker_image_dir = "glm53-jovian-r27"
  42. build_profile = "jovian-r36-ds41"
  43. model = "deepseek-ai/DeepSeek-V4.1-Flash"
  44. parent_model = "deepseek-ai/DeepSeek-V4.1-Flash"
  45. required_nodes = 4
  46. tensor_parallel_size = 4
  47. pipeline_parallel_size = 1
  48. distributed_backend = "mp"
  49. shm_size = "32gb"
  50. # Our r27 build dir images ship with ENTRYPOINT [] — set it explicitly.
  51. entrypoint = ["vllm", "serve"]
  52. args = [
  53. "--served-model-name", "dsv41",
  54. "--trust-remote-code",
  55. "--distributed-executor-backend", "mp",
  56. # GB10 startup-gate value (see header); KV pool is engine-computed from
  57. # the remainder (no pin — their profile pins nothing either).
  58. "--gpu-memory-utilization", "0.88",
  59. # Their qualified DS4.1 profile (RTX quartet, TP4/DCP1, 131K):
  60. "--decode-context-parallel-size", "1",
  61. "--max-model-len", "131072",
  62. "--max-num-seqs", "4",
  63. "--max-num-batched-tokens", "4096",
  64. "--prefill-compute-share", "0.4",
  65. "--block-size", "256",
  66. "--enable-chunked-prefill",
  67. "--enable-prefix-caching",
  68. "--kv-cache-dtype", "fp8",
  69. "--attention-backend", "B12X",
  70. "--linear-backend", "b12x",
  71. "--moe-backend", "b12x",
  72. "--compilation-config", """
  73. '{"cudagraph_mode":"FULL_AND_PIECEWISE"}'""",
  74. "--max_cudagraph_capture_size", "128",
  75. # Native DSpark K7 — the draft weights live inside the target checkpoint
  76. # (no separate draft repo). Greedy draft, standard rejection, adaptive
  77. # verification (the lab's r36 qualified trio vs our prod's K5
  78. # probabilistic/block).
  79. "--speculative-config", """
  80. '{"method":"dspark","num_speculative_tokens":7,"draft_tensor_parallel_size":4,"attention_backend":"B12X","draft_sample_method":"greedy","rejection_sample_method":"standard","enable_adaptive_verification":true}'""",
  81. # Engram: the model's 196B learned ngram lookup storage. disk mode =
  82. # io_uring reads of the table rows from the checkpoint dir (bounded
  83. # staging; NOT pinned RAM). cpu_offload stays false (no generic CPU
  84. # model offload).
  85. "--engram-config", """
  86. '{"cpu_offload":false,"table_memory":"disk"}'""",
  87. "--load-format", "instanttensor",
  88. "--safetensors-load-strategy", "lazy",
  89. "--generation-config", "vllm",
  90. "--override-generation-config", """
  91. '{"temperature":1.0,"top_p":0.95}'""",
  92. "--limit-mm-per-prompt", """
  93. '{"image":2}'""",
  94. "--reasoning-parser", "deepseek_v41",
  95. "--tool-call-parser", "deepseek_v41",
  96. "--enable-auto-tool-choice",
  97. "--jit-monitor-mode", "error",
  98. ]
  99. [env]
  100. # Their serve-ds41-jovian.sh runtime env (multi-node-adapted; the launcher
  101. # injects NCCL_SOCKET_IFNAME/IB_HCA/GID + VLLM_HOST_IP per node).
  102. NCCL_NCHANNELS = "16"
  103. NCCL_MIN_NCHANNELS = "16"
  104. NCCL_MAX_NCHANNELS = "16"
  105. NCCL_BUFFSIZE = "2097152"
  106. OMP_NUM_THREADS = "8"
  107. CUDA_DEVICE_MAX_CONNECTIONS = "32"
  108. # GB10 arch (theirs sm_120a on RTX PRO 6000):
  109. CUTE_DSL_ARCH = "sm_121a"
  110. TORCH_CUDA_ARCH_LIST = "12.1a"
  111. # Their V2 model-runner + AOT compile pipeline (baked in their image env):
  112. VLLM_USE_V2_MODEL_RUNNER = "1"
  113. VLLM_USE_AOT_COMPILE = "1"
  114. VLLM_USE_STANDALONE_COMPILE = "1"
  115. VLLM_USE_MEGA_AOT_ARTIFACT = "1"
  116. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  117. VLLM_USE_FLASHINFER_SAMPLER = "1"
  118. VLLM_WORKER_MULTIPROC_METHOD = "spawn"
  119. VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS = "900"
  120. HF_HUB_OFFLINE = "1"
  121. # Deliberately NOT set: VLLM_ENABLE_PCIE_ALLREDUCE (single-host PCIe in
  122. # their profile; cross-node on the switch fabric uses the launcher's NCCL),
  123. # VLLM_HOST_IP (launcher per-node), NCCL_SOCKET_IFNAME (launcher per cluster).