Code Monkey home page Code Monkey logo

Comments (6)

github-actions avatar github-actions commented on May 24, 2024

This issue is marked as stale because it has been marked as invalid or awaiting response for 7 days without any further response. It will be closed in 7 days if the stale label is not removed or if there is no further response.

from internlm.

timousT avatar timousT commented on May 24, 2024

@zhangxc11 @lvhan028 @sunpengsdu @gouchangjiang 您们好, 能回答一下这个问题吗? 谢谢!

from internlm.

lvhan028 avatar lvhan028 commented on May 24, 2024

Hi, @timousT 抱歉回复晚了。
关于使用 xtuner 的微调,@pppppM 更清楚些。我请他来回复下

from internlm.

pppppM avatar pppppM commented on May 24, 2024

@timousT 如果想用 XTuner 进行扩词表训练,可以按以下步骤进行

  1. 挑选对应模型的 config 模板
xtuner list-cfg -p internlm2
xtuner copy-cfg internlm2_chat_7b_qlora_alpaca_e3 ./internlm2_chat_7b_new_tokenzier_alpaca_e3.py
  1. 在 config 中设置扩词表后的 tokenizer
    vi internlm2_chat_7b_new_tokenzier_alpaca_e3.py
    https://github.com/InternLM/xtuner/blob/56dbdd7610f99c5cd22c7fa59846fe46906370f7/xtuner/configs/internlm/internlm2_chat_7b/internlm2_chat_7b_qlora_alpaca_e3.py#L63

  2. 使用全参数微调
    XTuner 默认使用 QLoRA 进行微调,不会训练 embbeding 和最后的 fc
    只需要将 config 中的 quantization_configlora 删掉即可
    vi internlm2_chat_7b_new_tokenzier_alpaca_e3.py
    https://github.com/InternLM/xtuner/blob/main/xtuner/configs/internlm/internlm2_chat_7b/internlm2_chat_7b_qlora_alpaca_e3.py#L75-L90

  3. 使用 DeepSpeed 启动训练
    `xtuner train internlm2_chat_7b_new_tokenzier_alpaca_e3.py --deepspeed_deepspeed_zero3

如果想训练自己的数据,可以参考 XTuner 文档准备数据集
https://github.com/InternLM/xtuner/blob/main/docs/zh_cn/user_guides/multi_turn_conversation.md

from internlm.

github-actions avatar github-actions commented on May 24, 2024

This issue is marked as stale because it has been marked as invalid or awaiting response for 7 days without any further response. It will be closed in 7 days if the stale label is not removed or if there is no further response.

from internlm.

github-actions avatar github-actions commented on May 24, 2024

This issue is closed because it has been stale for 7 days. Please open a new issue if you have similar issues or you have any new updates now.

from internlm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.