hiyouga / LLaMA-Factory

Efficiently Fine-Tune 100+ LLMs in WebUI (ACL 2024)
https://arxiv.org/abs/2403.13372
Apache License 2.0
31.67k stars 3.9k forks source link

沒有過擬和的狀況,但是loss到一個點後就會難以下降,並且推理對話會有重覆內容 #4434

Closed ahsbdcpu closed 3 months ago

ahsbdcpu commented 3 months ago

Reminder

System Info

Reproduction

CUDA_VISIBLE_DEVICES=0 python src/train.py --stage sft --do_train True --model_name_or_path microsoft/phi-1_5 --preprocessing_num_workers 16 --finetuning_type lora --template default --flash_attn auto --use_unsloth True --dataset_dir data --dataset 高血壓SFT,高血壓SFT_2,基礎繁中資料zh_TW_51k --cutoff_len 1024 --learning_rate 3e-04 --num_train_epochs 3 --max_samples 100000 --per_device_train_batch_size 8 --gradient_accumulation_steps 32 --lr_scheduler_type cosine --max_grad_norm 1.0 --logging_steps 5 --save_steps 100 --optim adamw_torch --packing False --report_to none --output_dir saves/Phi-1.5-1.3B/lora/3高血壓切分base_sft --fp16 True --plot_loss True --ddp_timeout 180000000 --include_num_input_tokens_seen True --lora_rank 8 --lora_alpha 16 --lora_target q_proj,v_proj --val_size 0.1 --evaluation_strategy steps --eval_steps 100 --per_device_eval_batch_size 8 --use_fast_tokenizer True --load_best_model_at_end True --new_special_tokens "高血壓,血壓,血壓高" --additional_target embed_tokens,lm_head

Expected behavior

如題,我的數據集有70000多條對話資料,training loss只要到了1.4~1.5之間就會很難下降,也沒有過擬和的狀況,但是在生成語句時還是會有重覆內容的現象,請問怎麼辦,謝謝您 螢幕擷取畫面 2024-06-24 095633 螢幕擷取畫面 2024-06-24 095607

Others

No response

hiyouga commented 3 months ago

--lora_target all