BERT for dummies



I will keep this short. BERT is a pre-trained model (trained on wikipedia) that means we skip all those time consuming stuff of tokenizing and encoding those models. Everything here is a ripped off without modification from Google Colab example (please refer to link below for all the codes)

This example is a classification problem and it will classify if a sentence is grammatically correct or not.

Sample used :- COLA - a dataset for benchmarking grammar.

Summary of tasks before getting lost in the crazy codes maze.


- Load all the necessary library - which includes hugging face's BERT and pytorch

- Load this COLA dataset and transform it into a correct format

- Load BERT model

- Predict and Evaluate

The results is true or false.


Done :)


Reference link

https://colab.research.google.com/drive/1ywsvwO6thOVOrfagjjfuxEf6xVRxbUNO


Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm