File size: 1,654 Bytes
ab2eea2 |
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 |
tokenizer:
_component_: torchtune.models.gemma.gemma_tokenizer
path: ./target/gemma-2b/tokenizer.model
dataset:
_component_: torchtune.datasets.alpaca_dataset
seed: null
shuffle: true
model:
_component_: torchtune.models.gemma.lora_gemma_2b
lora_attn_modules:
- q_proj
- k_proj
- v_proj
apply_lora_to_mlp: true
lora_rank: 64
lora_alpha: 128
lora_dropout: 0.0
checkpointer:
_component_: torchtune.training.FullModelHFCheckpointer
checkpoint_dir: ./target/gemma-2b/
checkpoint_files:
- model-00001-of-00002.safetensors
- model-00002-of-00002.safetensors
recipe_checkpoint: null
output_dir: ${output_dir}/weights
model_type: GEMMA
resume_from_checkpoint: false
save_adapter_weights_only: false
optimizer:
_component_: torch.optim.AdamW
fused: false
lr: 2.0e-05
lr_scheduler:
_component_: torchtune.modules.get_cosine_schedule_with_warmup
num_warmup_steps: 10
loss:
_component_: torchtune.modules.loss.CEWithChunkedOutputLoss
batch_size: 4
epochs: 1
max_steps_per_epoch: 10
gradient_accumulation_steps: 4
compile: false
device: mps
enable_activation_checkpointing: true
enable_activation_offloading: false
dtype: bf16
metric_logger:
_component_: torchtune.training.metric_logging.DiskLogger
log_dir: ${output_dir}
output_dir: ./target/gemma_tmp
log_every_n_steps: 1
log_peak_memory_stats: false
profiler:
_component_: torchtune.training.setup_torch_profiler
enabled: false
output_dir: ${output_dir}/profiling_outputs
cpu: true
cuda: true
profile_memory: false
with_stack: false
record_shapes: true
with_flops: false
wait_steps: 5
warmup_steps: 5
active_steps: 2
num_cycles: 1
|