Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

奖励模型训练报错'NoneType' object has no attribute 'neftune_noise_alpha' #2125

Closed
1 task done
ChenBinfighting1 opened this issue Jan 8, 2024 · 6 comments
Closed
1 task done
Labels
solved This problem has been already solved

Comments

@ChenBinfighting1
Copy link

Reminder

  • I have read the README and searched the existing issues.

Reproduction

运行train_web,下页面导入数据后,采用glm2和llama2训练奖励模型,报错:
Traceback (most recent call last):
File "/home/.conda/envs/llama_factory/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/home/.conda/envs/llama_factory/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/jc/nlp/llm/LLaMA-Factory/src/llmtuner/train/tuner.py", line 28, in run_exp
run_rm(model_args, data_args, training_args, finetuning_args, callbacks)
File "/home/jc/nlp/llm/LLaMA-Factory/src/llmtuner/train/rm/workflow.py", line 50, in run_rm
train_result = trainer.train(resume_from_checkpoint=training_args.resume_from_checkpoint)
File "/home/.conda/envs/llama_factory/lib/python3.10/site-packages/transformers/trainer.py", line 1467, in train
self.model = self._activate_neftune(self.model)
File "/home/.conda/envs/llama_factory/lib/python3.10/site-packages/transformers/trainer.py", line 629, in _activate_neftune
embeddings.neftune_noise_alpha = self.neftune_noise_alpha
AttributeError: 'NoneType' object has no attribute 'neftune_noise_alpha'

请问有碰到过吗?感谢

Expected behavior

No response

System Info

No response

Others

No response

@hiyouga
Copy link
Owner

hiyouga commented Jan 8, 2024

代码是最新?

@hiyouga hiyouga added the pending This problem is yet to be addressed label Jan 8, 2024
@ChenBinfighting1
Copy link
Author

代码是最新?
是的

@hiyouga
Copy link
Owner

hiyouga commented Jan 8, 2024

奖励模型不应该使用 NEFTune

@hiyouga hiyouga added wontfix This will not be worked on and removed pending This problem is yet to be addressed labels Jan 8, 2024
@hiyouga hiyouga closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2024
@ChenBinfighting1
Copy link
Author

image
发现运行train+web自动带上了这个参数

@ChenBinfighting1
Copy link
Author

现在手动运行train_bash,可以训练,是不是web端那边有问题

@hiyouga
Copy link
Owner

hiyouga commented Jan 8, 2024

ok,我修复一下

hiyouga added a commit that referenced this issue Jan 8, 2024
@hiyouga hiyouga added solved This problem has been already solved and removed wontfix This will not be worked on labels Jan 8, 2024
@hiyouga hiyouga closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

No branches or pull requests

2 participants