Code for BERT classifier finetuning for multiclass text classification
Instruction:
poetry install
to create an environment and install all dependencies (you might need to adapt PyTorch version in pyproject.toml
w.r.t. your CUDA version)config.yml
src/data.py
src/model.py
, by default it's DistilBERT for sequence classificationpoetry run python src/train.py
Video-tutorial
I explain the pipeline in detail in a video-tutorial which consists of 4 parts:
Also, see other tutorials/talks on the topic: