huggingface / trl

Train transformer language models with reinforcement learning.
http://hf.co/docs/trl
Apache License 2.0
10k stars 1.27k forks source link

ValueError: weight is on the meta device, we need a 'value' to put in on 0 #364

Closed jerry1993-tech closed 1 year ago

jerry1993-tech commented 1 year ago

截屏2023-05-12 16 12 10 截屏2023-05-12 16 12 31

This error is always reported when loading the llama or gpt-2 training reward_modeling.py file! Very urgent, please find an answer ,thanks!

younesbelkada commented 1 year ago

hi @xuyingjie521 Can you make sure you are using the latest versions of transformers and accelerate?

pip install --upgrade accelerate transformers
jerry1993-tech commented 1 year ago

hi @xuyingjie521 Can you make sure you are using the latest versions of transformers and accelerate?

pip install --upgrade accelerate transformers

yeap, I found that the best paired version is accelerate==0.18.0 and transformers==4.29.1 ! thanks!