Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Jointly train Question Answering and Multiple Choice #291

Open
tmquan opened this issue Oct 6, 2022 · 1 comment
Open

Jointly train Question Answering and Multiple Choice #291

tmquan opened this issue Oct 6, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tmquan
Copy link

tmquan commented Oct 6, 2022

🚀 Feature: Multi task NLP model

For such an IELTS exam paper, there are several types of questions such as Question Answering and Multiple Choice.
The current implementation of lightning_transformer does well for a single task but I wonder whether a case to jointly train 2 tasks at the same time? Because the context will be shared during two tasks, therefore sharing the encoder will be beneficial.

Alternatives

I found a reference to do this directly on huggingface transformer but dont know how to structure it to adapt with lightning transformers.
https://colab.research.google.com/github/zphang/zphang.github.io/blob/master/files/notebooks/Multi_task_Training_with_Transformers_NLP.ipynb#scrollTo=xW8bnTgCsx5c

@tmquan tmquan added enhancement New feature or request help wanted Extra attention is needed labels Oct 6, 2022
@uakarsh
Copy link

uakarsh commented Oct 12, 2022

Hi @tmquan, from the question, I guess it is not directly available as of now, in lightning-transformer, but from the colab notebook that you shared and the code base of lightning-transformer, I think, the following approach could help:

  1. You can inherit the class of Seq2SeqTransformer as mentioned here, and modify the arguments during initialization and common step.
  2. Modifying this step with some pre-processing, model defining, metrics calculation, and post-processing, would make it easy to jointly train Question Answering and Multiple Choice (Multi-task NLP model) tasks.

I hope this helps.

@Borda Borda changed the title Jointly train Question Answering and Multiple Choice (Multi task NLP model) Jointly train Question Answering and Multiple Choice Nov 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants