Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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=meta-llama-Llama-2-13b_pretrain_dynamic_auto "
param+="run_mode=DP1_MP1_PP4_VPP5_Sharding8_Stage2 "
param+="device_num=N4C32 "
param+="global_batch_size=32 "
param+="nnodes=4 "
param+="model_type=llama2_13b "
param+='dynamic_auto=_dynamic_auto '

export FLAGS_fuse_reducescatter_in_opt=1

cd ./tests
bash ./test_tipc/static/auto_parallel/llama2/benchmark_common/prepare.sh

bash -c "${param} bash ./test_tipc/static/auto_parallel/llama2/benchmark_common/run_benchmark.sh"
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"model_name_or_path": "meta-llama/Llama-2-13b",
"tokenizer_name_or_path": "meta-llama/Llama-2-13b",
"input_dir": "./data",
"output_dir": "./checkpoints/llama2_pretrain_ckpts",
"per_device_train_batch_size": 1,
"gradient_accumulation_steps": 4,
"per_device_eval_batch_size": 4,
"tensor_parallel_degree": 1,
"pipeline_parallel_degree": 4,
"sharding": "stage1",
"data_parallel_config": "enable_allreduce_avg_in_gradinent_scale gradient_sync_after_accumulate",
"sharding_parallel_config": "enable_overlap enable_tensor_fusion",
"tensor_parallel_config": "enable_mp_async_allreduce",
"pipeline_parallel_config": "enable_send_recv_overlap enable_split_backward",
"pipeline_schedule_mode": "VPP",
"virtual_pp_degree": 5,
"sequence_parallel": 0,
"use_flash_attention": true,
"use_fused_rms_norm": true,
"fuse_attention_ffn": true,
"fuse_attention_qkv": true,
"use_fused_rope": true,
"fused_linear_param_grad_add": true,
"max_seq_length": 4096,
"learning_rate": 3e-05,
"min_learning_rate": 3e-06,
"warmup_steps": 30,
"logging_steps": 10,
"max_steps": 500,
"save_steps": 5000,
"eval_steps": 1000,
"weight_decay": 0.01,
"bf16": true,
"fp16_opt_level": "O2",
"amp_custom_black_list": ["reduce_sum", "c_softmax_with_cross_entropy"],
"amp_custom_white_list": ["lookup_table", "lookup_table_v2"],
"amp_master_grad": true,
"warmup_ratio": 0.01,
"max_grad_norm": 1.0,
"dataloader_num_workers": 1,
"continue_training": 0,
"do_train": true,
"do_eval": false,
"do_predict": false,
"disable_tqdm": true,
"skip_profile_timer": true,
"recompute": false,
"recompute_use_reentrant": true,
"distributed_dataloader": 0,
"recompute_granularity": "full",
"save_total_limit": 2,
"device": "gpu",
"to_static": false,
"enable_auto_parallel": true
}