Skip to content

Commit 034e2d8

Browse files
committed
Revert to deeper architecture pico
Signed-off-by: Asha Anoosheh <aanoosheh@nvidia.com>
1 parent bedf6af commit 034e2d8

4 files changed

Lines changed: 37 additions & 273 deletions

File tree

‎tests/functional_tests/test_cases/hybrid/hybrid_nemotron_v3_nano_a1b_tp1_ep8_QAD_dgx_h100_1N8G/golden_values_dev_dgx_h100.json‎

Lines changed: 0 additions & 53 deletions
This file was deleted.

‎tests/functional_tests/test_cases/hybrid/hybrid_nemotron_v3_nano_a1b_tp1_ep8_QAD_dgx_h100_1N8G/model_config.yaml‎

Lines changed: 0 additions & 180 deletions
This file was deleted.

‎tests/functional_tests/test_cases/hybrid/hybrid_nemotron_v3_pico_7b_a1b_tp1_ep8_QAD_dgx_h100_1N8G/golden_values_dev_dgx_h100.json‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
"end_step": 10,
55
"step_interval": 1,
66
"values": {
7-
"1": 0.0,
8-
"2": 0.0,
9-
"3": 0.0,
10-
"4": 0.0,
11-
"5": 0.0,
12-
"6": 0.0,
13-
"7": 0.0,
14-
"8": 0.0,
15-
"9": 0.0,
16-
"10": 0.0
7+
"1": 1.082489,
8+
"2": 1.282220,
9+
"3": 0.115310,
10+
"4": 0.037758,
11+
"5": 0.061481,
12+
"6": 0.114864,
13+
"7": 0.100640,
14+
"8": 0.051476,
15+
"9": 0.078758,
16+
"10": 0.043542
1717
}
1818
},
1919
"lm loss": {
@@ -38,16 +38,16 @@
3838
"end_step": 10,
3939
"step_interval": 1,
4040
"values": {
41-
"1": 0.0,
42-
"2": 0.0,
43-
"3": 0.0,
44-
"4": 0.0,
45-
"5": 0.0,
46-
"6": 0.0,
47-
"7": 0.0,
48-
"8": 0.0,
49-
"9": 0.0,
50-
"10": 0.0
41+
"1": 445624928.0,
42+
"2": 358479584.0,
43+
"3": 285707904.0,
44+
"4": 331418368.0,
45+
"5": 348428352.0,
46+
"6": 343853952.0,
47+
"7": 308766144.0,
48+
"8": 287327776.0,
49+
"9": 328909344.0,
50+
"10": 357714272.0
5151
}
5252
}
5353
}

‎tests/functional_tests/test_cases/hybrid/hybrid_nemotron_v3_pico_7b_a1b_tp1_ep8_QAD_dgx_h100_1N8G/model_config.yaml‎

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ ENV_VARS:
44
NCCL_ALGO: Ring
55
CUBLAS_WORKSPACE_CONFIG: ":4096:8"
66
# Paths
7-
MODEL_BF16_CKPT: "${DATA_PATH}/model/nemotron_v3_pico_7b-a1b"
7+
MODEL_BF16_CKPT: "${DATA_PATH}/model/nemotron_v3_pico_7b-a1b/3T-token_deeparch"
88
PTQ_QUANTIZED_CKPT: "${DATA_CACHE_PATH}/ptq_quantized_ckpt"
99
TOKENIZER: "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16"
1010
HF_HOME: "${DATA_PATH}/.hf_cache"
11-
DISTILL_CONFIG: '{intermediate_layer_pairs: [], logit_layers: ["output_layer", "output_layer"], skip_lm_loss: false, kd_loss_scale: 10.0}'
1211
BEFORE_SCRIPT: |
13-
mkdir -p ${DATA_CACHE_PATH}/distill && echo $DISTILL_CONFIG | yq -P > ${DATA_CACHE_PATH}/distill/distill_config.yaml
1412
# Stage 1: PTQ quantization via quantize.py directly
1513
echo -e "\n=== Stage 1: Running PTQ (NVFP4) ===\n"
1614
cd /opt/megatron-lm
@@ -33,11 +31,11 @@ BEFORE_SCRIPT: |
3331
--expert-tensor-parallel-size 1 \
3432
--pipeline-model-parallel-size 1 \
3533
--context-parallel-size 1 \
36-
--hidden-size 1536 \
37-
--num-attention-heads 12 \
34+
--hidden-size 1216 \
35+
--num-attention-heads 32 \
3836
--group-query-attention \
3937
--num-query-groups 2 \
40-
--ffn-hidden-size 1024 \
38+
--ffn-hidden-size 896 \
4139
--kv-channels 128 \
4240
--squared-relu \
4341
--normalization RMSNorm \
@@ -46,9 +44,9 @@ BEFORE_SCRIPT: |
4644
--hidden-dropout 0.0 \
4745
--position-embedding-type none \
4846
--untie-embeddings-and-output-weights \
49-
--init-method-std 0.0229 \
50-
--hybrid-layer-pattern MEMEM*EMEMEM*EMEMEMEM*EMEMEM*EMEMEME \
51-
--mamba-num-heads 48 \
47+
--init-method-std 0.0256 \
48+
--hybrid-layer-pattern MEMEM*EMEMEM*EMEMEM*EMEMEM*EMEMEM*EMEMEMEM*EMEMEMEME \
49+
--mamba-num-heads 64 \
5250
--export-model-type MambaModel \
5351
--num-experts 128 \
5452
--moe-router-topk 6 \
@@ -58,7 +56,7 @@ BEFORE_SCRIPT: |
5856
--moe-router-dtype fp32 \
5957
--moe-router-score-function sigmoid \
6058
--moe-router-load-balancing-type seq_aux_loss \
61-
--moe-shared-expert-intermediate-size 2048 \
59+
--moe-shared-expert-intermediate-size 3712 \
6260
--moe-token-dispatcher-type alltoall \
6361
--moe-permute-fusion \
6462
--moe-grouped-gemm \
@@ -75,23 +73,22 @@ BEFORE_SCRIPT: |
7573
--distributed-timeout-minutes 30 \
7674
--export-default-te-spec \
7775
--export-quant-cfg MAMBA_MOE_NVFP4_CONSERVATIVE_CFG \
78-
--calib-size 512 \
79-
--calib-batch-size 16 \
76+
--calib-size 256 \
77+
--calib-batch-size 4 \
8078
--skip-generate
8179
echo -e "\n=== Stage 1 complete ===\n"
8280
MODEL_ARGS:
8381
# KD teacher/config
8482
--export-default-te-spec: true
8583
--export-kd-teacher-load: ${MODEL_BF16_CKPT}
86-
--export-kd-cfg: ${DATA_CACHE_PATH}/distill/distill_config.yaml
8784
--auto-detect-ckpt-format: true
8885
--finetune: true
8986
# Architecture
90-
--hidden-size: 1536
91-
--num-attention-heads: 12
87+
--hidden-size: 1216
88+
--num-attention-heads: 32
9289
--group-query-attention: true
9390
--num-query-groups: 2
94-
--ffn-hidden-size: 1024
91+
--ffn-hidden-size: 896
9592
--kv-channels: 128
9693
--squared-relu: true
9794
--normalization: RMSNorm
@@ -100,9 +97,9 @@ MODEL_ARGS:
10097
--hidden-dropout: 0.0
10198
--position-embedding-type: none
10299
--untie-embeddings-and-output-weights: true
103-
--init-method-std: 0.0229
104-
--hybrid-layer-pattern: MEMEM*EMEMEM*EMEMEMEM*EMEMEM*EMEMEME
105-
--mamba-num-heads: 48
100+
--init-method-std: 0.0256
101+
--hybrid-layer-pattern: MEMEM*EMEMEM*EMEMEM*EMEMEM*EMEMEM*EMEMEMEM*EMEMEMEME
102+
--mamba-num-heads: 64
106103
--export-model-type: MambaModel
107104
# MoE
108105
--num-experts: 128
@@ -113,7 +110,7 @@ MODEL_ARGS:
113110
--moe-router-dtype: fp32
114111
--moe-router-score-function: sigmoid
115112
--moe-router-load-balancing-type: seq_aux_loss
116-
--moe-shared-expert-intermediate-size: 2048
113+
--moe-shared-expert-intermediate-size: 3712
117114
--moe-token-dispatcher-type: alltoall
118115
--moe-permute-fusion: true
119116
--moe-grouped-gemm: true

0 commit comments

Comments
 (0)