How to do multitask learning for seq2seq models (NLP tasks)

Hello I am trying to figure out the following moments in multitask learning process

  • Dalaloader for generating batches with one task every time
  • calculating loss and metrics and importance of each according to datasets(tasks) rates and datasets(task) importance

How can we do that in the right way for seq2seq models?