Yes, you can! Fine-tuning Open AI GPT 3

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi today i'm going to speak about how we can fine-tune gpt-3 on openai why am i saying this because on social media i see people sign up on openai and they say oh well i tried to to work but it didn't it didn't produce anything interesting hahaha look look what it did or it's biased or i don't know what to do with it great so what can we compare this to you go to a music store and you buy a 70 000 steinway piano okay but you don't know how to play the piano so you go home you have your piano and now you start playing well gee whiz it's not playing nice i'm not hearing what i hear on classical music records or jazz or pop that's strange what's going on the thing is you don't know how to play the piano some executives know how to play the piano although they don't know how to develop because they know how to express what they want very clearly they learned this at the university in college they they learn this so if you're a developer it means you can build the piano you know how to put the chords you know how to to to build the nice little keys but you don't that doesn't mean you don't have to play it it's not because you can write a program that you know how to use a program right you can write a program for surgeons doesn't make you a surgeon so what i'm saying here is you just can't go into gpt3 blindly unless you're a high-level linguist uh or you're very good at semantics or you're a high-level executive that is used to designing and thinking you have to learn okay so let me let me unpack this for you let's let me share my screen okay now i've shared my screen and let's see how this works you go to open ai wow cool i can now join the wait list and translate things into code or do things i just have to wait and then grade i'm in so you wait sometime then you go in and you get to the playground what are you going to do in your playground if you don't know how to play the piano which questions you're going to ask here are if you don't know anything about healthcare which questions you're going to ask if you don't know anything about supply chains what questions you're going to ask what are you going to do if you're you're a developer now if you're a healthcare expert you can come in and ask questions but do you know how to use the meta language that will produce the good answers you there's work to do okay it's just not oh i got it oh it's over and it's great no you have to learn a new skill prompt engineering you have to learn how to talk to the system how to show it things how to explain and and if you don't well then you'll get bad answers like what's the square root of a banana okay unknown of course it is but many people don't realize that they're asking that kind of questions so what does it take okay what does it take now it if the first thing you need to do is uh to go to chapter two of my book on transformers let me let me open that uh let me open this and get an and open it for you okay now in my book of course uh i have all the chapters you can get you can get on github so in my book transformers for nlp you don't need that jupiter notebook i just showed you they're all in organized in the github directories so what i'm saying here is what did i do i wanted to go into logic i wanted to see how the system could learn logic so i took a hugging phase model which is a very small model compared to gbt3 because gbt3 is trained with a suit a 10 billion 10 million dollar surprise super computer with millions of parameters and and teams in their lab so right here what i'm saying is hugging face can be a good educational tool and it can help you uh learn things and do little uh tasks okay so what i'm what i'm showing you now is i took the works of emmanuel kent this philosopher because i wanted my system to learn logic so i took all the works i could add more works but i'm just doing a test okay so right here i'm tokenizing i tokenized all of his works okay so now they're tokenized they're converted fine and now i have my model that i created i i created this can't i bert engine okay a model is the model they give you the engine is something you're going you can train it for okay so now it's tokenized you have this model everything's explained in chapter three of my book you can read it you have the code but you need to understand how to play the piano before playing the piano okay and here you have the parameters you have all these weights okay great okay that has to learn all those weights there not many here as i said you can't you can't do the same get the same power out of hugging face you're going to get from google bird or from gpt 3 but you can learn a lot and you can use it for a lot of little things so let's not underestimate it sorry about 40 million parameters compared to the billions i'm going to show you right after so i tokenized it i trained it i called it right it's trained everything and i go down to the logic and now i trained it to think like can't because i can think like can't that means it can do some logic in supply chains make decisions okay i can teach it how to be a supply and chain manager or i can teach it how to be an e-commerce strategist so i'm saying human thinking involves what does it involve well it involves reason experience okay so i found two interesting one reasons experience i've done some better tests okay but i just wanted to show you i i perfected this personally and i got a lot of good results but i wanted to show you bad results too reason and experience are pretty very good here you have some things are not interesting what do you have to do out of the pipeline you have a pipeline so when you get it an output you have to filter it you have to control it you have to say no i don't have enough information to give an answer or this is a good answer and take the bad ones out so it's not just oh let's get it running and then see what happens no no you have to control the input you can't let bias getting into your input you have to control each input okay and then you have to control every output okay so that's that's a different topic it's the pipeline i'll make other posts and videos on that so right here let's close this one down close can't down we're finished playing around with the playground okay we're in open ai and now we want to fine-tune gbt3 oh yes gbt3 can be fine-tuned it's not just oh i'm get i got my piano and now it's out of tune it doesn't play the way i want no you can fine tune your piano the way you want so if it's you're getting bad things or things that you don't like coming out of the the standard gpt3 engines you can fine-tune it the way you want to hear it the way you want to see it but you have to have understood what the architecture is in a book like mine you have to understand the programs you have to understand the meta language the prompts you're going to make so here i took i did the same thing okay i took uh the works of cant but i did a different job this time i parsed them so that i parsed them so that they would be broken down into prompts and completions like question answers so i wanted to see well what happens if i just teach it half of it and i ask it to learn the rest of it so for each sentence or paragraph i'm saying okay kent said that what can you learn what he would say after so i split it all up and i fed it into uh open ai so i have an open eye api key that i'm not showing you of course and i have the works of cant gpt3 i just put in a csv file with pram prompts and completions and i asked it to find i asked it to prepare the data because you have this fantastic uh tool in there that will prepare your data and what will it do it will create a again gpt prepared json file for you i'm using adda so what is ada you see oh that's not gpt-3 no it isn't sorry because gp3 is a model once you train it you get an engine and you can have several engines and openai has several engines but here you're going to have your own little engine that you're fine-tuning on top of atta okay i took ada because it goes fast and it's not too expensive when you use it okay there's a cost cost involved here for so right now once you have it while you run your engine you're going to it will give you the name of your engine and you can run it so i can say our thoughts pre-existent and i get our thoughts pre-existent okay ideas among two principles i don't find that that interesting but as i told you i'll filter it okay once i'm in my subject matter expertise domain i'll have i'll have rule bases i'll have other little api engines or apis to control this now here i'm asking did space and time exist before human thought so it so here's space for in this case space and time existed before human time and it appears so it's quite practical okay if the conditions themselves be taken for principles this is typical uh can't okay he will say that space and time existed before human thought think about it did space and time exist before we did how did space and time know it existed if if we weren't there okay and you have i won't go into this now but in modern uh in modern quantum theory you don't you don't always need time anymore so to do a lot of things so let's go on here new men's are newmans are either coexistent or event list whereas okay i would say this one is uninteresting so i would go back to space and time precede all other phenomena and belong in themselves without distinction without limitation so here you can see that space and time are key concepts now if you're thinking supply chains think of how amazon would work in a warehouse without space and time okay that'd be a problem to get your deliveries right okay then here what is a pre a priority that means what is there before we even start learning okay and here freedom and the concept of free will why because kent wrote a lot about freedom and peace and things like that so we can say that when we're born we'd all like to be free okay now this can be used in marketing or whatever what i'm showing you is you can fine-tune you can fine-tune gpt-3 so let me sum this up the takeaways you need to understand that you can't buy a piano without knowing how to play the piano okay you have to learn how to play the piano to learn how to play the piano there are enough books out here mine and others even at pact i'm now an expert advisor at pax for transformer books you'll find a lot of books so what i'm saying is you'll find books and you'll find books other publishers and videos but you have to learn the tricks of the trade but you also need to learn something about subject matter expertise what do you know about the company you want to help okay do you know really how to optimize things what do you know so you have to work on your subject matter expertise even if you talk to other people okay some people specialize in healthcare linguistics e-commerce we're in a cross-disciplinary world right and once you do that well then you can go to open ai and you'll know where to go what to look for and what to do now if you have questions you can ask them i'm on linkedin you can ask them here no problem and i'll be right making other videos and posts so have a nice day and see you soon
Info
Channel: Denis Rothman
Views: 1,208
Rating: undefined out of 5
Keywords: fine-tuning GPT-3, GPT-3, Open AI GPT-3, Open AI, fine tuning GPT-3, transformers for NLP, NLP, you can!, AI, artificial intelligence, fine tuning gpt-3, Fine-tuning, Fine-tuning Open AI GPT 3, Open AI GPT 3, openai, open ai gpt 3, fine-tuning argument, ai, machine learning, what is machine learning, you can! fine-tuning open ai gpt 3, fine-tuning open ai gpt 3, GPT 3, nlp, what is nlp, nlp training, closer to truth, machine learning tutorial, machine learning course, open ai
Id: QScG0yf05eE
Channel Id: undefined
Length: 14min 2sec (842 seconds)
Published: Wed Sep 15 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.