-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
StackLlaMa 2 dpo train failed: 8-bit model can't train with multiple gpus #1348
Comments
Hi @fancyerii
If that works, would you be happy to submit a fix through a PR on that DPO script? |
I upgraded accelerate to 0.27.2. But it failed with new error.
|
I searched this issue. And After I added the following line, it worked.
|
indeed ! adding that line should solve it ! |
fix "ValueError: You can't train a model that has been loaded in 8-bit precision on a different device than the one you're training on." see huggingface#1348
I have submitted a pr. |
Thanks so much @fancyerii ! |
* fix 8-bit multi-gpu training bug see #1348 * Update dpo_llama2.py make gradient_checkpointing_kwargs configurable. * Update dpo_llama2.py remote unnecessary config of device_map * format with make precommit --------- Co-authored-by: ubuntu <[email protected]>
* fix 8-bit multi-gpu training bug see huggingface#1348 * Update dpo_llama2.py make gradient_checkpointing_kwargs configurable. * Update dpo_llama2.py remote unnecessary config of device_map * format with make precommit --------- Co-authored-by: ubuntu <[email protected]>
I am following https://github.com/huggingface/trl/tree/main/examples/research_projects/stack_llama_2/scripts.
I ran with:
7b.yaml file:
error message:
I searched this issue and I am not sure it use Naive PP.
my environment:
The text was updated successfully, but these errors were encountered: