xtuner icon indicating copy to clipboard operation
xtuner copied to clipboard

xtuner 微调internLM2.5出错

Open sakura073 opened this issue 1 year ago • 9 comments

命令:(xtuner-env) root@autodl-container-d293479255-f53de588:~/autodl-tmp/data# xtuner train sh/internlm2_5_chat_7b_qlora_oasst1_e3_copy.py --deepspeed deepspeed_zero2 报错信息:10/18 16:45:32 - mmengine - WARNING - WARNING: command error: ''Adafactor is already registered in optimizer at torch.optim''! 10/18 16:45:32 - mmengine - WARNING - Arguments received: ['xtuner', 'train', 'sh/internlm2_5_chat_7b_qlora_oasst1_e3_copy.py', '--deepspeed', 'deepspeed_zero2']. xtuner commands use the following syntax:

    xtuner MODE MODE_ARGS ARGS

    Where   MODE (required) is one of ('list-cfg', 'copy-cfg', 'log-dataset', 'check-custom-dataset', 'train', 'test', 'chat', 'convert', 'preprocess', 'mmbench', 'eval_refcoco')
            MODE_ARG (optional) is the argument for specific mode
            ARGS (optional) are the arguments for specific command

Some usages for xtuner commands: (See more by using -h for specific command!)

    1. List all predefined configs:
        xtuner list-cfg
    2. Copy a predefined config to a given path:
        xtuner copy-cfg $CONFIG $SAVE_FILE
    3-1. Fine-tune LLMs by a single GPU:
        xtuner train $CONFIG
    3-2. Fine-tune LLMs by multiple GPUs:
        NPROC_PER_NODE=$NGPUS NNODES=$NNODES NODE_RANK=$NODE_RANK PORT=$PORT ADDR=$ADDR xtuner dist_train $CONFIG $GPUS
    4-1. Convert the pth model to HuggingFace's model:
        xtuner convert pth_to_hf $CONFIG $PATH_TO_PTH_MODEL $SAVE_PATH_TO_HF_MODEL
    4-2. Merge the HuggingFace's adapter to the pretrained base model:
        xtuner convert merge $LLM $ADAPTER $SAVE_PATH
        xtuner convert merge $CLIP $ADAPTER $SAVE_PATH --is-clip
    4-3. Split HuggingFace's LLM to the smallest sharded one:
        xtuner convert split $LLM $SAVE_PATH
    5-1. Chat with LLMs with HuggingFace's model and adapter:
        xtuner chat $LLM --adapter $ADAPTER --prompt-template $PROMPT_TEMPLATE --system-template $SYSTEM_TEMPLATE
    5-2. Chat with VLMs with HuggingFace's model and LLaVA:
        xtuner chat $LLM --llava $LLAVA --visual-encoder $VISUAL_ENCODER --image $IMAGE --prompt-template $PROMPT_TEMPLATE --system-template $SYSTEM_TEMPLATE
    6-1. Preprocess arxiv dataset:
        xtuner preprocess arxiv $SRC_FILE $DST_FILE --start-date $START_DATE --categories $CATEGORIES
    6-2. Preprocess refcoco dataset:
        xtuner preprocess refcoco --ann-path $RefCOCO_ANN_PATH --image-path $COCO_IMAGE_PATH --save-path $SAVE_PATH
    7-1. Log processed dataset:
        xtuner log-dataset $CONFIG
    7-2. Verify the correctness of the config file for the custom dataset:
        xtuner check-custom-dataset $CONFIG
    8. MMBench evaluation:
        xtuner mmbench $LLM --llava $LLAVA --visual-encoder $VISUAL_ENCODER --prompt-template $PROMPT_TEMPLATE --data-path $MMBENCH_DATA_PATH
    9. Refcoco evaluation:
        xtuner eval_refcoco $LLM --llava $LLAVA --visual-encoder $VISUAL_ENCODER --prompt-template $PROMPT_TEMPLATE --data-path $REFCOCO_DATA_PATH
    10. List all dataset formats which are supported in XTuner

Run special commands:

    xtuner help
    xtuner version

GitHub: https://github.com/InternLM/xtuner

请教如何解决

sakura073 avatar Oct 18 '24 08:10 sakura073

解决了吗?

AI-Stock-pre avatar Oct 18 '24 09:10 AI-Stock-pre

看起来不维护了,也不打算解决了?

binbinao avatar Oct 21 '24 09:10 binbinao

一样的问题,怎么解决

a-drop-in-the-ocean456 avatar Oct 22 '24 08:10 a-drop-in-the-ocean456

解决了xdm 把pytorch版本回退到2.4.1就可以了

sakura073 avatar Oct 24 '24 07:10 sakura073

什么?项目不维护了?连问题也不回答了?

zl-comment avatar Oct 28 '24 08:10 zl-comment

解决了xdm 把pytorch版本回退到2.4.1就可以了

我也是这个问题我试一下

zl-comment avatar Oct 28 '24 08:10 zl-comment

mmengine不支持2.5.x的pytorch,应该是命名冲突了,改下mmengine的源码或者把pytorch降级一下就行

FlyCarrot avatar Nov 01 '24 07:11 FlyCarrot

为什么我改成 2.4.1 了也不行啊还是一样的报错

minimum-generated-pig avatar Nov 24 '24 11:11 minimum-generated-pig

兄弟们可以试试按照这个pip 装。这是我跑通后导出的依赖包文件。 fintune20241124.txt

HelpFireCode avatar Nov 24 '24 12:11 HelpFireCode