microsoft / LMOps

General technology for enabling AI capabilities w/ LLMs and MLLMs
https://aka.ms/GeneralAI
MIT License
3.6k stars 274 forks source link

ImportError: cannot import name 'mpu' from 'transformers' #176

Closed qxpBlog closed 6 months ago

qxpBlog commented 6 months ago

@artsobolev @donglixp @intfloat @wolfshow when i run the scriptsbash /home//LMOps-main/minillm/scripts/llama2/sft/sft_7B.sh, this problem happend. My transformers version is 4.38.2. How can i solve it?

t1101675 commented 6 months ago

You should use the transformers provided in our repo by pip3 install -e transformers/

qxpBlog commented 6 months ago

You should use the transformers provided in our repo by pip3 install -e transformers/

Thank you for your answer.I have another question:How can I specify the GPU number during code execution when i run the script bash /home//LMOps-main/minillm/scripts/llama2/sft/sft_7B.sh

t1101675 commented 6 months ago

This line controls the GPU number.

qxpBlog commented 6 months ago

This line controls the GPU number.

thanks, I have got it.