-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LLM-paddle] add llama1-7b pretrain with callback #239
Merged
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
24630bf
modify gitignore
LaiXinyi823 cd32e31
add paddle llama
LaiXinyi823 efb63cc
add recompute and sharding for llama7b
LaiXinyi823 3e6bed6
adapte to the driver & fix start_paddle_task
LaiXinyi823 0678669
fix llama1-7b fig files and trainer
LaiXinyi823 45c4220
[callback] llama1-7B pretrain
LaiXinyi823 256107f
modify the llama case config name in test_conf.py
LaiXinyi823 af2fd2f
update config
DrownFish19 dc0b439
Merge remote-tracking branch 'flagperf/main' into callback
DrownFish19 925452b
Merge branch 'FlagOpen:main' into callback
DrownFish19 9b247dc
update config
DrownFish19 93d2542
Merge branch 'callback' of https://github.com/LaiXinyi823/FlagPerf in…
DrownFish19 94bd7b9
add metrics in README.md
DrownFish19 81ac81d
update README.md
DrownFish19 4eb09f6
remove llama 13B files
DrownFish19 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
update config
- Loading branch information
commit af2fd2f83fd560b8a326dc6b8c445eb4e814efad
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/ssd2/laixinyi/projects/FlagPerf/training/benchmarks/llama1_7B/paddle | ||
../llama1_7B/paddle/ |
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
Empty file.
43 changes: 43 additions & 0 deletions
43
training/nvidia/llama1_13B-paddle/config/config_TP1PP1SH2SP8A100x1x8.py
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,43 @@ | ||
# model info | ||
model_name_or_path: str = "facebook/llama-13b" | ||
tokenizer_name_or_path: str = "facebook/llama-13b" | ||
continue_training = 0 | ||
split = "998,1,1" | ||
max_seq_length = 2048 | ||
|
||
# training info | ||
dataloader_num_workers = 1 | ||
max_steps = 512 | ||
save_steps = 10000 | ||
eval_steps = 10000 | ||
learning_rate = 3e-4 | ||
min_learning_rate = 3e-5 | ||
warmup_steps = 2000 | ||
weight_decay = 0.1 | ||
lr_scheduler_type = "cosine" | ||
adam_beta1 = 0.9 | ||
adam_beta2 = 0.95 | ||
adam_epsilon = 1e-06 | ||
max_grad_norm = 1.0 | ||
target_loss = 1.0 | ||
target_ppl = 0.6 | ||
logging_steps = 1 | ||
log_freq = 1 | ||
seed = 42 | ||
|
||
# for parallel | ||
per_device_train_batch_size = 4 | ||
per_device_eval_batch_size = 1 | ||
tensor_parallel_degree = 1 | ||
pipeline_parallel_degree = 1 | ||
sharding_parallel_degree = 8 | ||
gradient_accumulation_steps = 32 | ||
use_flash_attention = 1 | ||
fuse_attention_qkv = 0 | ||
use_fused_rms_norm = 1 | ||
fp16 = True | ||
fp16_opt_level = "O2" | ||
scale_loss = 32768 | ||
sharding = "stage2" | ||
recompute = False | ||
recompute_granularity = "full" |
43 changes: 43 additions & 0 deletions
43
training/nvidia/llama1_13B-paddle/config/config_TP2PP1SH1SP4A100x1x8.py
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,43 @@ | ||
# model info | ||
model_name_or_path: str = "facebook/llama-13b" | ||
tokenizer_name_or_path: str = "facebook/llama-13b" | ||
continue_training = 0 | ||
split = "998,1,1" | ||
max_seq_length = 2048 | ||
|
||
# training info | ||
dataloader_num_workers = 1 | ||
max_steps = 512 | ||
save_steps = 10000 | ||
eval_steps = 10000 | ||
learning_rate = 3e-4 | ||
min_learning_rate = 3e-5 | ||
warmup_steps = 2000 | ||
weight_decay = 0.1 | ||
lr_scheduler_type = "cosine" | ||
adam_beta1 = 0.9 | ||
adam_beta2 = 0.95 | ||
adam_epsilon = 1e-06 | ||
max_grad_norm = 1.0 | ||
target_loss = 1.0 | ||
target_ppl = 0.6 | ||
logging_steps = 1 | ||
log_freq = 1 | ||
seed = 42 | ||
|
||
# for parallel | ||
per_device_train_batch_size = 4 | ||
per_device_eval_batch_size = 1 | ||
tensor_parallel_degree = 2 | ||
pipeline_parallel_degree = 1 | ||
sharding_parallel_degree = 4 | ||
gradient_accumulation_steps = 64 | ||
use_flash_attention = 1 | ||
fuse_attention_qkv = 0 | ||
use_fused_rms_norm = 1 | ||
fp16 = True | ||
fp16_opt_level = "O2" | ||
scale_loss = 32768 | ||
sharding = "stage1" | ||
recompute = False | ||
recompute_granularity = "full" |
43 changes: 43 additions & 0 deletions
43
training/nvidia/llama1_13B-paddle/config/config_TP2PP1SH2SP4A100x1x8.py
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,43 @@ | ||
# model info | ||
model_name_or_path: str = "facebook/llama-13b" | ||
tokenizer_name_or_path: str = "facebook/llama-13b" | ||
continue_training = 0 | ||
split = "998,1,1" | ||
max_seq_length = 2048 | ||
|
||
# training info | ||
dataloader_num_workers = 1 | ||
max_steps = 512 | ||
save_steps = 10000 | ||
eval_steps = 10000 | ||
learning_rate = 3e-4 | ||
min_learning_rate = 3e-5 | ||
warmup_steps = 2000 | ||
weight_decay = 0.1 | ||
lr_scheduler_type = "cosine" | ||
adam_beta1 = 0.9 | ||
adam_beta2 = 0.95 | ||
adam_epsilon = 1e-06 | ||
max_grad_norm = 1.0 | ||
target_loss = 1.0 | ||
target_ppl = 0.6 | ||
logging_steps = 1 | ||
log_freq = 1 | ||
seed = 42 | ||
|
||
# for parallel | ||
per_device_train_batch_size = 4 | ||
per_device_eval_batch_size = 1 | ||
tensor_parallel_degree = 2 | ||
pipeline_parallel_degree = 1 | ||
sharding_parallel_degree = 4 | ||
gradient_accumulation_steps = 64 | ||
use_flash_attention = 1 | ||
fuse_attention_qkv = 0 | ||
use_fused_rms_norm = 1 | ||
fp16 = True | ||
fp16_opt_level = "O2" | ||
scale_loss = 32768 | ||
sharding = "stage2" | ||
recompute = False | ||
recompute_granularity = "full" |
43 changes: 43 additions & 0 deletions
43
training/nvidia/llama1_13B-paddle/config/config_TP2PP4SH1SP1A100x1x8.py
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,43 @@ | ||
# model info | ||
model_name_or_path: str = "facebook/llama-13b" | ||
tokenizer_name_or_path: str = "facebook/llama-13b" | ||
continue_training = 0 | ||
split = "998,1,1" | ||
max_seq_length = 2048 | ||
|
||
# training info | ||
dataloader_num_workers = 1 | ||
max_steps = 512 | ||
save_steps = 10000 | ||
eval_steps = 10000 | ||
learning_rate = 3e-4 | ||
min_learning_rate = 3e-5 | ||
warmup_steps = 2000 | ||
weight_decay = 0.1 | ||
lr_scheduler_type = "cosine" | ||
adam_beta1 = 0.9 | ||
adam_beta2 = 0.95 | ||
adam_epsilon = 1e-06 | ||
max_grad_norm = 1.0 | ||
target_loss = 1.0 | ||
target_ppl = 0.6 | ||
logging_steps = 1 | ||
log_freq = 1 | ||
seed = 42 | ||
|
||
# for parallel | ||
per_device_train_batch_size = 4 | ||
per_device_eval_batch_size = 1 | ||
tensor_parallel_degree = 2 | ||
pipeline_parallel_degree = 4 | ||
sharding_parallel_degree = 1 | ||
gradient_accumulation_steps = 256 | ||
use_flash_attention = 1 | ||
fuse_attention_qkv = 0 | ||
use_fused_rms_norm = 1 | ||
fp16 = True | ||
fp16_opt_level = "O2" | ||
scale_loss = 32768 | ||
sharding = "stage1" | ||
recompute = False | ||
recompute_granularity = "full" |
2 changes: 1 addition & 1 deletion
2
training/nvidia/llama1_13B-paddle/config/environment_variables.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 |
---|---|---|
@@ -1 +1 @@ | ||
training/nvidia/llama1_7B-paddle/config/environment_variables.sh | ||
../../llama1_7B-paddle/config/environment_variables.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 |
---|---|---|
@@ -1 +1 @@ | ||
training/nvidia/llama1_7B-paddle/config/requirements.txt | ||
../../llama1_7B-paddle/config/requirements.txt |
85 changes: 0 additions & 85 deletions
85
training/nvidia/llama1_7B-paddle/config/config_A100x1x8.py
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
training/nvidia/llama1_7B-paddle/config/config_TP1PP1SH2SP8A100x1x8.py
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,43 @@ | ||
# model info | ||
model_name_or_path: str = "facebook/llama-7b" | ||
tokenizer_name_or_path: str = "facebook/llama-7b" | ||
continue_training = 0 | ||
split = "998,1,1" | ||
max_seq_length = 2048 | ||
|
||
# training info | ||
dataloader_num_workers = 1 | ||
max_steps = 512 | ||
save_steps = 10000 | ||
eval_steps = 10000 | ||
learning_rate = 3e-4 | ||
min_learning_rate = 3e-5 | ||
warmup_steps = 2000 | ||
weight_decay = 0.1 | ||
lr_scheduler_type = "cosine" | ||
adam_beta1 = 0.9 | ||
adam_beta2 = 0.95 | ||
adam_epsilon = 1e-06 | ||
max_grad_norm = 1.0 | ||
target_loss = 1.0 | ||
target_ppl = 0.6 | ||
logging_steps = 1 | ||
log_freq = 1 | ||
seed = 42 | ||
|
||
# for parallel | ||
per_device_train_batch_size = 4 | ||
per_device_eval_batch_size = 1 | ||
tensor_parallel_degree = 1 | ||
pipeline_parallel_degree = 1 | ||
sharding_parallel_degree = 8 | ||
gradient_accumulation_steps = 32 | ||
use_flash_attention = 1 | ||
fuse_attention_qkv = 0 | ||
use_fused_rms_norm = 1 | ||
fp16 = True | ||
fp16_opt_level = "O2" | ||
scale_loss = 32768 | ||
sharding = "stage2" | ||
recompute = False | ||
recompute_granularity = "full" |
43 changes: 43 additions & 0 deletions
43
training/nvidia/llama1_7B-paddle/config/config_TP2PP1SH1SP4A100x1x8.py
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,43 @@ | ||
# model info | ||
model_name_or_path: str = "facebook/llama-7b" | ||
tokenizer_name_or_path: str = "facebook/llama-7b" | ||
continue_training = 0 | ||
split = "998,1,1" | ||
max_seq_length = 2048 | ||
|
||
# training info | ||
dataloader_num_workers = 1 | ||
max_steps = 512 | ||
save_steps = 10000 | ||
eval_steps = 10000 | ||
learning_rate = 3e-4 | ||
min_learning_rate = 3e-5 | ||
warmup_steps = 2000 | ||
weight_decay = 0.1 | ||
lr_scheduler_type = "cosine" | ||
adam_beta1 = 0.9 | ||
adam_beta2 = 0.95 | ||
adam_epsilon = 1e-06 | ||
max_grad_norm = 1.0 | ||
target_loss = 1.0 | ||
target_ppl = 0.6 | ||
logging_steps = 1 | ||
log_freq = 1 | ||
seed = 42 | ||
|
||
# for parallel | ||
per_device_train_batch_size = 4 | ||
per_device_eval_batch_size = 1 | ||
tensor_parallel_degree = 2 | ||
pipeline_parallel_degree = 1 | ||
sharding_parallel_degree = 4 | ||
gradient_accumulation_steps = 64 | ||
use_flash_attention = 1 | ||
fuse_attention_qkv = 0 | ||
use_fused_rms_norm = 1 | ||
fp16 = True | ||
fp16_opt_level = "O2" | ||
scale_loss = 32768 | ||
sharding = "stage1" | ||
recompute = False | ||
recompute_granularity = "full" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请仿照其他case的格式书写一下llama1_7B预训练任务,包括模型描述、数据集下载、数据集处理脚本、代码来源开源协议等