Hugging Face provides three ways to fine-tune a pretrained text classification model: Tensorflow Keras, PyTorch, and transformer trainer. Transformer trainer is an API for feature-complete training in PyTorch without writing all the loops. This tutorial will use the transformer trainer to fine-tune a text classification model. We will talk about the following:
👉 How does transfer learning work?
👉 How to convert a pandas dataframe into a Hugging Face Dataset?
👉 How to tokenize text, load a pretrained model, set training arguments, and train a transfer learning model?
👉 How to make predictions and evaluate the model performance of a fine-tuned transfer learning model for text classification?
👉 How to save the model and re-load the model?
⏰ Timecodes ⏰
0:00 - Intro
00:52 - Step 0: Transfer Learning Algorithms
1:52 - Step 1: Install and Import Libraries
2:17 - Step 2: Download And Read Data
3:57 - Step 3: Train Test Split
4:25 - Step 4: Convert Pandas Dataframe to Hugging Face Dataset
5:41 - Step 5: Tokenize Text
9:13 - Step 6: Load Pretrained Model
9:45 - Step 7: Set Training Argument
11:42 - Step 8: Set Evaluation Metrics
12:10 - Step 9: Train Model Using Transformer Trainer
13:04 - Step 10: Make Predictions for Text Classification
14:40 - Step 11: Model Performance Evaluation
15:06 - Step 12: Save and Load Model
❤️ Blog post with code for this video: / transfer-learning-for-text-classification-...
📒 Code Notebook: https://mailchi.mp/9991135e0820/u0y1n...
🚛 GrabNGoInfo Machine Learning Tutorials Inventory: / grabngoinfo-machine-learning-tutorials-inv...
🏪 Purchase data science and computer science themed products in my Amazon store: https://amzn.to/40HUTsl
✅ Join Medium Membership: If you are not a Medium member and want to support me to keep providing free content (😄 Buy me a cup of coffee ☕), join Medium membership through this link: / membership
You will get full access to posts on Medium for $5 per month, and I will receive a portion of it. Thank you for your support!
🎞️ NLP playlist: • NLP
📺 Videos mentioned in the video
Google Colab Tutorial for Beginners: • Google Colab Tutorial For Beginners
Customized Sentiment Analysis: Transfer Learning Using Tensorflow with Hugging Face: • Customized Sentiment Analysis | Trans...
👩🏻💻 Follow me on LinkedIn: / grabngoinfo
🔥 Check out more machine learning tutorials on my website!
https://grabngoinfo.com/tutorials/
🛎️ SUBSCRIBE to GrabNGoInfo https://bit.ly/3keifBY
📧 CONTACT me at [email protected]
#transferlearning #finetuning #transformers #huggingface #grabngoinfo