Block 109: Fine-tuning Concepts & Zero-Shot Classification
Understand fine-tuning and use zero-shot classification.
Concepts
- What fine-tuning means: adjusting pre-trained weights on new data
- Zero-shot classification: no training examples needed
- pipeline('zero-shot-classification')
- Candidate labels and multi-label support
Code Examples
See exercise below.
Exercise
Use zero-shot classification to categorize 10 news headlines into: politics, sports, technology, entertainment. Compare zero-shot results to a simple keyword-based classifier you write manually.
Homework
When would zero-shot classification be preferred over training a classifier? When is it not enough?