BERT Fine-Tuning Tutorial with PyTorch

Here’s another post I co-authored with Chris McCormick on how to quickly and easily create a SOTA text classifier by fine-tuning BERT in PyTorch.

This was created when BERT was pretty new and exciting, but the tooling for it was quite bad. Huggingface hosted the model, but documentation was very poor. As a result of that, we decided to create an in-depth tutorial.

It was one of the very first comprehensive BERT (and fine-tuning!) tutorials and became incredibly popular, so I’m proud to have helped introduce language model fine-tuning to so many others.