liveBook · Manning

Zero-shot learning

As explained in Build a Large Language Model (From Scratch)

A learning setup where a model handles a task without having seen any task-specific examples beforehand.

Zero-shot learning lets a model generalize to a completely unseen task without prior task-specific examples. GPT-like language models perform this through text completion, using the input to specify the task without retraining, fine-tuning, or architectural changes. section 1.4

Figure 1.6 In addition to text completion, GPT-like LLMs can solve various tasks based on their inputs without needing retraining, fine-tuning, or task-specific model architecture changes. Sometimes it is helpful to provide examples of the target within the input, which is known as a few-shot setting. However, GPT-like LLMs are also capable of carrying out tasks without a specific example, which is called zero-shot setting.
figure

Contrasts zero-shot prompting with few-shot prompting: both express the target through input, but zero-shot prompting supplies no task-specific example. section 1.4

GPT-like models apply zero-shot learning to generative tasks such as:

How Build a Large Language Model (From Scratch) covers it

How deep it goes
Defines generalization to unseen tasks and contrasts few-shot prompting, but does not explain internal mechanisms.
Examples
Uses translation, summarization, fiction writing, and computer-code generation as examples of GPT capabilities.
What you can do after
Evaluate how GPT-like models can perform tasks from instructions alone, without retraining or task-specific examples.
How it connects
Connects zero-shot learning with GPT, text completion, transformer architecture, and few-shot learning.

Also explained in

Compare how 10 books explain zero-shot learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Large Language Model (From Scratch). The section links point to the parts of the book it draws on.