背景:
学习huggingface的课程,运行测试程序
https://huggingface.co/learn/llm-course/zh-CN/chapter1/3?fw=pt

解决方法参考:

https://github.com/huggingface/transformers/issues/37326

我本地安装了下面包就好了

pip install accelerate
Last modification:April 8, 2025
如果觉得我的文章对你有用,请随意赞赏