hiyouga / LLaMA-Factory

Unified Efficient Fine-Tuning of 100+ LLMs (ACL 2024)
https://arxiv.org/abs/2403.13372
Apache License 2.0
34.95k stars 4.31k forks source link

qwen2-vl-2b全参微调后,推理出现重复输出 #6001

Open hunter2009pf opened 2 weeks ago

hunter2009pf commented 2 weeks ago

Reminder

System Info

llamafactory version: 0.9.1.dev0 method: sft+full parameters base model: Qwen2-VL-2B

Reproduction

训练没有问题,进入推理阶段,前半段的文本输出正常,后半段开始重复输出文本 image

Expected behavior

期望不要重复输出文本,而是输出正常的格式化数据

Others

No response

hunter2009pf commented 2 weeks ago

全参微调qwen2-vl-2b

CUDA_VISIBLE_DEVICES=0 llamafactory-cli train \ --stage sft \ --do_train True \ --model_name_or_path /data1/xxx/llm_models/Qwen2-VL-2B-Instruct \ --dataset ui2web_trainset_20241112 \ --dataset_dir ./data \ --template qwen2_vl \ --finetuning_type full \ --output_dir ./saves/Qwen2-VL-2B-UI2WEB/sft_full/20241112_0 \ --overwrite_cache \ --overwrite_output_dir \ --cutoff_len 2048 \ --preprocessing_num_workers 2 \ --per_device_train_batch_size 2 \ --per_device_eval_batch_size 4 \ --gradient_accumulation_steps 2 \ --lr_scheduler_type cosine \ --logging_steps 5 \ --warmup_steps 0 \ --save_steps 100 \ --eval_steps 50 \ --evaluation_strategy steps \ --load_best_model_at_end \ --learning_rate 5e-5 \ --num_train_epochs 10.0 \ --max_samples 1000 \ --val_size 0.1 \ --plot_loss

全参训练命令是这个,猜测是不是跟这个cutoff_len的设置有关系?