Using huggingface + bert for sequences binary classification

So you want to train a binary classifier over strings, using state of the art language models. All you really want is an API that gets two groups of strings and an example usage. You don’t really want to know about masks and encodings and special tokens just yet, you just want to experiment a bit. Well there you go.

In this example we learn to identify past vs present tense in <50 examples.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store