Qwen2.5
Qwen2.5 copied to clipboard
Qwen2-7b-instruct使用SFT-FT,loss变为0,如何解决?
我的训练参数如下:
export CUDA_VISIBLE_DEVICES="1,6,7" && DS_SKIP_CUDA_CHECK=1 OMP_NUM_THREADS=8 torchrun --standalone --nproc_per_node=gpu train_qwen.py
--model_name_or_path $model_path
--deepspeed $deepspeed_config
--data_path $data_path
--bf16 True
--output_dir $output_path
--num_train_epochs 1
--max_steps 376
--per_device_train_batch_size 1
--gradient_accumulation_steps 16
--evaluation_strategy "no"
--save_strategy "steps"
--save_steps 47
--save_total_limit 1
--learning_rate 1e-5
--weight_decay 0.1
--adam_beta2 0.95
--warmup_ratio 0.01
--lr_scheduler_type "cosine"
--logging_steps 8
--model_max_length 8192
--gradient_checkpointing True
--lazy_preprocess False
--iterable True
--tf32 0
如下是我的运行日志,第二步loss就变为0了。不知道问题是什么 {'loss': 1.7328, 'grad_norm': 1.9622441768332994e-05, 'learning_rate': 9.919354838709679e-06, 'epoch': 0.02} {'loss': 0.0, 'grad_norm': 3.913150697629098e-06, 'learning_rate': 9.704301075268819e-06, 'epoch': 0.04} 4%|████▉ | 16/376 [17:36<6:36:00, 66.00s/it]