-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Model] Add aquila 3b configuration file (#281)
1. Add Aquila 3b configuration file 2. Add qk_norm on the hidden-dim, not head-dim 3. Support shared embedding weight when dp-sizes are different 4. Fix bugs when calculating gradient normalization if dp-sizes are different. 5. Add `export PYTHONPATH=...:${PYTHONPATH}` 6. Support to convert checkpoint for hetero-train --------- Co-authored-by: lzy-dev <[email protected]>
- Loading branch information
1 parent
f2bc020
commit 3d81a6e
Showing
24 changed files
with
725 additions
and
48 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
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,89 @@ | ||
system: | ||
reset_position_ids: True | ||
reset_attention_mask: True | ||
add_qkv_bias: True | ||
tensor_model_parallel_size: 1 | ||
pipeline_model_parallel_size: 2 | ||
disable_bias_linear: True | ||
use_flash_attn: True | ||
use_distributed_optimizer: True | ||
precision: | ||
bf16: True | ||
initial_loss_scale: 522893 | ||
min_loss_scale: 1.0 | ||
attention_softmax_in_fp32: True | ||
accumulate_allreduce_grads_in_fp32: True | ||
logging: | ||
log_interval: 1 | ||
log_throughput: True | ||
tensorboard_log_interval: 1 | ||
wandb-log-model: False | ||
wandb-log-model-interval: 1 | ||
wandb_project: "train-aquila-3B" | ||
wandb_exp_name: "train-test-3B" | ||
checkpoint: | ||
load: outputs_llama3/checkpoint_mc | ||
ckpt_format: torch | ||
save_interval: 2385 | ||
|
||
# hetero: | ||
# enable_hetero: True | ||
# hetero_use_cpu_communication: False | ||
# use_partial_reduce_for_shared_embedding: True | ||
# # mesh format [tp1,cp1,ep1,dp1,pp1,(tp2,cp2...)] | ||
|
||
# hetero_pipeline_layer_split: [12,12] | ||
# hetero_process_meshes: [1,1,1,4,1, 1,1,1,4,1] | ||
# hetero_device_types: ["A800", "A800"] | ||
|
||
# standalone_embedding_stage: False | ||
# hetero_current_device_type: "A800" | ||
model: | ||
transformer_impl: transformer_engine | ||
num_layers: 24 | ||
hidden_size: 1024 | ||
num_attention_heads: 16 | ||
group_query_attention: True | ||
num_query_groups: 2 | ||
seq_length: 4096 | ||
max_position_embeddings: 4096 # only for adding position embeddings | ||
norm_epsilon: 1e-6 | ||
use_rotary_position_embeddings: true | ||
no_position_embedding: true | ||
rotary_base: 1000000 | ||
swiglu: true | ||
multiple_of: 256 | ||
hidden_dim_multiplier: 2 # ffn_hidden_size 11008 | ||
normalization: RMSNorm | ||
position_embedding_type: rope | ||
untie_embeddings_and_output_weights: False | ||
init_method_std: 0.02 | ||
attention_dropout: 0.0 | ||
hidden_dropout: 0.0 | ||
weight_decay: 0.1 | ||
clip_grad: 1.0 | ||
train_samples: 29297664 #120B tokens | ||
eval_iters: 0 | ||
micro_batch_size: 2 | ||
global_batch_size: 1024 | ||
seed: 42 | ||
|
||
optimizer: | ||
weight_decay: 0.1 | ||
adam_beta1: 0.9 | ||
adam_beta2: 0.95 | ||
lr_scheduler: | ||
lr: 5.0e-3 | ||
min_lr: 5.0e-4 | ||
lr_warmup_samples: 10 | ||
lr_decay_style: cosine | ||
|
||
data: | ||
data_path: {data_path:??} | ||
split: 1 | ||
no_mmap_bin_files: true | ||
tokenizer: | ||
tokenizer_type: QwenTokenizerFS | ||
tokenizer_path: examples/aquila/qwentokenizer | ||
vocab_size: 151851 | ||
make_vocab_size_divisible_by: 64 |
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
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
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
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
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
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
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
Oops, something went wrong.