ChatGPT:TechnologyBehindandApplicationsJunlingHuFebruary19,2023WhatisChatGPT?•It’sadeepneuralnetwork•Thesystemistrainedwithtextdata•Nohuman-designedrulesQuestionResponseThecomponentsofaneuronnetworkHiddenlayersInputlayersOutputlayersWeights0.010.056110.10.60.30.0Thearchitectureoftransformer•Feedforward•Encoder&decoderlayers•Encoder:Encodetheinput•Decoder:AttendandgenerateoutputEncoderanddecoderlayersOnlydecoderGPT(GenerativePre-Training)•Usesonlydecoders•100millionparameters(weights)GPT(GenerativePre-Training)Representingwords•Usetheindexofadictionary:Aninteger1,2,…,1000,…,30,000•Useavectorof1vs0’s[00…010…00]•Useasmallvectorofnon-zeronumbersFight=[0.11,0.43,0.52,….,0.02,0.01]Love=[0.01,0.03,0.02,….,0.22,0.41]andKill==[0.11,0.43,0.52,….,0.01,0.00]Vectorsize=256or512i.e.“Wordembedding”Vectorsize=dictionarysizePositionembeddingThebrownfoxjumpsoverthefence.[0.01,0.32,0.02,….,0.04,0.00]Positionvector=thesizeofWordembedding01234567[0.02,0.04,0.12,….,0.03,0.01]GPT(GenerativePre-Training)GPT296xGPT3TrainingdataofGPTs•GPT:Books(7,000)•GPT2:WebText(80milliondocuments,40GBtext)•GPT3:WebText2(19Btokens),Books(67Btokens),CommonCrawl(410Btokens),Wikipeida(3Btokens)ThedevelopmentofChatGPT(2017-2022)201720182019202020212022TransformerGPT-2GPT-3GPTInstructGPTCodexRLHFChatGPTPPOReinforcementlearningframeworkTimeState0State1State2StateTAction0Action1ActionTEnvironmentReward0Reward1RewardTPolicyNetwork•PPO(ProximalPolicyOptimization)•Proposedin2017(OpenAI)•Ensuringthatanupdateofthepolicydoesnotchangeittoomuch•“Trustedregion”update•ClippedrewardInstructGPT•TrainingGPTwithHumanFeedback•Userreinforcementlearning•PolicynetworkPerformanceofInstructGPT7ChatGPT•Addedhuman-writtendialoguestointructGPT•UserinterfaceChatGPTApplications•Existingcapabilities•EmergingEmailassistant•Writeemail,aChromeextensionSummarizeawebsite(forpublishers)TexttoFigma:NLPinterfaceforsoftwareHealthcaredocumentprocessingCoachingforteachersGeneratenewproteins/drugs•Generatefunctionalproteinsequence•CreatenewdrugsOtherapplications•Connecttoothermedia•YouTubevideosummary•Video(audio)meetingsummary•CombineimagewithGPTChildren’sbookgeneration•Teacher’said:•Generatehomework(multichoice)•Fill-inblank•CurriculumMoreapplications•DocumentQ&A•Bookanswers•Corporatedocument•Talktoyourinnerchildbyusingdiarytotrain•Personaltrainerandnutritionist•Programmer’stools•ChatbotforWhatsApp,discord,App,Tiktok,•Coding•ChatwithVoice•AutomateRPAOpenAIcompetitorCustomersupport•Cohere.ai,Foundedbyex-GooglersEmotionCoach•1in5AmericanshavementalillnessConversationalandEmpathychatGPTPurchaseadvisorContact•Lookingforinvestors:Seedround•Lookingfordatascientists/Engineers/internsjunling@coach.ai