Skip to content

Commit 5951179

Browse files
authored
[CE]add gpt sharding_v2 case (PaddlePaddle#7914)
* add sharding_v2 case * update run_mode to device_num * fix * fix
1 parent a86de1b commit 5951179

15 files changed

+600
-6
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
model_item=CE_gpt-345m_seqlen1024_pretrain
16+
dp_degree=1
17+
mp_degree=2
18+
pp_degree=1
19+
bs_item=32
20+
fp_item=bf16
21+
run_mode=MP2-SP2-SD2-V2-Stage1-mbs8-acc2
22+
device_num=N1C4
23+
max_iter=50000
24+
sharding=stage1
25+
sharding_degree=2
26+
27+
virtual_pp_degree=1
28+
use_recompute=True
29+
eval_freq=25
30+
use_pipeline_parallel=False
31+
sequence_parallel=True
32+
acc=2
33+
seed=1234
34+
sharding_v2=True
35+
36+
model=gpt
37+
micro_bs=8
38+
39+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/prepare.sh
40+
# run
41+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/run_benchmark.sh ${model_item} ${fp_item} ${dp_degree} ${mp_degree} ${pp_degree} ${micro_bs} ${bs_item} ${run_mode} ${device_num} \
42+
${max_iter} ${sharding} ${sharding_degree} ${virtual_pp_degree} ${use_recompute} ${eval_freq} ${use_pipeline_parallel} ${sequence_parallel} ${acc} ${seed} ${sharding_v2} 2>&1;
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
model_item=gpt-345m_seqlen1024_pretrain
16+
dp_degree=1
17+
mp_degree=2
18+
pp_degree=1
19+
bs_item=32
20+
fp_item=bf16
21+
run_mode=MP2-SP2-SD2-V2-Stage1-mbs8-acc2
22+
device_num=N1C4
23+
max_iter=100
24+
sharding=stage1
25+
sharding_degree=2
26+
27+
virtual_pp_degree=1
28+
use_recompute=True
29+
eval_freq=25
30+
use_pipeline_parallel=False
31+
sequence_parallel=True
32+
acc=2
33+
seed=1234
34+
sharding_v2=True
35+
36+
model=gpt
37+
micro_bs=8
38+
39+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/prepare.sh
40+
# run
41+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/run_benchmark.sh ${model_item} ${fp_item} ${dp_degree} ${mp_degree} ${pp_degree} ${micro_bs} ${bs_item} ${run_mode} ${device_num} \
42+
${max_iter} ${sharding} ${sharding_degree} ${virtual_pp_degree} ${use_recompute} ${eval_freq} ${use_pipeline_parallel} ${sequence_parallel} ${acc} ${seed} ${sharding_v2} 2>&1;
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
model_item=CE_gpt-345m_seqlen1024_pretrain
16+
dp_degree=1
17+
mp_degree=2
18+
pp_degree=2
19+
bs_item=32
20+
fp_item=bf16
21+
run_mode=MP2-PP2-SD2-V2-Stage1-mbs8-acc2
22+
device_num=N1C8
23+
max_iter=50000
24+
sharding=stage2
25+
sharding_degree=1
26+
27+
virtual_pp_degree=1
28+
use_recompute=True
29+
eval_freq=25
30+
use_pipeline_parallel=True
31+
sequence_parallel=False
32+
acc=2
33+
seed=1234
34+
sharding_v2=True
35+
36+
model=gpt
37+
micro_bs=8
38+
39+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/prepare.sh
40+
# run
41+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/run_benchmark.sh ${model_item} ${fp_item} ${dp_degree} ${mp_degree} ${pp_degree} ${micro_bs} ${bs_item} ${run_mode} ${device_num} \
42+
${max_iter} ${sharding} ${sharding_degree} ${virtual_pp_degree} ${use_recompute} ${eval_freq} ${use_pipeline_parallel} ${sequence_parallel} ${acc} ${seed} ${sharding_v2} 2>&1;
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
model_item=CE_gpt-345m_seqlen1024_pretrain
16+
dp_degree=1
17+
mp_degree=2
18+
pp_degree=1
19+
sharding_degree=4
20+
sharding=stage1
21+
virtual_pp_degree=1
22+
use_recompute=True
23+
eval_freq=25
24+
use_pipeline_parallel=False
25+
sequence_parallel=False
26+
bs_item=32
27+
fp_item=bf16
28+
run_mode=MP2-SD4-V2-stage1-mbs4-acc2
29+
device_num=N1C8
30+
max_iter=50000
31+
32+
model=gpt
33+
micro_bs=4
34+
acc=2
35+
seed=3589
36+
sharding_v2=True
37+
38+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/prepare.sh
39+
# run
40+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/run_benchmark.sh ${model_item} ${fp_item} ${dp_degree} ${mp_degree} ${pp_degree} ${micro_bs} ${bs_item} ${run_mode} ${device_num} \
41+
${max_iter} ${sharding} ${sharding_degree} ${virtual_pp_degree} ${use_recompute} ${eval_freq} ${use_pipeline_parallel} ${sequence_parallel} ${acc} ${seed} ${sharding_v2} 2>&1;
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
model_item=CE_gpt-345m_seqlen1024_pretrain
16+
dp_degree=1
17+
mp_degree=2
18+
pp_degree=2
19+
bs_item=32
20+
fp_item=bf16
21+
run_mode=MP2-SP2-PP2-SD2-V2-Stage1-mbs8-acc2
22+
device_num=N1C8
23+
max_iter=50000
24+
sharding=stage1
25+
sharding_degree=2
26+
27+
virtual_pp_degree=1
28+
use_recompute=True
29+
eval_freq=25
30+
use_pipeline_parallel=True
31+
sequence_parallel=True
32+
acc=2
33+
seed=1234
34+
sharding_v2=True
35+
36+
model=gpt
37+
micro_bs=8
38+
39+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/prepare.sh
40+
# run
41+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/run_benchmark.sh ${model_item} ${fp_item} ${dp_degree} ${mp_degree} ${pp_degree} ${micro_bs} ${bs_item} ${run_mode} ${device_num} \
42+
${max_iter} ${sharding} ${sharding_degree} ${virtual_pp_degree} ${use_recompute} ${eval_freq} ${use_pipeline_parallel} ${sequence_parallel} ${acc} ${seed} ${sharding_v2} 2>&1;
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
model_item=CE_gpt-345m_seqlen1024_pretrain
16+
dp_degree=1
17+
mp_degree=1
18+
pp_degree=1
19+
sharding_degree=8
20+
sharding=stage1
21+
bs_item=32
22+
fp_item=bf16
23+
run_mode=SD8-V2-stage1-mbs2-acc2
24+
device_num=N1C8
25+
max_iter=50000
26+
virtual_pp_degree=1
27+
use_recompute=True
28+
eval_freq=25
29+
use_pipeline_parallel=False
30+
sequence_parallel=False
31+
acc=2
32+
seed=1234
33+
sharding_v2=True
34+
35+
model=gpt
36+
micro_bs=2
37+
38+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/prepare.sh
39+
# run
40+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/run_benchmark.sh ${model_item} ${fp_item} ${dp_degree} ${mp_degree} ${pp_degree} ${micro_bs} ${bs_item} ${run_mode} ${device_num} \
41+
${max_iter} ${sharding} ${sharding_degree} ${virtual_pp_degree} ${use_recompute} ${eval_freq} ${use_pipeline_parallel} ${sequence_parallel} ${acc} ${seed} ${sharding_v2} 2>&1;
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
model_item=gpt-345m_seqlen1024_pretrain
16+
dp_degree=1
17+
mp_degree=2
18+
pp_degree=2
19+
bs_item=32
20+
fp_item=bf16
21+
run_mode=MP2-PP2-SD2-V2-Stage1-mbs8-acc2
22+
device_num=N1C8
23+
max_iter=100
24+
sharding=stage1
25+
sharding_degree=2
26+
27+
virtual_pp_degree=1
28+
use_recompute=True
29+
eval_freq=25
30+
use_pipeline_parallel=True
31+
sequence_parallel=False
32+
acc=2
33+
seed=1234
34+
sharding_v2=True
35+
36+
model=gpt
37+
micro_bs=8
38+
39+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/prepare.sh
40+
# run
41+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/run_benchmark.sh ${model_item} ${fp_item} ${dp_degree} ${mp_degree} ${pp_degree} ${micro_bs} ${bs_item} ${run_mode} ${device_num} \
42+
${max_iter} ${sharding} ${sharding_degree} ${virtual_pp_degree} ${use_recompute} ${eval_freq} ${use_pipeline_parallel} ${sequence_parallel} ${acc} ${seed} ${sharding_v2} 2>&1;
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
model_item=gpt-345m_seqlen1024_pretrain
16+
dp_degree=1
17+
mp_degree=2
18+
pp_degree=1
19+
sharding_degree=4
20+
sharding=stage1
21+
bs_item=32
22+
fp_item=bf16
23+
run_mode=MP2-SD4-V2-stage1-mbs4-acc2
24+
device_num=N1C8
25+
max_iter=100
26+
27+
virtual_pp_degree=1
28+
use_recompute=True
29+
eval_freq=25
30+
use_pipeline_parallel=False
31+
sequence_parallel=False
32+
acc=2
33+
seed=1234
34+
sharding_v2=True
35+
36+
model=gpt
37+
micro_bs=4
38+
39+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/prepare.sh
40+
# run
41+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/run_benchmark.sh ${model_item} ${fp_item} ${dp_degree} ${mp_degree} ${pp_degree} ${micro_bs} ${bs_item} ${run_mode} ${device_num} \
42+
${max_iter} ${sharding} ${sharding_degree} ${virtual_pp_degree} ${use_recompute} ${eval_freq} ${use_pipeline_parallel} ${sequence_parallel} ${acc} ${seed} ${sharding_v2} 2>&1;
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
model_item=gpt-345m_seqlen1024_pretrain
16+
dp_degree=1
17+
mp_degree=2
18+
pp_degree=2
19+
bs_item=32
20+
fp_item=bf16
21+
run_mode=MP2-SP2-PP2-SD2-V2-Stage1-mbs8-acc2
22+
device_num=N1C8
23+
max_iter=100
24+
sharding=stage1
25+
sharding_degree=2
26+
27+
virtual_pp_degree=1
28+
use_recompute=True
29+
eval_freq=25
30+
use_pipeline_parallel=True
31+
sequence_parallel=True
32+
acc=2
33+
seed=1234
34+
sharding_v2=True
35+
36+
model=gpt
37+
micro_bs=8
38+
39+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/prepare.sh
40+
# run
41+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/run_benchmark.sh ${model_item} ${fp_item} ${dp_degree} ${mp_degree} ${pp_degree} ${micro_bs} ${bs_item} ${run_mode} ${device_num} \
42+
${max_iter} ${sharding} ${sharding_degree} ${virtual_pp_degree} ${use_recompute} ${eval_freq} ${use_pipeline_parallel} ${sequence_parallel} ${acc} ${seed} ${sharding_v2} 2>&1;

0 commit comments

Comments
 (0)