WEBVTT

00:00:00.000 --> 00:00:07.633
Here is why smaller language models are dumber and hallucinate more often than larger language models.

00:00:07.633 --> 00:00:23.267
If you're a software engineer and trying to demystify these AI models and understand how they work under the hood, then stop and follow my page, and if you learn something leave a comment below saying that you learned something.

00:00:23.267 --> 00:00:29.567
I'm a senior AI engineer and I've rejected job offers where I'd make over $475,000 per year.

00:00:29.567 --> 00:00:41.000
I also have a master's degree in software engineering from Carnegie Mellon, which is, according to U.S. News & World Report, literally the number one school in the entire world for software engineering.

00:00:41.000 --> 00:00:49.567
Not only that, but CMU is also the number one school in the entire world for artificial intelligence.

00:00:49.567 --> 00:00:56.033
I use AI so often that OpenAI literally gave me an award for it.

00:00:56.033 --> 00:01:02.100
It says for Austin Starks, honored for passing 10 billion tokens.

00:01:02.100 --> 00:01:09.767
To understand why smaller language models hallucinate more often than the larger language models, you have to understand how large language models are trained.

00:01:09.767 --> 00:01:12.333
And they are trained in two key phases.

00:01:12.333 --> 00:01:15.500
So number one is a process called generative pre-training.

00:01:15.500 --> 00:01:18.533
And this is the process you see all the time on TikTok.

00:01:18.533 --> 00:01:23.967
Essentially the language model tries to learn to predict the next word in a sentence.

00:01:23.967 --> 00:01:32.967
It's not 100% precise, but you can think of it trying to learn the next word in a sentence or the next letter in a word.

00:01:32.967 --> 00:01:34.533
You know, the next token.

00:01:34.533 --> 00:01:36.800
We're trying to learn to predict that, right?

00:01:36.800 --> 00:01:46.333
And we found that given a sufficient volume of data these models learn to speak like us very, very well.

00:01:46.333 --> 00:01:48.867
This is called generative pre-training.

00:01:48.867 --> 00:01:55.733
Now when you use a larger language model there are literally more weights and biases.

00:01:55.733 --> 00:02:05.067
And so because of this we can form more accurate mathematical representations from the inputs to the desired outputs.

00:02:05.067 --> 00:02:12.767
This will be more important later, but the second part of training a large language model is called fine-tuning.

00:02:12.767 --> 00:02:15.600
And there are different ways to fine-tune a language model.

00:02:15.600 --> 00:02:19.233
The most popular one is reinforcement learning with human feedback.

00:02:19.233 --> 00:02:31.933
You essentially get a human being and he says this response sounds better than this response and this response sounds better than this response, and then you train that into the weights and biases of your AI model.

00:02:31.933 --> 00:02:47.400
And so when you continue to train with a higher volume of data, when the model is much larger, it has more weights and biases to form the most accurate function from the inputs to the outputs.

00:02:47.400 --> 00:02:54.200
And when you have fewer weights and biases, then you have fewer accurate functions from the inputs to the outputs.

00:02:54.200 --> 00:03:01.033
All that to say is when you have a larger large language model, it is smarter.

00:03:01.033 --> 00:03:13.433
Same way when you have more data, when you fine-tune it on more data, it's also smarter, because again we're forming the most accurate functions from the inputs to the outputs.

00:03:13.433 --> 00:03:14.767
That's literally it.

00:03:14.767 --> 00:03:17.733
Now if you learned something, you made me a promise.

00:03:17.733 --> 00:03:22.200
Follow my page and leave a comment saying what you learned and what video I should make next.
