-
Notifications
You must be signed in to change notification settings - Fork 442
/
Copy pathtrain.yaml
68 lines (64 loc) · 1.91 KB
/
train.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Training config.
#
# Usage:
# oumi train -c configs/recipes/llama3_1/pretraining/8b/train.yaml
#
# See Also:
# - Documentation: https://oumi.ai/docs/en/latest/user_guides/train/train.html
# - Config class: oumi.core.configs.TrainingConfig
# - Config source: https://github.com/oumi-ai/oumi/blob/main/src/oumi/core/configs/training_config.py
# - Other training configs: configs/**/pretraining/, configs/**/sft/, configs/**/dpo/
model:
model_name: "meta-llama/Llama-3.1-8B"
chat_template: "chat_ml"
model_max_length: 2048
torch_dtype_str: "bfloat16"
attn_implementation: "sdpa"
load_pretrained_weights: False
trust_remote_code: True
enable_liger_kernel: True # Helps reduce required VRAM
data:
train:
datasets:
- dataset_name: "HuggingFaceFW/fineweb-edu"
subset: "sample-10BT"
split: "train"
dataset_kwargs:
seq_length: 2048
# Polaris copy of the dataset:
# - dataset_name: "/eagle/community_ai/datasets/fineweb-edu/sample-10BT"
# subset: "default"
# split: "train"
stream: True
pack: True
target_col: "text"
use_async_dataset: True
training:
trainer_type: "TRL_SFT"
max_steps: 1000
save_steps: 500
save_final_model: True
per_device_train_batch_size: 16
gradient_accumulation_steps: 1
enable_gradient_checkpointing: True
gradient_checkpointing_kwargs:
use_reentrant: False
ddp_find_unused_parameters: False
optimizer: "adamw_torch_fused"
empty_device_cache_steps: 1
compile: True
dataloader_main_process_only: False
dataloader_num_workers: "auto"
dataloader_prefetch_factor: 32
seed: 123
logging_steps: 10
log_model_summary: False
output_dir: "output/fineweb.pt"
include_performance_metrics: True
enable_wandb: True
fsdp:
enable_fsdp: True
sharding_strategy: "HYBRID_SHARD"
forward_prefetch: True
auto_wrap_policy: "TRANSFORMER_BASED_WRAP"
transformer_layer_cls: "LlamaDecoderLayer"