👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
跑llama3-8b的sft微调时,报错
Traceback (most recent call last):
File "/home/LAB/huangjx/new/PaddleNLP/llm/run_finetune.py", line 730, in <module>
main()
File "/home/LAB/huangjx/new/PaddleNLP/llm/run_finetune.py", line 570, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/home/LAB/huangjx/.local/lib/python3.10/site-packages/paddlenlp/trainer/trainer.py", line 829, in train
return self._inner_training_loop(
File "/home/LAB/huangjx/.local/lib/python3.10/site-packages/paddlenlp/trainer/trainer.py", line 1203, in _inner_training_loop
self._maybe_log_save_evaluate(tr_loss, model, epoch, ignore_keys_for_eval, inputs=inputs)
File "/home/LAB/huangjx/.local/lib/python3.10/site-packages/paddlenlp/trainer/trainer.py", line 1478, in _maybe_log_save_evaluate
self._save_checkpoint(model, metrics=metrics)
File "/home/LAB/huangjx/.local/lib/python3.10/site-packages/paddlenlp/trainer/trainer.py", line 2460, in _save_checkpoint
metric_value = metrics[metric_to_check]
KeyError: 'eval_accuracy'
但如果我把config中"metric_for_best_model": "accuracy",删除,就不会报错。所以应该是不支持"metric_for_best_model": "accuracy".在这个过程中我开了pp和tp
软件环境
重复问题
错误描述
稳定复现步骤 & 代码