manojpreveen
commited on
Commit
•
3743806
1
Parent(s):
f881940
Create mpt-30b_v5.yaml
Browse files- mpt-30b_v5.yaml +113 -0
mpt-30b_v5.yaml
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
max_seq_len: 8192
|
2 |
+
global_seed: 17
|
3 |
+
|
4 |
+
# Run Name
|
5 |
+
run_name: mpt-30b-4ep # If left blank, will be read from env var $RUN_NAME
|
6 |
+
|
7 |
+
model:
|
8 |
+
name: hf_causal_lm
|
9 |
+
pretrained: true
|
10 |
+
pretrained_model_name_or_path: manojpreveen/mpt-30b-v4
|
11 |
+
init_device: mixed
|
12 |
+
config_overrides:
|
13 |
+
max_seq_len: ${max_seq_len}
|
14 |
+
attn_config:
|
15 |
+
attn_impl: triton
|
16 |
+
# Set this to `true` if using `train_loader.dataset.packing_ratio` below
|
17 |
+
attn_uses_sequence_id: false
|
18 |
+
|
19 |
+
# Tokenizer
|
20 |
+
tokenizer:
|
21 |
+
name: manojpreveen/mpt-30b-v4
|
22 |
+
kwargs:
|
23 |
+
model_max_length: ${max_seq_len}
|
24 |
+
|
25 |
+
|
26 |
+
# Dataloaders
|
27 |
+
train_loader:
|
28 |
+
name: finetuning
|
29 |
+
dataset:
|
30 |
+
hf_name: csv
|
31 |
+
hf_kwargs:
|
32 |
+
data_dir: ~/mpt/llm-foundry/data/orca_1m_gpt4
|
33 |
+
preprocessing_fn:
|
34 |
+
split: train
|
35 |
+
max_seq_len: ${max_seq_len}
|
36 |
+
allow_pad_trimming: false
|
37 |
+
decoder_only_format: true
|
38 |
+
# # Use `python llmfoundry/data/packing.py --yaml-path /path/to/this/yaml/ ...`
|
39 |
+
# # to profile this run's optimal packing_ratio as it depends on GPU count,
|
40 |
+
# # batch size, sequence length
|
41 |
+
packing_ratio: 19.0
|
42 |
+
shuffle: true
|
43 |
+
drop_last: true
|
44 |
+
num_workers: 8
|
45 |
+
pin_memory: false
|
46 |
+
prefetch_factor: 2
|
47 |
+
persistent_workers: true
|
48 |
+
timeout: 0
|
49 |
+
|
50 |
+
# Optimization
|
51 |
+
scheduler:
|
52 |
+
name: linear_decay_with_warmup # linear no warmup is HF default which dolly used
|
53 |
+
t_warmup: 100ba # add some warmup though, seems to help with MPT
|
54 |
+
alpha_f: 0
|
55 |
+
|
56 |
+
optimizer:
|
57 |
+
# Based on Dolly
|
58 |
+
name: decoupled_lionw
|
59 |
+
lr: 1.0e-6
|
60 |
+
betas:
|
61 |
+
- 0.9
|
62 |
+
- 0.999
|
63 |
+
eps: 1.0e-8
|
64 |
+
weight_decay: 0
|
65 |
+
|
66 |
+
algorithms:
|
67 |
+
gradient_clipping:
|
68 |
+
clipping_type: norm
|
69 |
+
clipping_threshold: 1.0
|
70 |
+
|
71 |
+
max_duration: 4ep # 2-3 epochs seems like the sweet spot
|
72 |
+
eval_interval: 1
|
73 |
+
# eval_subset_num_batches: -1
|
74 |
+
# eval_first: true
|
75 |
+
global_train_batch_size: 8 # somewhere in the 6-8 * numgpus range seems good
|
76 |
+
|
77 |
+
# System
|
78 |
+
seed: ${global_seed}
|
79 |
+
# device_eval_batch_size: 8
|
80 |
+
device_train_microbatch_size: 2
|
81 |
+
# device_train_microbatch_size: auto
|
82 |
+
precision: amp_bf16
|
83 |
+
|
84 |
+
# FSDP
|
85 |
+
fsdp_config:
|
86 |
+
sharding_strategy: FULL_SHARD
|
87 |
+
mixed_precision: PURE
|
88 |
+
activation_checkpointing: true
|
89 |
+
activation_checkpointing_reentrant: false
|
90 |
+
activation_cpu_offload: false
|
91 |
+
limit_all_gathers: true
|
92 |
+
verbose: false
|
93 |
+
|
94 |
+
# Logging
|
95 |
+
progress_bar: false
|
96 |
+
log_to_console: true
|
97 |
+
console_log_interval: 1ba
|
98 |
+
|
99 |
+
callbacks:
|
100 |
+
speed_monitor:
|
101 |
+
window_size: 10
|
102 |
+
lr_monitor: {}
|
103 |
+
memory_monitor: {}
|
104 |
+
runtime_estimator: {}
|
105 |
+
|
106 |
+
# loggers:
|
107 |
+
# wandb: {}
|
108 |
+
|
109 |
+
# Checkpoint to local filesystem or remote object store
|
110 |
+
save_interval: 1ep
|
111 |
+
save_num_checkpoints_to_keep: 4 # Important, this cleans up checkpoints saved to DISK
|
112 |
+
save_folder: ./{run_name}/checkpoints
|
113 |
+
# save_folder: s3://my-bucket/my-folder/{run_name}/checkpoints
|