hiyouga / LLaMA-Factory

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

About result, how to add the predict_accuracy #3572

Closed liuweiliu123 closed 5 months ago

liuweiliu123 commented 5 months ago

Reminder

Reproduction

"predict_bleu-4": 19.833460975609754, "predict_rouge-1": 56.09756097560975, "predict_rouge-2": 0.0, "predict_rouge-l": 56.09756097560975, "predict_runtime": 13.7136, "predict_samples_per_second": 5.979, "predict_steps_per_second": 2.99 这个是我的预测结果,但是我想做一个预测精确性的评价,如何得到predict_accuracy

Expected behavior

No response

System Info

No response

Others

No response

hiyouga commented 5 months ago

在这里自行实现 https://github.com/hiyouga/LLaMA-Factory/blob/main/src/llmtuner/train/sft/metric.py

liuweiliu123 commented 5 months ago

在这里自行实现 https://github.com/hiyouga/LLaMA-Factory/blob/main/src/llmtuner/train/sft/metric.py

感谢你的回答,我已经修改了这个部分,但是最终结果还是没有显示predict_accuracy,是不是还要修改其他部分的code? 比如输出可能被设置为仅显示特定的指标,

hiyouga commented 5 months ago

理论上不需要修改别的部分