Git Product home page Git Product logo

Comments (6)

craffel avatar craffel commented on September 26, 2024

This is a known issue that we are working on. For now, you can hardcode the number of examples in each task when constructing the mixture.

from text-to-text-transfer-transformer.

agemagician avatar agemagician commented on September 26, 2024

@craffel Thanks for the reply.

For now, I set it manually to:

t5.data.MixtureRegistry.add(
"mixtask",
[["task1",0.34], ["task2",0.34],["task3",0.21],["task3",0.11]],
)

Hopefully, you fix it soon.

from text-to-text-transfer-transformer.

craffel avatar craffel commented on September 26, 2024

Thanks, yes, it is at the top of our to-do list!

from text-to-text-transfer-transformer.

agemagician avatar agemagician commented on September 26, 2024

@craffel Is the rate is correct as in the above example or should we use the actual number of samples?

I have checked the code and the task sampling is generated using "tf.data.experimental.sample_from_datasets" which uses "math_ops.log".

I am not sure should we pass the actual number of examples for each task or the rate of each task which is sum of 1 ?

using rates the math_ops.log leads to :
[0.34, 0.34, 0.21, 0.11] -> [-1.0788096 -1.0788096 -1.5606477 -2.207275 ]
using actual number of samples :
[10791.0, 10791.0, 6621.0, 3744.0] -> [9.286468 9.286468 8.798001 8.22791 ]

each one of them leads to totally different results using the multi-task training.

from text-to-text-transfer-transformer.

craffel avatar craffel commented on September 26, 2024

It uses a log to convert the weights to logits before feeding them into a multinomial distribution for sampling. This is not a detail you need to worry about. It will sample proportionally according to the weights as you'd expect.

from text-to-text-transfer-transformer.

peterRooo avatar peterRooo commented on September 26, 2024

test

from text-to-text-transfer-transformer.

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.