项目场景:

llamafactory微调过程中,更新transformers版本后无法微调成功

问题描述

进入llamafactory的ui界面,点击微调后报错
if v not in ALL_PARALLEL_STYLES: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: argument of type 'NoneType' is not iterable


解决方案:

修改路径LLaMA-Factory/src/llamafactory/cli.py下的cli.py文件,在开头添加如下内容:

from transformers import modeling_utilsif not hasattr(modeling_utils, "ALL_PARALLEL_STYLES") or modeling_utils.ALL_PARALLEL_STYLES is None:
    modeling_utils.ALL_PARALLEL_STYLES = ["tp", "none","colwise",'rowwise']

完成后即可继续微调

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐