SkillAgentSearch skills...

Multitask Learning Transformers

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.

Install / Use

npx skills add shahrukhx01/multitask-learning-transformers

Installs into whichever agent you are using.

About this skill

Quality Score

0/100

Supported Platforms

Universal

README

multitask-learning-transformers

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.

Colab Notebook

Colab Notebook

Trained Huggingface Model

HF Model

Install depedencies

pip install -r requirements.txt

Run training

python3 main.py \
        --model_name_or_path='roberta-base' \
        --per_device_train_batch_size=8 \
        --output_dir=output --num_train_epochs=1

Single Encoder Multiple Output Heads

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.

mt1

Shared Encoder

Separate models for each task, but we make them share same encoder.

mt2

References: Multi-task Training with Transformers+NLP

Related Skills

View on GitHub
GitHub Stars102
CategoryEducation
Updated15d ago
Forks13

Languages

Python

Security Score

95/100

Audited on Jul 23, 2026

No findings