当前位置: 首页 > news >正文

奇怪的错误记录

https://github.com/meta-llama/llama3/issues/80

读模型没问题,推理时出现:
RuntimeError: “triu_tril_cuda_template” not implemented for ‘BFloat16’

————————————————

事发原因

我尝试了解transformers的AutoProcessor时,它提示我:
RuntimeError: Failed to import transformers.models.auto.processing_auto because of the following error (look up to see its traceback):
Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=11.8 and torchvision has CUDA Version=11.7. Please reinstall the torchvision that matches your PyTorch install.
说我torch和torchvision的cuda版本对不上?我当初是按Pytorch安装的啊。。。

我的torch 版本如下:
torch 2.0.0+cu118
torchaudio 2.0.1
torchvision 0.15.1

很怪,俩后面确实没跟cu118字样。所以我找pytorch官方网站又下了一次:
pip install torch2.0.0 torchvision0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118

这回对了。我只卸载了torchvision,所以torchaudio没有更新。
torch 2.0.0+cu118
torchaudio 2.0.1
torchvision 0.15.1+cu118

此时就出现了最前面的错误。

————————

暂时的补救方法

我读的是qwen1.5 7B,设置torch_dtype=torch.bfloat16。把bfloat16改成torch_dtype=torch.float16后, 就能推理了。或者把torchvision退回普通版本。
但是torch.float16和torch.bfloat16是完全不同的两个东西,就这么换了,不对劲啊。。。

http://www.lryc.cn/news/397685.html

相关文章:

  • 来啦,经典传说大变身牛郎织女后代逗趣日常
  • 【uniapp-ios】App端与webview端相互通信的方法以及注意事项
  • Qt常用基础控件总结—表格控件(QTableWidget类)
  • 笔记:Entity Framework Core 数据库迁移add-migration
  • 准备工作+1、请求和响应+2、模型和管理站点
  • js 格式化时间
  • python 缩放照片
  • 【C语言】指针(1):入门理解(课堂随笔)
  • LLMs可以进行任务规划吗?如果不行,LLMs+GNN可以吗?
  • 性价比高充电宝有哪些?充电宝十大最佳品牌大盘点!
  • hnust 1963: 邻接矩阵表示法
  • Hadoop-15-Hive 元数据管理与存储 Metadata 内嵌模式 本地模式 远程模式 集群规划配置 启动服务 3节点云服务器实测
  • 215.Mit6.S081-实验三-page tables
  • flask使用定时任务flask_apscheduler(APScheduler)
  • ApiFox或postman怎么用params类型传输json或集合+json的String类型
  • 数据结构第16节 最大堆
  • 显卡、显卡驱动、cuda、cuDNN之间关系
  • Rewrk一个更现代的http框架基准测试实用程序
  • 【算法】排序算法介绍 附带C#和Python实现代码
  • 360安全浏览器就是不行-python秒破解
  • Python实现傅里叶级数可视化工具
  • PDF 分割拆分 API 数据接口
  • 【python】随机森林预测汽车销售
  • Stable Diffusion教程|练丹师是如何炼丹的Lora模型训练
  • QT--SQLite
  • 【深度学习入门篇 ②】Pytorch完成线性回归!
  • Syslog 管理工具
  • 硅纪元AI应用推荐 | 百度橙篇成新宠,能写万字长文
  • Codeforces Round 954 (Div. 3)
  • 【Django】报错‘staticfiles‘ is not a registered tag library