Repository navigation
Commit 5cdd2d3
committed
feat(deepseek-v4): let inference.sh launch across nodes
examples/models/deepseek_v4/inference.sh always ran
torch.distributed.run --nproc_per_node=$((PP * EP)), i.e. all ranks on one
node. With the DeepSeek-V4-Pro defaults (PP=4, EP=8) that is 32 processes on
a single node, which a 4-GPU GB200 NVL72 node cannot run although the header
says the defaults are for GB200.
Add NNODES / NODE_RANK / MASTER_ADDR / MASTER_PORT (and GPUS_PER_NODE) knobs.
When NNODES > 1 the launcher passes --nnodes/--node_rank/--master_addr/
--master_port to torch.distributed.run; PP*EP must be divisible by NNODES.
With the variables unset the behaviour is unchanged. Document the Slurm form
(one task per node) in the README.
Verified on 8 x GB200 (TP1/PP4/EP8, real DeepSeek-V4-Pro weights from an
imported Megatron checkpoint): coherent generation, 12 min 49 s including
the 3 TB load.
Signed-off-by: linmuchuiyang <6169320+linmuchuiyang@users.noreply.github.com>1 parent 2e09c23 commit 5cdd2d3
2 files changed
Lines changed: 29 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
225 | 230 | | |
226 | 231 | | |
227 | 232 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
54 | 76 | | |
55 | 77 | | |
56 | | - | |
| 78 | + | |
57 | 79 | | |
58 | 80 | | |
59 | 81 | | |
| |||
65 | 87 | | |
66 | 88 | | |
67 | 89 | | |
68 | | - | |
| 90 | + | |
69 | 91 | | |
70 | 92 | | |
71 | 93 | | |
| |||
0 commit comments