-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support intermediate_api baichuan test
- Loading branch information
1 parent
08183d7
commit bf77f95
Showing
5 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
..._api_baichuan-inc-baichuan-2-13b_pretrain_dy2st_bs32_bf16_DP1_MP4_PP1_Sharding8_Stage1.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
param="model_item=intermediate_api_baichuan-inc-baichuan-2-13b_pretrain_dy2st " | ||
param+="run_mode=DP1_MP4_PP1_Sharding8_Stage1 " | ||
param+="device_num=N4C32 " | ||
param+="global_batch_size=32 " | ||
param+="nnodes=4 " | ||
param+="model_type=baichuan2_13b " | ||
|
||
cd ./tests | ||
bash ./test_tipc/static/auto_parallel/baichuan2/benchmark_common/prepare.sh | ||
|
||
bash -c "${param} bash ./test_tipc/static/auto_parallel/baichuan2/benchmark_common/run_benchmark.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...llel/baichuan2/pretrain_config_baichuan2_13b/intermediate_api_pretrain-baichuan2_13b.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"model_name_or_path": "baichuan-inc/Baichuan2-13B-Base", | ||
"tokenizer_name_or_path": "baichuan-inc/Baichuan2-13B-Base", | ||
"input_dir": "./data", | ||
"output_dir": "./checkpoints/baichuan2_13b_ckpts", | ||
"split": "949,50,1", | ||
"to_static": true, | ||
"pipeline_parallel_degree": 1, | ||
"tensor_parallel_degree": 4, | ||
"virtual_pp_degree": 1, | ||
"weight_decay": 0.01, | ||
"warmup_ratio": 0.01, | ||
"max_grad_norm": 1.0, | ||
"learning_rate": 0.00003, | ||
"min_learning_rate": 0.000003, | ||
"max_steps": 200, | ||
"logging_steps": 5, | ||
"eval_steps": 10000, | ||
"save_steps": 1000, | ||
"continue_training": 0, | ||
"do_train": true, | ||
"do_eval": false, | ||
"do_predict": false, | ||
"disable_tqdm": true, | ||
"save_total_limit": 2, | ||
"device": "gpu", | ||
"dataloader_num_workers": 1, | ||
"distributed_dataloader": 0, | ||
"enable_auto_parallel": 1, | ||
"per_device_train_batch_size": 2, | ||
"gradient_accumulation_steps": 2, | ||
"per_device_eval_batch_size": 1, | ||
"recompute": false, | ||
"recompute_use_reentrant": true, | ||
"recompute_granularity": "full", | ||
"pp_recompute_interval": 0, | ||
"bf16": true, | ||
"fp16_opt_level": "O2", | ||
"amp_master_grad": true, | ||
"fuse_attention_ffn": true, | ||
"fuse_attention_qkv": true, | ||
"use_flash_attention": true, | ||
"fused_linear": 1, | ||
"fused_linear_param_grad_add": 1, | ||
"use_fused_rope": true, | ||
"use_fused_rms_norm": true, | ||
"max_seq_length": 4096, | ||
"sequence_parallel": 1, | ||
"sharding": "stage1", | ||
"sharding_parallel_degree": 8, | ||
"sharding_parallel_config": "enable_tensor_fusion enable_overlap", | ||
"tensor_parallel_config": "enable_mp_async_allreduce replace_with_parallel_cross_entropy", | ||
"data_parallel_config": "enable_allreduce_avg_in_gradinent_scale gradient_sync_after_accumulate", | ||
"pipeline_parallel_config": "enable_send_recv_overlap enable_split_backward", | ||
"model_type": "llama_network", | ||
"use_intermediate_api": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters