BERT fine-tuning classification example.
This repository is a first approach to fine-tuning BERT on a classification downstream task, supporting my talk about BERT.
The task is to classify sentences into two classes, according to whether they belong to Donald Trump or Bernie Sanders. We have manually collected sentences from one speech from 2015 for each of the US presidential candidates (link to Bernie Sanders speech; link to Donald Trump speech). We do not belong the rights of the data and it has only been used for educational purposes.
We have used pre-trained BERT models from HuggingFace, Pytorch and Pytorch Ignite.
Make sure conda >= 4.8.3 and Python >= 3.7 are installed in your system. Then, run:
conda env create -f environment.yml
conda activate bert