A Simple Guide On Using BERT for Binary Text Classification.

The A-to-Z guide on how you can use Google’s BERT for binary text classification tasks. I’ll be aiming to explain, as simply and straightforwardly as possible, how to fine-tune a BERT model (with PyTorch) and use it for a binary text classification task.

Thilina Rajapakse
The Startup

--

Photo by Andy Kelly on Unsplash

Update Notice II

Please consider using the Simple Transformers library as it is easy to use, feature-packed, and regularly updated. The article still stands as a reference to BERT models and is likely to be helpful with understanding how BERT works. However, Simple Transformers offers a lot more features, much more straightforward tuning options, all the while being quick and easy to use! The links below should help you get started quickly.

  1. Binary Classification
  2. Multi-Class Classification
  3. Multi-Label Classification
  4. Named Entity Recognition (Part-of-Speech Tagging)
  5. Question Answering
  6. Sentence-Pair Tasks and Regression
  7. Conversational AI
  8. Language Model Fine-Tuning

--

--

Thilina Rajapakse
The Startup

AI researcher, avid reader, fantasy and Sci-Fi geek, and fan of the Oxford comma. www.linkedin.com/in/t-rajapakse/