文档首页> AI开发平台ModelArts> 最佳实践> 昇腾业务迁移> LLM训练业务昇腾迁移指导> 常见问题> 调用transformers出现ImportError: Using the `Trainer` with `PyTorch` requires `accelerate`: Run `pip install --upgrade accelerate`
更新时间:2024-04-30 GMT+08:00
分享

调用transformers出现ImportError: Using the `Trainer` with `PyTorch` requires `accelerate`: Run `pip install --upgrade accelerate`

问题现象

调用transformers出现ImportError: Using the `Trainer` with `PyTorch` requires `accelerate`: Run `pip install --upgrade accelerate`。

图1 报错信息

原因分析

accelerate库版本需要升级。

处理方法

升级accelerate库,执行“pip install accelerate --upgrade”

分享:

    相关文档

    相关产品