GithubHelp home page GithubHelp logo

Comments (6)

spranjal25 avatar spranjal25 commented on June 10, 2024 1

@spranjal25 are you fine with @uakarsh suggestion?

Yes, that's very helpful. I think I can get started on it. Will pick this up ASA I get some free time, are we looking at a timeline here though @Borda?

from lightning-transformers.

spranjal25 avatar spranjal25 commented on June 10, 2024

Hi @SeanNaren, I'm looking to contribute in ML-Software projects and have been using pytorch-lightning myself (read: I'm a fan!). Can you tell me where to get started for this issue? I'd like to scope if I can devote some of my time fixing this one.

from lightning-transformers.

Borda avatar Borda commented on June 10, 2024

@SeanNaren would you have some points on how/where to start? 🐰

from lightning-transformers.

uakarsh avatar uakarsh commented on June 10, 2024

Hi @SeanNaren, @Borda, I think here is what is being asked to be modified.

I referred to this example.
In here, we use TranslationTransformer for the training purpose, and it inherits from Seq2SeqTransformer. If we see this line, we see that the output is loss, logits, however here the loss is calculated taking the padding token into account.

I found the answer about how to solve it, and it is described by the Hugging Face community here.

So, I guess the change to be made is (in simple language), in the same line, i.e here:

  1. Obtain the loss, logits from the common step
  2. Initialize the Cross-Entropy loss with ignore_index = -100.
  3. Make the indexes of the target tokens which are 0 to -100
  4. Calculate the final loss and then perform the steps as usual.

Hope this helps in solving the issue.

from lightning-transformers.

Borda avatar Borda commented on June 10, 2024

@spranjal25 are you fine with @uakarsh suggestion?

from lightning-transformers.

Borda avatar Borda commented on June 10, 2024

not a special rush :)

from lightning-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.