From the course: Introduction to Transformer Models for NLP
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Few-shot learning
From the course: Introduction to Transformer Models for NLP
Few-shot learning
- Section 7.4, "Few-Shot Learning." So the idea of few-shot learning, or one-shot learning, or even zero-shot learning, stems from the fact that GPT, being pre-trained on that massive web text corpora, was actually seeing natural instances of people performing what we would consider as natural language processing tasks. So when we talk about few-shot learning, or zero-shot, or one-shot, is we're asking the model to perform a task that it may have never actually seen before, given some prompt or context into what that task is. Few-shot learning means that we provide the model with a description of the task and as many examples as we desire or would fit in the actual window for the model. For GPT-2, the max input length is 1,024 tokens. Zero or one-shot learning is a subset of few-shot where the number of examples that we give are either zero or one. Zero-shot learning is when we would give a model a task description, but no examples prior. And the prompt is what's used to tell the…