Skip to content

Commit fcb532a

Browse files
authored
[CE] Add CE for Hybrid Parallism (PaddlePaddle#7817)
1 parent 082dc52 commit fcb532a

11 files changed

+251
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pp_degree=1
1919
bs_item=32
2020
fp_item=bf16
2121
run_mode=MP2-SP2-SD2-Stage1-mbs8-acc2
22-
device_num=N1C8
22+
device_num=N1C4
2323
max_iter=50000
2424
sharding=stage1
2525
sharding_degree=2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pp_degree=1
1919
bs_item=32
2020
fp_item=bf16
2121
run_mode=MP2-SP2-SD2-Stage1-mbs8-acc2
22-
device_num=N1C8
22+
device_num=N1C4
2323
max_iter=100
2424
sharding=stage1
2525
sharding_degree=2

tests/test_tipc/dygraph/hybrid_parallelism/ce_gpt/N1C8/CE_gpt-345m_seqlen1024_pretrain_bs32_bf16_MP2-PP2-SD2-Stage1-mbs8-acc2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
model_item=gpt-345m_seqlen1024_pretrain
15+
model_item=CE_gpt-345m_seqlen1024_pretrain
1616
dp_degree=1
1717
mp_degree=2
1818
pp_degree=2
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=2
17+
mp_degree=2
18+
pp_degree=4
19+
bs_item=32
20+
fp_item=bf16
21+
run_mode=MP2-PP4-VPP2-DP2-mbs2-acc8
22+
device_num=N2C16
23+
max_iter=50000
24+
sharding=False
25+
sharding_degree=1
26+
27+
virtual_pp_degree=2
28+
use_recompute=True
29+
eval_freq=25
30+
use_pipeline_parallel=True
31+
sequence_parallel=False
32+
33+
model=gpt
34+
micro_bs=2
35+
acc=8
36+
seed=1234
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} 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=4
19+
bs_item=32
20+
fp_item=bf16
21+
run_mode=MP2-PP4-VPP2-SD2-stage1-mbs2-acc8
22+
device_num=N2C16
23+
max_iter=50000
24+
max_iter=50000
25+
sharding=stage1
26+
sharding_degree=2
27+
virtual_pp_degree=2
28+
use_recompute=True
29+
eval_freq=25
30+
use_pipeline_parallel=True
31+
sequence_parallel=False
32+
33+
model=gpt
34+
micro_bs=2
35+
acc=8
36+
seed=1234
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} 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=2
17+
mp_degree=2
18+
pp_degree=4
19+
bs_item=32
20+
fp_item=bf16
21+
run_mode=MP2-SP2-PP4-VPP2-DP2-mbs2-acc8
22+
device_num=N2C16
23+
max_iter=50000
24+
sharding=False
25+
sharding_degree=1
26+
27+
virtual_pp_degree=2
28+
use_recompute=True
29+
eval_freq=25
30+
use_pipeline_parallel=True
31+
sequence_parallel=True
32+
33+
model=gpt
34+
micro_bs=2
35+
acc=8
36+
seed=1234
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} 2>&1;

tests/test_tipc/dygraph/hybrid_parallelism/ce_gpt/N2C16/CE_gpt-345m_seqlen1024_pretrain_bs32_bf16_MP2-SP2-PP4-VPP2-SD2-stage1-mbs2-acc8.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ sequence_parallel=True
3232
model=gpt
3333
micro_bs=2
3434
acc=8
35-
seed=3589
3635

3736
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/prepare.sh
3837
# run
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=gpt-345m_seqlen1024_pretrain
16+
dp_degree=2
17+
mp_degree=2
18+
pp_degree=4
19+
bs_item=32
20+
fp_item=bf16
21+
run_mode=MP2-PP4-VPP2-DP2-mbs2-acc8
22+
device_num=N2C16
23+
max_iter=100
24+
sharding=False
25+
sharding_degree=1
26+
27+
virtual_pp_degree=2
28+
use_recompute=True
29+
eval_freq=25
30+
use_pipeline_parallel=True
31+
sequence_parallel=False
32+
33+
model=gpt
34+
micro_bs=2
35+
acc=8
36+
seed=1234
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} 2>&1;
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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=4
19+
bs_item=32
20+
fp_item=bf16
21+
run_mode=MP2-PP4-VPP2-SD2-stage1-mbs2-acc8
22+
device_num=N2C16
23+
max_iter=100
24+
sharding=stage1
25+
sharding_degree=2
26+
virtual_pp_degree=2
27+
use_recompute=True
28+
eval_freq=25
29+
use_pipeline_parallel=True
30+
sequence_parallel=False
31+
32+
model=gpt
33+
micro_bs=2
34+
acc=8
35+
seed=1234
36+
37+
bash ./test_tipc/dygraph/hybrid_parallelism/ce_gpt/benchmark_common/prepare.sh
38+
# run
39+
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} \
40+
${max_iter} ${sharding} ${sharding_degree} ${virtual_pp_degree} ${use_recompute} ${eval_freq} ${use_pipeline_parallel} ${sequence_parallel} ${acc} ${seed} 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=gpt-345m_seqlen1024_pretrain
16+
dp_degree=2
17+
mp_degree=2
18+
pp_degree=4
19+
bs_item=32
20+
fp_item=bf16
21+
run_mode=MP2-SP2-PP4-VPP2-DP2-mbs2-acc8
22+
device_num=N2C16
23+
max_iter=100
24+
sharding=False
25+
sharding_degree=1
26+
27+
virtual_pp_degree=2
28+
use_recompute=True
29+
eval_freq=25
30+
use_pipeline_parallel=True
31+
sequence_parallel=True
32+
33+
model=gpt
34+
micro_bs=2
35+
acc=8
36+
seed=1234
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} 2>&1;

0 commit comments

Comments
 (0)