In this lab we'll see how to fine-tune DistilBERT for analyzing the sentiment of restaurant reviews. We'll look at how to do this from scratch, adding the specific layers for classification by hand. We'll conclude by looking at how to use the HuggingFace Transformers library for this.
🖹 Lab Notebook: colab.research...
🕤 Timestamps:
- 00:50 - Knowledge Distillation
- 02:15 - Restaurant Review Dataset
- 04:44 - PyTorch Dataset and Dataloader
- 09:40 - Fine-tuning DistilBERT for Classification Tasks
- 14:29 - Evaluation
- 18:30 - Freezing Weights of Base Model
- 20:00 - Using Hugging Face Transformers for Fine-Tuning (Trainer class)
References:
- "DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter", arxiv.org/abs/...
- "HuggingFace Transformers", huggingface.co...
- "Knowledge distillation", www.analyticsv...
29 авг 2024