A simple recipe for training and inferencing Transformer architecture for Multi-Task Learning on custom datasets. You can find two approaches for achieving this in this repo.
pip install -r requirements.txt
python3 main.py \
--model_name_or_path='roberta-base' \
--per_device_train_batch_size=8 \
--output_dir=output --num_train_epochs=1
A multi-task model in the age of BERT works by having a shared BERT-style encoder transformer, and different task heads for each task.
Separate models for each task, but we make them share same encoder.
References: Multi-task Training with Transformers+NLP