[Code] PyTorch sentiment classifier from scratch with Huggingface NLP Library (Full Tutorial)
Yannic Kilcher
Huggingface released its newest library called NLP, which gives you easy access to almost any NLP dataset and metric in one convenient interface. We will combine this with a BERT model from Huggingface's Transformers library to build a sentiment classifier for IMDB.
OUTLINE: 0:00 - Intro 1:30 - Boilerplate 3:20 - PyTorch Lightning Module 9:50 - Load Dataset 12:15 - Tokenization 20:50 - Torch Tensors 25:50 - Data Loader 28:00 - Create BERT Model 32:00 - Implement Validation and Train Step 47:00 - Run & Recap 50:20 - Epilogue
My Code: https://github.com/yk/huggingface-nlp-demo NLP Library: https://github.com/huggingface/nlp Tutorial Colab: https://colab.research.google.com/github/huggingface/nlp/blob/master/notebooks/Overview.ipynb Transformers Library: https://github.com/huggingface/transformers Pytorch Lightning: https://github.com/PyTorchLightning/pytorch-lightning
Links: YouTube: https://www.youtube.com/c/yannickilcher Twitter: https://twitter.com/ykilcher BitChute: https://www.bitchute.com/channel/yannic-kilcher Minds: https://www.minds.com/ykilcher ... https://www.youtube.com/watch?v=G3pOvrKkFuk
176335527 Bytes