Skip to content

Instantly share code, notes, and snippets.

@Lyken17
Created April 20, 2023 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lyken17/3ce9c32b5e6383b71c84869022de7ebf to your computer and use it in GitHub Desktop.
Save Lyken17/3ce9c32b5e6383b71c84869022de7ebf to your computer and use it in GitHub Desktop.
alpaca_8xA6000_error_script
# e408b27
MODEL=facebook/opt-6.7b
torchrun --nproc_per_node=8 --master_port=24567 train.py \
--model_name_or_path $MODEL \
--data_path ./alpaca_data.json \
--bf16 True \
--output_dir ./output/$MODEL \
--num_train_epochs 3 \
--per_device_train_batch_size 2 \
--per_device_eval_batch_size 2 \
--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 'OPTDecoderLayer' \
--tf32 True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment