mirror of
https://github.com/RYDE-WORK/visual-med-alpaca.git
synced 2026-01-29 03:43:23 +08:00
21 lines
704 B
Bash
Executable File
21 lines
704 B
Bash
Executable File
torchrun --nproc_per_node=1 train.py \
|
|
--model_name_or_path decapoda-research/llama-7b-hf \
|
|
--data_path /path/to/med_alpaca_data_clean.json \
|
|
--bf16 True \
|
|
--output_dir ./med-alpaca \
|
|
--num_train_epochs 3 \
|
|
--per_device_train_batch_size 4 \
|
|
--per_device_eval_batch_size 4 \
|
|
--gradient_accumulation_steps 8 \
|
|
--evaluation_strategy "no" \
|
|
--save_strategy "steps" \
|
|
--save_steps 2000 \
|
|
--save_total_limit 1 \
|
|
--learning_rate 2e-5 \
|
|
--weight_decay 0. \
|
|
--warmup_ratio 0.03 \
|
|
--lr_scheduler_type "cosine" \
|
|
--logging_steps 1 \
|
|
--fsdp "full_shard auto_wrap" \
|
|
--fsdp_transformer_layer_cls_to_wrap 'LlamaDecoderLayer' \
|
|
--tf32 True |