-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Expand file tree
/
Copy pathNVIDIA-Nemotron-3-Nano-30B-A3B-BF16.sh
More file actions
55 lines (53 loc) · 1.61 KB
/
Copy pathNVIDIA-Nemotron-3-Nano-30B-A3B-BF16.sh
File metadata and controls
55 lines (53 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
if [ -z ${HF_MODEL_CKPT} ]; then
HF_MODEL_CKPT=nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16
TOKENIZER_MODEL=nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16
else
TOKENIZER_MODEL=${HF_MODEL_CKPT}
fi
MODEL_ARGS=" \
--trust-remote-code \
--save-interval 100000 \
--micro-batch-size 1 \
--moe-token-dispatcher-type allgather \
--enable-experimental \
--moe-permute-fusion \
--use-fused-weighted-squared-relu \
--cross-entropy-loss-fusion \
--cross-entropy-fusion-impl native \
--moe-router-score-function sigmoid \
--moe-grouped-gemm \
--num-experts 128 \
--moe-router-topk 6 \
--moe-aux-loss-coeff 1e-4 \
--moe-router-topk-scaling-factor 2.5 \
--moe-router-enable-expert-bias \
--moe-router-dtype fp32 \
--moe-router-load-balancing-type seq_aux_loss \
--moe-shared-expert-intermediate-size 3712 \
\
--attention-backend flash \
--disable-gloo-process-groups \
--mamba-num-heads 64 \
--mamba-head-dim 64 \
--hybrid-layer-pattern MEMEM*EMEMEM*EMEMEM*EMEMEM*EMEMEM*EMEMEMEM*EMEMEMEME \
--use-mcore-models \
--untie-embeddings-and-output-weights \
--disable-bias-linear \
--init-method-std 0.0173 \
--position-embedding-type none \
--squared-relu \
--hidden-size 2688 \
--num-attention-heads 32 \
--group-query-attention \
--num-query-groups 2 \
--ffn-hidden-size 1856 \
--kv-channels 128 \
--normalization RMSNorm \
\
--tokenizer-type HuggingFaceTokenizer \
--bf16 \
--seq-length 8192 \
--max-position-embeddings 8192 \
--export-model-type HybridModel \
"