项目作者: Dani-Mora

项目描述 :
BERT fine-tuning classification example.
高级语言: Jupyter Notebook
项目地址: git://github.com/Dani-Mora/bernie-vs-trump-bert-fine-tuning.git


Bert classification: Bernie vs Trump

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.

Setting environment up

Make sure conda >= 4.8.3 and Python >= 3.7 are installed in your system. Then, run:

  1. conda env create -f environment.yml
  2. conda activate bert