运行QWen2-1.5b模型时报错“RuntimeError: cutlassF: no kernel found to launch!”

运行QWen2-1.5b模型时报错"RuntimeError: cutlassF: no kernel found to launch!"

#问题:成功加载QWen2-1.5b模型,但是推理时

"model.generate(

model_inputs.input_ids,

top_p=self.top_p,

max_new_tokens=512

)时",报错"RuntimeError: cutlassF: no kernel found to launch!"

解决方法:

在代码运行的开头加入以下代码即可

import torch

torch.backends.cuda.enable_mem_efficient_sdp(False)

torch.backends.cuda.enable_flash_sdp(False)

参考链接:

https://blog.csdn.net/zc1226/article/details/140213258

https://stackoverflow.com/questions/77803696/runtimeerror-cutlassf-no-kernel-found-to-launch-when-running-huggingface-tran

相关推荐
岁月宁静7 小时前
五、《从零手撸 Agent》 — 什么是 Agent:从“会聊天”到“会做事”,差的就是一个循环
python·agent
梯度下降者8 小时前
Python - 函数
python·高阶函数·可调用对象·functools·嵌套作用域
starzy199010 小时前
深入理解Scala隐式参数:上下文流转
开发语言·python·scala
wuyk55511 小时前
Spider-第16讲-线程池与竞态问题
大数据·爬虫·python·elasticsearch·搜索引擎
kyle~17 小时前
FastAPI --- 将业务能力以 API 的形式提供给外部系统
python·fastapi·前后端
aiotto资源分享17 小时前
Python 写 JSON 文件,程序中途退出会留下什么?
java·python·json·jsondecodeerror
梯度下降者18 小时前
Python信号量,条件变量,事件学习
python·条件变量·事件·信号量·线程通信
MSTcheng.19 小时前
【AI应用实战】用 FastAPI + SSE 做一个自己的 AI 聊天网页:流式输出、多轮对话与完整源码
人工智能·python·大模型·fastapi·sse·ai聊天助手
哈尔滨张谦蛋19 小时前
兰州大学 · 甘肃省可穿戴装备重点实验室 · 2027年博士招生
人工智能·深度学习
the局外人19 小时前
Python 实战检索优化:BM25、向量与重排
数据库·后端·python