-
Notifications
You must be signed in to change notification settings - Fork 10
/
config.yaml
70 lines (57 loc) · 1.27 KB
/
config.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
69
70
model: /model-weights/Llama-2-7b-chat-hf/
enable_wandb_logging: True
wandb_config:
project: MedGPT
name: Llama-2-7B-chat
train_parameters:
output_dir: your/output/dir
max_seq_len: 4096
epochs: 1
seed: 11
# Sharding strategy
sharding_strategy: FULL_SHARD
# Memory
use_mp: True
use_activation_checkpointing: True
use_flash_attention: True
low_cpu_mem_usage: True
# LoRA config: uncomment the block below to enable LoRA
# lora_peft_config:
# task_type: CAUSAL_LM
# inference_mode: False
# r: 8
# lora_alpha: 32
# lora_dropout: 0.1
# Gradient norm clipping
max_grad_norm: 1
gradient_accumulation_steps: 4
# Optimizer
optimizer:
lr: 2.0e-5
weight_decay: 0.1
betas: [0.9, 0.95]
eps: 1.0e-5
# Scheduler
lr_scheduler_type: cosine
warmup_ratio: 0.05
# Checkpointing
checkpointing_enabled: True
logging_steps: 500
save_frequency: 0.25
dataset:
ignore_index: -100
eval_bs: 8
train_bs: 8
train_ds: your/train/ds
eval_ds: your/eval/ds
dataset_preprocess:
ignore_index: -100
dataset_format: hf
data_field: text
packing_type: partial
add_bos_eos_tokens: True
from_disk: True
load_path: your/unprocessed/dataset
split: train
save_path: dir/to/save/processed/dataset
truncate: False