LLaMA-Factory icon indicating copy to clipboard operation
LLaMA-Factory copied to clipboard

推理阶段,预测文件中label显示不全问题

Open jy-101361-1810897 opened this issue 9 months ago • 1 comments

Reminder

  • [X] I have read the README and searched the existing issues.

Reproduction

CUDA_VISIBLE_DEVICES=0 python src/train.py
--stage sft
--model_name_or_path $base_model_dir
--do_train
--dataset juben_train
--dataset_dir $dataset_dir
--template baichuan2
--cutoff_len 512
--finetuning_type lora
--lora_target W_pack
--output_dir $output_dir
--overwrite_output_dir
--overwrite_cache
--per_device_train_batch_size 16
--gradient_accumulation_steps 1
--lr_scheduler_type cosine
--bf16
--double_quant
--quantization_bit 4
--quantization_type nf4
--warmup_ratio 0.05
--logging_steps 10
--save_steps 50
--learning_rate 1e-4
--num_train_epochs 10.0
--plot_loss

CUDA_VISIBLE_DEVICES=0 python src/train.py
--stage sft
--do_predict
--model_name_or_path $base_model_dir
--adapter_name_or_path $output_dir
--dataset_dir $dataset_dir
--dataset juben_test
--template baichuan2
--finetuning_type lora
--output_dir $predict_dir
--per_device_eval_batch_size 1
--max_samples 1000
--predict_with_generate
--max_length 1024
--generation_max_length 1024
--fp16

Expected behavior

模型微调后用于推理,发现生成的generated_predictions_0.jsonl文件中的label这个键的值不全问题

System Info

No response

Others

No response

jy-101361-1810897 avatar May 16 '24 11:05 jy-101361-1810897

我也遇到了,我临时用datasets的output代替label了

johnmai-dev avatar May 16 '24 16:05 johnmai-dev