Skip to content

[Bug] Examples教程-Tianji-天机 - 教程中各种库版本不适配导致根本跑不起来 #466

@luumod

Description

@luumod

出bug的具体模型

Internalm2-chat-7B

出bug的具体模型教程

使用xtuner进行微调,如transformers的等等库版本不协调

教程负责人

天机教程贡献者

Bug描述

要不出现ImportError: cannot import name 'StaticCache' from 'transformers.cache_utils' (/home/qlunlp/anaconda3/envs/xtuner/lib/python3.10/site-packages/transformers/cache_utils.py)

要不出现 Cache only has 0 layers, attempted to access layer with index 0

很多版本错误,导致最后的xtuner train ./internlm2_chat_7b_qlora_oasst1_e3_copy.py --deepspeed deepspeed_zero根本跑不起来。

复现步骤

按照教程中建库部分自己比着敲一下就知道了。

期望行为

xtuner train ./internlm2_chat_7b_qlora_oasst1_e3_copy.py --deepspeed deepspeed_zero2
能跑

环境信息

python 3.10
linux

其他信息

确认事项 / Verification

  • 此问题未在过往Issue中被报告过 / This issue hasn't been reported before

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions