lm-sys / FastChat

An open platform for training, serving, and evaluating large language models. Release repo for Vicuna and Chatbot Arena.
Apache License 2.0
36.64k stars 4.52k forks source link

Loss reaches 0 when finetuning 7B model using 2xA100 80G #1948

Open rootally opened 1 year ago

rootally commented 1 year ago

I'm using the config below and I load the base model as torch.float16

--model_name_or_path llama_model \ --data_path data.json \ --bf16 True \ --num_train_epochs $3 \ --per_device_train_batch_size 2 \ --per_device_eval_batch_size 2 \ --gradient_accumulation_steps 16 \ --evaluation_strategy "no" \ --save_strategy "steps" \ --save_steps 1200 \ --save_total_limit 3 \ --learning_rate 2e-5 \ --weight_decay 0. \ --warmup_ratio 0.03 \ --lr_scheduler_type "cosine" \ --logging_steps 1 \ --model_max_length 2048 \ --fsdp "full_shard auto_wrap" \ --fsdp_transformer_layer_cls_to_wrap 'LlamaDecoderLayer' \ --tf32 True \ --gradient_checkpointing True \ --lazy_preprocess True \ --report_to tensorboard

CohenQU commented 1 year ago

Hi @rootally, I got the same problem when I finetuning 7B model on 2xA100. Have you fixed it now?