模型转换失败:Unsupported to converter models with fmk: 5

➜ ./converter_lite --fmk=PYTORCH
–modelFile=qwen2.5-0.5b-model.pt
–outputFile=qwen
[ERROR] LITE(1028539,7f953c260f40,converter_lite):2025-09-28-17:04:34.476.300 [mindspore-lite/tools/converter/converter_funcgraph.cc:89] Load3rdModelToFuncgraph] Unsupported to converter models with fmk: 5
[ERROR] LITE(1028539,7f953c260f40,converter_lite):2025-09-28-17:04:34.476.324 [mindspore-lite/tools/converter/converter_funcgraph.cc:187] Build] Load model file failed!
[ERROR] LITE(1028539,7f953c260f40,converter_lite):2025-09-28-17:04:34.476.328 [mindspore-lite/tools/converter/converter.cc:1197] HandleGraphCommon] Build func graph failed
[ERROR] LITE(1028539,7f953c260f40,converter_lite):2025-09-28-17:04:34.476.338 [mindspore-lite/tools/converter/converter.cc:1152] Convert] Handle graph failed: -1 Common error code.
[ERROR] LITE(1028539,7f953c260f40,converter_lite):2025-09-28-17:04:34.476.342 [mindspore-lite/tools/converter/converter.cc:1345] RunConverter] Convert model failed
[ERROR] LITE(1028539,7f953c260f40,converter_lite):2025-09-28-17:04:34.476.351 [mindspore-lite/tools/converter/cxx_api/converter.cc:361] Convert] Convert model failed, ret=Common error code.
ERROR [mindspore-lite/tools/converter/converter_lite/main.cc:107] main] Convert failed. Ret: Common error code.
Convert failed. Ret: Common error code.

用户您好,欢迎使用MindSpore,已经收到您上述的问题,还请耐心等待下答复~

建议导出onnx IR 模型,当前torch ir 正式版本中没有支持

--fmk=PYTORCH 目前支持的类型优先,目前没有PYTORCH这个关键字,只有ONNX、MINDIR等,当前可以代码可以支持PT的模型转换,但是没有在正式版本中发布,目前支持的算子的类型有限;建议导出ONNX模型再进行转换

1 个赞

用户您好,MindSpore支撑人已经分析并给出了问题的原因,这里版主将进行采纳回答的结帖操作,如果还其他疑问请发新帖子提问,谢谢支持~

此话题已在最后回复的 60 分钟后被自动关闭。不再允许新回复。