recipe.toml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. # DeepSeek-V4.1-Flash EXL3 3bpw — coolbho3k "2x DGX Spark" production recipe,
  2. # adapted to sm121 (rc2 image, pinned at release commit 878e0ee).
  3. #
  4. # 2x Spark over 200G RoCE (8nodes-switch, first two free ranks):
  5. # TP2/DCP2, DSpark K=3 drafter, EXL3 3bpw experts, FP4 main KV + FP8 SWA,
  6. # 1M context, GMU 0.92, max-num-seqs 2 (C2; the runtime's cooperative
  7. # profile validates 1..6), prefill batch 3072.
  8. #
  9. # 2 GB headless-RAM unlock: the runtime's display-pool KV (1.75 GiB of the
  10. # firmware's 2 GB display reserve per GPU) needs nvidia_drm remoded with
  11. # modeset=1 fbdev=0. That is TEMPORARY by design (technology still in
  12. # approval): before_serve remods per boot, after_stop restores the plain
  13. # module. No UEFI change, no /etc/modprobe.d entry, resets on reboot.
  14. #
  15. # Model + drafter overlay live on the shared NAS (hub layout); the launch
  16. # nodes symlink the current refs/main snapshot and bind it at /model (the
  17. # runtime hard-requires the model at exactly /model) and the drafter overlay
  18. # at /draft-exl3.
  19. #
  20. # Cgroup: the runtime's serving guard hard-requires a 9 GiB / no-swap /
  21. # <=6-CPU cgroup (memory.max==9g, swap 0, cpu quota <=6) — memory_limit +
  22. # cpus below.
  23. engine = "vllm"
  24. docker_image = "ghcr.io/coolbho3k/deepseek-v4.1-flash-exl3-3bpw-2x-dgx-spark:20260917-rc2"
  25. model = ""
  26. name = "DeepSeek-V4.1-Flash EXL3 3bpw (2x Spark, TP2/DCP2, DSpark K=3, 1M)"
  27. port = 8888
  28. required_nodes = 2
  29. cluster = "8nodes-switch"
  30. tensor_parallel_size = 2
  31. pipeline_parallel_size = 1
  32. distributed_backend = "mp"
  33. shm_size = "2g"
  34. devices = ["/dev/dri/card0"]
  35. memory_limit = "9g"
  36. cpus = 6
  37. # /model + /draft-exl3 are the exact mounts the runtime validates.
  38. entrypoint = [
  39. "/opt/ds41-venv/bin/python",
  40. "/opt/ds41-serving/serve.py",
  41. "serve",
  42. "/model",
  43. "--config",
  44. "/opt/ds41-serving/conservative.yaml",
  45. "--worker-cls",
  46. "combined_worker.CombinedWorker",
  47. "--disable-custom-all-reduce",
  48. ]
  49. args = [
  50. "--served-model-name",
  51. "deepseek-v41-flash-exl3",
  52. "--enable-auto-tool-choice",
  53. "--tool-call-parser",
  54. "deepseek_v41",
  55. "--reasoning-parser",
  56. "deepseek_v41",
  57. ]
  58. before_serve = [
  59. { script = "unlock_display_ram" },
  60. # Stable per-node symlinks to the current refs/main snapshots (recreated
  61. # every serve; docker resolves the symlink at bind time).
  62. "ln -sfn /mnt/nas/ai/huggingface/hub/models--coolbho3k--DeepSeek-V4.1-Flash-EXL3-3bpw/snapshots/$(cat /mnt/nas/ai/huggingface/hub/models--coolbho3k--DeepSeek-V4.1-Flash-EXL3-3bpw/refs/main) /home/kilork/exl3-model",
  63. "ln -sfn /mnt/nas/ai/huggingface/hub/models--coolbho3k--DeepSeek-V4.1-Flash-DSpark-EXL3-3bpw/snapshots/$(cat /mnt/nas/ai/huggingface/hub/models--coolbho3k--DeepSeek-V4.1-Flash-DSpark-EXL3-3bpw/refs/main) /home/kilork/exl3-draft",
  64. ]
  65. after_stop = [{ script = "restore_display_ram", on_failure = "warn" }]
  66. [[extra_mounts]]
  67. host = "/home/kilork/exl3-model"
  68. container = "/model"
  69. read_only = true
  70. [[extra_mounts]]
  71. host = "/home/kilork/exl3-draft"
  72. container = "/draft-exl3"
  73. read_only = true
  74. [env]
  75. # DS41 runtime profile (validated against DS41_* envs; kv_cap_mib is
  76. # env-only, not a CLI flag).
  77. DS41_GPU_MEMORY_UTILIZATION = "0.92"
  78. DS41_MAX_MODEL_LEN = "1048576"
  79. DS41_MAX_NUM_SEQS = "2"
  80. DS41_MAX_NUM_BATCHED_TOKENS = "3072"
  81. DS41_LONG_PREFILL_TOKEN_THRESHOLD = "2816"
  82. DS41_KV_CAP_MIB = "1536"
  83. # Feature gates (serve.py hard-requires the '1' set; defaults are 1, set
  84. # explicitly so the guard passes).
  85. DS41_ENABLE_COOPERATIVE_MOE = "1"
  86. DS41_ENABLE_DCP2 = "1"
  87. DS41_ENABLE_DSPARK = "1"
  88. DS41_ENABLE_SSD_VOCAB = "1"
  89. DS41_SSD_ENGRAM_SOURCE = "/model/engrams"
  90. DS41_ENGRAM_CACHE_MIB = "64"
  91. DS41_DRAFT_EXL3_PATH = "/draft-exl3"
  92. # Engine / offline / threading.
  93. VLLM_PLUGINS = "ds41"
  94. VLLM_USE_V2_MODEL_RUNNER = "1"
  95. VLLM_USE_BREAKABLE_CUDAGRAPH = "0"
  96. VLLM_ENGINE_READY_TIMEOUT_S = "3600"
  97. VLLM_WORKER_MULTIPROC_METHOD = "spawn"
  98. VLLM_NO_USAGE_STATS = "1"
  99. HF_HUB_OFFLINE = "1"
  100. TRANSFORMERS_OFFLINE = "1"
  101. DSV41_IO_THREADS = "96"
  102. TORCH_CUDA_ARCH_LIST = "12.1a"
  103. FLASHINFER_CUDA_ARCH_LIST = "12.1a"
  104. MAX_JOBS = "1"
  105. MKL_NUM_THREADS = "4"
  106. OPENBLAS_NUM_THREADS = "4"
  107. TORCH_NCCL_ASYNC_ERROR_HANDLING = "1"
  108. MALLOC_ARENA_MAX = "2"
  109. MALLOC_TRIM_THRESHOLD_ = "131072"
  110. VLLM_SPARSE_INDEXER_MAX_LOGITS_MB = "128"
  111. # NCCL pins (on top of the launcher's cluster NCCL env).
  112. NCCL_NVLS_ENABLE = "0"
  113. NCCL_CROSS_NIC = "0"
  114. NCCL_IB_MERGE_NICS = "0"
  115. NCCL_CUMEM_ENABLE = "0"
  116. NCCL_MAX_CTAS = "8"
  117. NCCL_BUFFSIZE = "1048576"
  118. NCCL_LL128_BUFFSIZE = "262144"
  119. NCCL_PROTO = "^LL128"
  120. NCCL_MAX_NCHANNELS = "8"
  121. NCCL_IB_ROCE_VERSION_NUM = "2"