GithubHelp home page GithubHelp logo

Comments (6)

amyeroberts avatar amyeroberts commented on June 26, 2024 1

@emergenz @younesbelkada @ArthurZucker Outside of the debate of whether it's confusing or not, we're somewhat limited here on renaming. It's possible to rename the class itself (it's not importable from the __init__ and this shouldn't affect existing copies, other than creating a divergence). However, we can't rename the layer attribute in the other layers i.e. self.mlp, as this would change the state dict. As this would then create a mismatch i.e. self.mlp = LlamaGLU(...) I think we should leave as is (possibly with a clarifying comment somewhere in the code).

from transformers.

emergenz avatar emergenz commented on June 26, 2024 1

Oh, unfortunate but I understand. Thanks for clarification!

from transformers.

younesbelkada avatar younesbelkada commented on June 26, 2024

Hi @emergenz
Technically you are right, those classes correspond to Gated Linear Units. We could rename them but we need to be careful with public classes as these standalone classes are used by many codebases, e.g.: here to be renamed in order to not affect these - this might introduce some complexity in the modeling codebase so I will let the core maintainers decide on this @amyeroberts @ArthurZucker

from transformers.

ArthurZucker avatar ArthurZucker commented on June 26, 2024

I don't find it misleading at all TBH

from transformers.

emergenz avatar emergenz commented on June 26, 2024

I don't find it misleading at all TBH

@ArthurZucker Can you elaborate? GLUs are not MLPs. In fact, I was looking at the modeling_qwen2.py code when I saw hidden_states = self.mlp(hidden_states) in the DecoderLayer forward pass. I was extremely confused as to why the Qwen models are using MLPs instead of GLUs and therefore checked their technical report, where I realized that they indeed do not use MLPs. Only then did I realize that the Qwen2MLP class indeed represents a GLU.

I would argue that this is highly misleading naming.

from transformers.

younesbelkada avatar younesbelkada commented on June 26, 2024

Agreed with the statement above !

from transformers.

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.