Transcript
A (0:00)
This episode is brought to you by State Farm. Listening to this podcast Smart Move Being financially savvy Smart Move Another smart move Having State Farm help you create a competitive price when you choose to bundle home and auto bundling. Just another way to save with a personal price plan. Like a good neighbor, State Farm is there. Prices are based on rating plans that vary by state. Coverage options are selected by the customer. Availability, amount of discounts and savings and eligibility vary by state.
B (0:30)
Running a business comes with a lot of what ifs, but luckily there's a simple answer to Shopify. It's the commerce platform behind millions of businesses including Thrive Cosmetics and Momofuku, and it'll help you with everything you need. From website design and marketing to boosting sales and expanding operations. Shopify can get the job done and make your dream a reality. Turn those what ifs into Sign up for your $1 per month trial@shopify.com specialoffer with savings over $390 this shopping season, VRBO helps you swap gift wrap time for quality time with those you love most. From snow on the roof to sand between your toes, we have all the vacation rental options covered. Go to VRBO now and book a last minute week long stay. Save over $390 this holiday season and book your next vacation rental home on VRBO. Average savings $396 select homes only.
C (1:31)
Good morning everyone. David Shapiro here. I wanted to make a video about fine tuning with GPT3. At present, my most popular video is about fine tuning GPT3 for a specific task. But I wrote a post on the OpenAI community about just some tips and observations that I had about fine tuning. Both from my own experiments but from helping other people. So for instance, I've been approached by lots of people, startups and students wanting to get help with fine tuning and you know, so hey, I can just help everyone. So let me give you five tips and misconceptions about fine tuning GPT3. My first tip is start with normal GPT3 and prompt engineering. Get good with GPT3 before you jump into fine tuning. GPT3 is not like any other tool you've ever used, NLP or otherwise. It's not like an svm, it's not like a regression model. It's not even like other neural networks. For instance, a lot of people jump in thinking, assuming that they need fine tuning when they haven't even used GPT3 before. And I say jump in, give it a test drive. It's way more powerful than you think it is. And so some people just, they have their, their old school data science mindset, like, oh, I need, I need, you know, data set. I need to, you know, come up with rules. And I'm like, just ask it. There was one case where a recent case where someone was trying to scrape dates from unstructured text and I'm like, just ask for the dates. You don't need to fine tune anything. Pardon me, I'm a little bit parched, so be drinking my tea while I talk. It's still too hot. Ow. Yeah, so jump into GPT3. Plain vanilla. GPT3 is way more powerful than you think it is. It knows a lot more. It's read, you know, many gigabytes or terabytes of text. I don't even know how much data it was trained on. I've seen different numbers. It depends on who you ask. So it's not like anything else. When you, when you fine tune GPT3, that's actually transfer learning, which means you're getting the benefit of most of the learning that it's already got. So it doesn't work the way that you think it does unless you've read the papers and played with it. Let's see. Oh, another thing this is one of, this is a really big misconception is prompt engineering means you have to be really good at language. And it's really interesting. My partner and I, my partner is getting her master's degree in information science. So she bridges the gap between humanities and computer science. So if you work with philosophers, with writers, with digital humanities folks, they get it really fast. Why? Because they understand language, they understand rhetoric, they understand using the written word to communicate ideas. However, you put GPT3 in front of a die hard math first computer science major, and they often can't see the language for the math. Another way of saying that is they see the algorithm first without seeing the implication of the language. And it's really interesting to see that some people put the language first and some people put the math first. So with GPT3, you don't have to worry about the math. So if you came up from, you know, hardcore, you know, computer science, algorithmic thinking, that honestly won't help you with using GPT3. And so some people ask me like, okay, well what, what, what, what? Sorry, stuttering. If you've watched some of my other videos, you know that I stutter sometimes. I don't even identify as a stutterer. It just happens sometimes everyone stutters. Anyways, sorry, but I lost my train of thought. Oh, yeah, team composition. If you want to have a dynamite team using large language models, make sure that you've got someone who understands language on your team. Maybe hire a librarian, an English major, a philosopher. I was working with one startup for a while where they were, they all had, they all had humanities training, they understood philosophy, they understood all sorts of other psychology. Psychologists get it really well too. And they all, they understood it. I showed them what GPT3 could do and they're like, this is amazing. And I see what you mean, like, this is capable of philosophical reasoning. And of course, you know, you show a philosopher that a machine is capable of philosophical reasoning and they're blown away. And you show a computer scientist and they're like, yeah, whatever. It's just this really weird dichotomy. So hire humanities. So that's, that's all, that's all within. Tip number one, start with GPT3, plain vanilla. Number two. Tip number two, building fine tuning data sets is 100 times more effort than prompt engineering. For that reason alone, start with plain vanilla GPT3. It'll carry you way farther than you think it will. If you, if you take GPT3 to its limits. If you say, okay, I've worked with this tool for months and I can't get it to do what I need it to do, then maybe it's time for fine tuning. But even then, maybe not. I'll get into that in a second. But yeah, like building fine tuning data sets, it's super, super hard. Let's see now. Okay, let's assume that you've done your homework. You've decided, yes, I do need fine tuning. My first tip is use natural language separators or demarcators to identify where the prompt begins and the completion prompt ends. And the completion begins. Sorry, in the OpenAI documentation, they just use like hashtag, hashtag, hashtag. And while that can work, it's semantically meaningless. So what I usually do is I will add like just a couple words, like if in my, in my question generating fine tuning data set, I have like, here's, you know, a block of text and then I say like ask questions and then with a, with a colon. And GPT3 really learns. Okay, that's where the task begins. And so just like, you know, one to one to five words giving instructions right at the end of the prompt, that helps teach GPT3 1 what its task actually is without having to infer what the task is, because then you can be very explicit about what its task is, but also that it's more semantically meaningful. And the reason that semantic meaning is important is because if you, if you fine tune a data set to do multiple tasks, it needs to differentiate between those tasks because like let's say, let's say you're trained, you're fine tuning chatbot, right? And you want to, you want to train this chatbot to ask questions or provide facts or, you know, answer questions. So ask or answer questions, provide facts or just whatever you need to be able to differentiate what you want your fine tuned model to do. And by, by using a natural language separator, that means that at inference time, when it's in production, you can actually switch tasks without having to switch between different fine tuned models. And that will save you a lot of time because let's say you make, you know, one fine tuned data set that's got 200 samples of asking questions and 200 samples of answering questions. Now you've got one fine tuned model to use and you're ready to go. You're off to the races. So natural language separators, that's a really big one. That's number three. Number four is use GPT3 itself to make synthetic data sets. I use this quite extensively. GPT3 is able to simulate any kind of conversation. And so you can, you can either, you know, scrape web data, which is legal. There was another, what was it, 9th District US Circuit Court just said, like yes, using scrapes web data is perfectly legal as long as it's publicly accessible. It's not hacking, it's not theft. If someone puts public data on the Internet, you're free to use it. So I scrape Reddit, public Reddit experience.
