Code Monkey home page Code Monkey logo

Comments (3)

shamanez avatar shamanez commented on May 30, 2024

Seems like something is wrong! What was the batch size?

from dalm.

yashkens avatar yashkens commented on May 30, 2024

I found an error, now the loss is around 10 at the start of the training. I made some modifications to your code, so the mistake was mine. When computing the loss, I used the sum over tokens instead of the mean, similar to the original training code in the hf RAG repository. With the sum, it is expected to have a large loss which depends on the number of tokens. So, what is the reasoning behind that? Did I misunderstand it somehow?

By the way, as far as I am aware, your code does not allow for training only the query encoder and not the context encoder, as in the original RAG paper. Are there any plans to add this feature in the future?

from dalm.

shamanez avatar shamanez commented on May 30, 2024

@yashkens Yeah sum will give you large values and can mess up the training.

In this repo, we didn't use a duel encoder for a retriever.

from dalm.

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.