Giter VIP home page Giter VIP logo

Comments (3)

MikeDean2367 avatar MikeDean2367 commented on May 18, 2024

您好,是可以继续合并的,代码可以参考此处。在合并完成后,您会得到一个完整的权重,从代码的可行性上来说是可以继续fine-tune或者instruct tune的。

from knowlm.

apachemycat avatar apachemycat commented on May 18, 2024

多谢,我看了您提供的参考,我有个疑问
多LoRA权重合并也是支持的,意味着Base模型上分别用两套数据集训练出来两套LoRA 权重是可以了,这样吧两个权重合并到Base上,与先合并一个权重,然后在这个合并的结果上继续训练,然后再把训练好的权重合并到之前合并的结果里,这两种有什么区别?

from knowlm.

MikeDean2367 avatar MikeDean2367 commented on May 18, 2024

您好,我没有理解您的意思。我们的模型训练分为两个阶段,第一个阶段是使用中英语料进行全量二次预训练,没有使用LoRA;第二个阶段是用第一步的模型,使用我们构建的指令数据集,使用LoRA微调。

您的问题中提到了多LoRA,在我们的实验中没有这个情况。如果您指的是Chinese LLaMA仓库的话,建议您去咨询他们。(我的理解是他那边的同时合并,并不意味着同时训练,而是使用的您提到的第二种训练,假设base是A,我在A基础上训练了LoRA B,在A+B的基础上训练了LoRA C,那么最后有3个权重,分别是A,B,C,合并的时候可以是先合并(A+B)+C,也可以是A+(B+C),因此您从合并的顺序来推导出训练的顺序是不唯一的)。

最后从技术层面讨论一下这两个的区别。首先对于第一个情况,是一种并行合并,我的理解是分别训练,即用预训练语料在原版LLaMA上用LoRA训练,得到一个权重,用指令语料在原版LLaMA上再次用LoRA训练得到一个权重,最后再将两个LoRA进行合并,这个训练做法没有问题,但是这两个训练过程本来就是独立无关的,因此这种合并是不合理的,在我的知识范围内,这个做法不存在理论支持。对于第二个情况才是正确的且合理的。

from knowlm.

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.