All right.
So next, I want to talk about the GPT family of models, which is what this course is mostly about.
OpenAI has other models, things like Dall-e and Whisper, both of which we cover in this course.
Dall-e generates images, whisper takes audio files and translates slash transcribes them as text.
We cover those later on, but most of this course is about GPT, specifically GPT four, so we do use
some GPT three in this course.
I should stop just to say that GPT stands for Generative Pre-trained Transformer.
We will talk about the transformer part in the next video.
It will be completely optional.
I'll do a very high level dive into Transformers and the architecture behind the GPT family of models.
It has no bearing on the technical stuff in this course.
It's just there as information if you care.
So completely optional following this video.
Anyway, we have GPT three, we have GPT 3.5, which is not a whole new model.
It's just a finely tuned version of GPT three.
And as of a couple of weeks ago, we now have GPT four, which is a whole new, completely different
model in the GPT family.
So again, they stand for or it stands for generative Pre-trained Transformer.
There's also just GPT and GPT two, but we have pretty much no reason to use those today.
And just a heads up, this course makes use of all three of these 33.5 and four.
I know the terminology gets confusing.
I use GPT four as much as possible, but there are certain API endpoints that don't support it currently.
Also, it is way, way more expensive.
It's like 20 times more expensive to use GPT four compared to 3.5 and we can often get exactly the same
result using 3.5.
Not to mention it can be faster.
So just because GPT four is the new fancy thing, that doesn't mean it's always the best choice.
And that's a conversation we'll have later.
So all of these GPT X models are large language models.
Basically, they take text as an input and they generate text as an output.
We give it some sort of initial prompt and the models will continue that prompt.
So in its simplest form, a prompt could be something like why did the chicken cross the And then we
ask the model just by giving it this piece of text, it will try to complete with the next most probable
choice, the next best word that it thinks fits that prompt.
So why did the chicken cross the and then road could be the next answer.
The next word we get is the output.
We can do things like my favorite food is colon and then it will fill it in with what it thinks is the
most probable next word.
We can do way more complicated things, right?
Translate this from French or from English to French.
We give it snails and it responds with escargot.
These are all just simple examples, right?
A tag line for a doggy daycare.
That could be the text input.
And it might.
This is actually real.
All of these examples here are real.
It responded to me with cozy, safe and fun for your furry friend.
We can also do things like write two sentences explaining acid rain to a toddler.
Acid rain is rain that has acids in it, which makes it a little bit yucky.
The last thing I'll talk about is some of the training data that GPT three was trained on.
I wish I could tell you about the data GPT four was trained on, but OpenAI has not released that yet.
So all we have is the data.
GPT three was trained on, which was a huge, huge amount of text data.
Over 45TB of text.
And it includes a subset of what's called the common Crawl dataset.
Common Crawl is an organization that crawls across the web and archives and creates a massive dataset
of basically as many pages on the web as it possibly can that you can use to train models or perform
analysis on.
Also databases of online books, all of the English language Wikipedia.
Lots of data.
And this is just for GPT three So it's speculated that the dataset for four is significantly larger,
but there's no evidence of that or there's no official confirmation from OpenAI.
Same thing here.
When we talk about the technical details of GPT three, we don't have those details for GPT four just
yet.
But GPT three is a huge step up in size compared to GPT two.
Again, we can assume the same is true for GPT four.
It costs almost $5 million just in GPU costs simply to train GPT three and the model itself is over
800GB of essentially just numeric data in a file or multiple files Just to store the model.
It's 800GB, so it's huge.
So there's a lot that we can do with GPT, but at the end of the day, we provide text and we get text
as output.
Typically we provide some detailed instructions, some sort of prompt, and there's a lot that goes
into engineering, a prompt which we have a whole section dedicated to coming up pretty soon in the
course.
So the next thing you need to know is that there are two main ways that we can interact with these GPT
models using OpenAI APIs.
There is the completion API, which expects a single text prompt basically like what you see right here
and it responds to us with output.
And this has been the standard way to interact with any of the GPT models since OpenAI first created
any commercial APIs.
This was the only option we had up until basically last month.
So the completion endpoints do not support GPT four.
They do support GPT three and some of the 3.5 models.
We'll talk about that.
Then there is a whole separate way of interacting with these models, which is the chat API.
The chat API has a slightly different format.
This is what we spend a lot of time on in the course because it's the only currently the only API endpoint
that supports GPT four at all.
And the way we interact with it is using a list of messages in a chat based format.
So it's slightly different, but behind the scenes it's still just a GPT model that we're talking to
that we're interacting with.
It's just two different ways that we go about it.
So in this course, we'll start with the completion endpoint.
It's simpler and then we'll move on to the chat endpoints, which is what we spend most of the course
on.
So just keep that in mind.
Two different ways to talk to these generative pre-trained transformer models.
There's distinctions both in terms of how we go about interacting with them, but also which models
specifically they support.
And right now GPT four is only supported with this chat syntax, which we'll cover soon.