课程: Introduction to Large Language Models
What are large language models?
- [Instructor] Recently, GPT-4 and ChatGPT have become popular buzzwords. They're both large language models and are basically a type of AI that can understand and produce human-like text. They can be used to do things like answer questions or generate content, summarize text, explain things, and generate dialogue. And we see large language models used in everyday tools like chatbots and virtual assistants and language translators. But things kicked off in natural language processing long before we had GPT and ChatGPT. In 2017, a type of AI model architecture called Transformers was proposed by a team of researchers at Google in a paper called "Attention is All You Need." All large language models use components of transformers as part of their architecture. So how do large language models work? Well, we can interact with them with plain English text, often called a prompt, and the large language model will respond with text known as the completion or the output. Now, sometimes you won't get the output you expect so you can change the prompt and you might get another and hopefully better answer. Now, let me illustrate, working with a large language model, with a simple example. You're trying to figure out which book to read your six year old son. So this is the children's book, "The Adventures of Pinocchio." Now, you don't know whether he'd like it so you take the first three chapters, because you don't want to spoil the whole story, and ask a language model to summarize it. And then based on this summary, he can decide if this book sounds interesting. So let me go ahead and grab the first three chapters. I'm going to copy that, and let's head over to a large language model and let's ask the large language model to summarize the first three chapters. So I'm now in Open AI's Playground. Open AI are a large language model provider and I'm going to use one of their best known language models called GPT-4 to summarize these first three chapters. So, I've provided as input, "Summarize the following text in five sentences" and I'm going to paste the first three chapters. I'm going to head over to Submit, and let's see the response back from the large language model. The large language model, GPT-4, does a terrific job of summarizing the first three chapters. It starts off with "Carpenter Mastro Cherry finds a piece of wood that reacts when he prepares to carve it into a table leg, emitting a voice that seems to besiege him not to hit so hard. He eventually dismisses this, attributing it to his imagination playing tricks on him. Later, Geppetto, a friend of Mastro Cherry arrives..." and so on. And you can see that that's starting to look like a really good summary of the first three chapters. All right, so we've looked at what large language models are and that you can interact with them by providing a prompt as input, and that they're trained on large amounts of data which is why they return intelligent sounding text. Now go ahead and try out GBT-4 in the Open AI Playground and ask it some questions. So ask it to explain something and see how good it is.