成功解决:AttributeError: module ‘torch.utils._pytree‘ has no attribute ‘register_pytree_node‘.

我的torch版本是2.0,cuda版本11.7

以下仅供参考:

pip install transformers==4.37.0

高于4.37:AttributeError: module ‘torch.utils._pytree‘ has no attribute ‘register_pytree_node‘.

低于4.37:cannot import name 'SiglipImageProcessor' from 'transformers'

所以对于torch==2.0,只有4.37版本的transformer合适

另有:

match case 语句要求python>=3.10

安装flash-attn时build报错,或者即使安装成功,但却import不进来,可能是你安装的flash版本不一致!导致flash-attn安装错误:

可在下面的网页上下载对应版本的离线包再安装:

https://link.zhihu.com/?target=https%3A//github.com/Dao-AILab/flash-attention/releases/

pip install flash_attn-2.3.5+cu117torch2.0cxx11abiFALSE-cp310-cp310-linux_x86_64.whl --no-build-isolation
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值