Machine Learning Times
Machine Learning Times
EXCLUSIVE HIGHLIGHTS
How Generative AI Helps Predictive AI
 Originally published in Forbes, August 21, 2024 This is the...
4 Ways Machine Learning Can Perpetuate Injustice and What to Do About It
 Originally published in Built In, July 12, 2024 When ML...
The Great AI Myth: These 3 Misconceptions Fuel It
 Originally published in Forbes, July 29, 2024 The hottest thing...
Where FICO Gets Its Data for Screening Two-Thirds of All Card Transactions
 Originally published in The European Business Review, March 21,...
SHARE THIS:

1 year ago
Can LLMs Learn From a Single Example?

 
Originally published in Fast.AI, Sept 4, 2023.

We’ve noticed an unusual training pattern in fine-tuning LLMs. At first we thought it’s a bug, but now we think it shows LLMs can learn effectively from a single example.

How neural networks learn

We train neural network classifiers by showing them examples of inputs and outputs, and they learn to predict outputs based on inputs. For example, we show examples of pictures of dogs and cats, along with the breed of each, and they learn to guess the breed from the image. To be more precise, for a list of possible breeds, they output their guess as to the probability of each breed. If it’s unsure, it will guess a roughly equal probability of each possible breed, and if it’s highly confident, it will guess a nearly 1.0 probability of its predicted breed.

The training process consists of every image in a training set being shown to the network, along with the correct label. A pass through all the input data is called an “epoch”. We have to provide many examples of the training data for the model to learn effectively.

During training the neural network attempts to reduce the loss, which is (roughly speaking) a measure of how often the model is wrong, with highly confident wrong predictions penalised the most, and vise versa. We calculate the loss after each batch for the training set, and from time to time (often at the end of each epoch) we also calculated the loss for a bunch of inputs the model does not get to learn from – this is the “validation set”. Here’s what that looks like in practice when we train for 11 epochs.

To continue reading this article, click here.

7 thoughts on “Can LLMs Learn From a Single Example?

  1. I am grateful for your contributions. I’ve read a lot of material that is connected to this topic! In contrast to numerous other articles, I was left with a really clear impression after reading yours. I really hope that you will continue to write postings that are equally as enlightening as this one and others for us and everyone else to read! trap the cat

     
  2. Your donations are much appreciated. This is an issue about which I’ve read a great deal. Your piece, in contrast to many others, had a really strong effect on me. I sincerely hope that you will keep writing informative posts like this one and more for the benefit of all readers. connections game

     
  3. Try the new zorse game, an exciting word game inspired by the New York Times. In this game, you start with a clue and see a series of blank tiles. As you reveal letters, they spell out a phrase related to the hint.

     

Leave a Reply