ms-swift 微调 qwen2 报错 TypeError: argument of type ‘NoneType‘ is not iterable 解决方法
·
在部署已经 merge 好的模型时,sh 脚本:
RAY_memory_monitor_refresh_ms=0
CUDA_VISIBLE_DEVICES=0
swift deploy \
--model ./merged_model
报错: TypeError: argument of type 'NoneType' is not iterable
解决方法:找到 deploy.py

在文件开头加上如下的几行代码:
from transformers import modeling_utils
if not hasattr(modeling_utils, "ALL_PARALLEL_STYLES") or modeling_utils.ALL_PARALLEL_STYLES is None:
modeling_utils.ALL_PARALLEL_STYLES = ["tp", "none","colwise",'rowwise']
修改后如图:

再次运行,就不会报这个错误啦!
更多推荐



所有评论(0)