版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
从零开始构建大语言模型的关键要点 8 8 Althoughwe’reonlyafewyearsremovedfromLLMshavealreadygrownmassivmanyofthecriticaldetailsandkeydecisionwordofmouth.ThegoalofthiswhitepaperistodistillthebestpracselectionandmodeltrainThefirstquestionyoushouldaskyourselfiswhethertrainingorightforyourorganization.Assuch,youshouldpre-trainanLLMbyyourselforuseanexistingone.Therearetbasicapproaches:Option1:UsetheAPIofacommercialLLM.选项1:使用商业LLM的API。4Option2:Useanexistingopen-soOption3:Pre-trainanLLMbyyourselforwithconsultants.Thatsaid,therearealarethepros,cons,andappliOption1:UsetheAPIofacommercialLLMOption2:UseanexistingopeOption3:Pre-trainanLLMbyyourselforwithcostincursatinfere•Reducetime-to-marketofyourappsandprojectwithaworkingLLMmvastamountofinternetdataandbuildontopofitwithoutfuturedirectionofLLMservicepscratch,alsoleadingtolessdata,trainingbudgetneeded.mostcontrolofyourLLM`sperformanceandfuturedirection,givingyoulotsofontechniquesand/orcustomizetoyourdownstreambias,andtoxicityissues.Incomparison,thoseissuesarelesscontrollableinhorizontalusecasesortailoredtoyourvertical,ciallyifyoucreateapositivedata/feedbackl5volumeoffine-tuningoLLMtotal–cost–of-ownership(T•Manyindustries/useLLMservicesassensitivedple).•Ifbuildingexternalapps,you`llneedandde-riskyourbusinessifyou`rehighlyreliantonexter-nalLLMservicetechnolo•Notasdemandingasbucantissuesotheamountoftdownstreamapps,duetoam•Open-sourcedmodelstypicparedtocommercialmodelsbymonths/years.Ifyourcompetitorleveragescommercialmodels,theyhaveanadvantageonLLMtechandyou’llcross-domainknowledexpertise.Ifnotdonewelsituationwhereyou’vespentmillionsofdollarswithasuboptakes,especiallylateintotrainingstages,aneedlotsofhigh-quality/diversemodelstogaingeneralizedcapabilit6),•与商业模型相比,开源模型的性能通常会滞后数月/数年。如果您的竞争对手利用商业模型,他们在LLMleverageLLMtechniquestobuilddownstreamapps,oryoureasons(outsourcingtheLLMtech).•Goodifyouhaveverylimitedtrainingdchangethemodelarchitecture,itisalmostalwayseitherdirectlytakeanexistingpre-tne-tuneitortaketheweightsofanexistinLLMasastartingpointandcontinuepre-traihasalreadyseenavastamountofdataandthlearningespeciallyifyourtrainingdatasbefedtocommercialLLtrainingdatasetfromexistingpre-trainedLLMs.Forexample,ifyouwanttoofhiddendimensions,attentionheads,orlayers.training,andhavealargeinvestbasis.tarydataassociatedwithyourLL7deploymentofthemodelforlatencyorlocationalreasons.tinuousmodelimprovementloo下游应用程序,或者出于性能原因希望利用最佳LLM),ItisalsoworthmentioningthatifyouonlyhaveaverytargetedsetLLMs,youmightwanttoconsidertrainingorfine-tunlesscomplexity,lesstrai同样值得一提的是,如果您只有一组非常有针对性的需求,而不需要来自LLM的通用功能或生成功能,那么您可能需要考虑训练或微调一个小得多8standingscalingletsyoueffecmodelandthesizeofthedatayou’llusetotrainit.Somerelevanthistoryhere:OpenAIoriginallyintroduced"thanscalingdatasize.Thisheldforabouttwoyearsbeforealmostthepolaropposite:thatpreviousmodelsweresignificantandthatincreasingyourfoundationaltrainiperformance.他们认为,扩大模型规模比扩大数据规模更重要。在DeepMind提出几乎Thatchangedin2022.SpecificafoundthatcurrentLLMsareactuallysignificantlytheselargemodelsweren’ttrainedonnearlyenousizeoftheGophermodelabovebuttrainedon4.sizebutwithfarmoretraGopher模型大小的四分之一,但是训练的数据是其4.减小,但由于拥有更多的训练数据,ChinchDeepMindclaimsthatthemodelsizeandthenumberoftrainingtokens*shouldinsteadincreaseatroughlythesameratetoachieveoptimalperDeepMind声称,模型大小和训练分词(词元Token)*的数量应当大致以相同的速率增加,以达到最佳性能。如果你的计算能力增Totheleftoftheminimaondatawouldbeanimprovement.Totherightofthlarge,asmallermodeltrainedonmoredEstimatedoptimaltrainingFLOPsandtrainingtokensfor针对不同模型规模的最佳训练FLOP在每条抛物线顶点的左侧,模型太小了,一个更大的模型在较少的数改进。在每条抛物线顶点的右侧,模型太大了,一个Data/compute-optimal(Chinchilla)heatmap,Chinchilladata-optimalscalingl总之,目前选择LLM模型大小的最佳做法主要基于两条规则:1)依据您theboundaryofyourdatacollectionlimitation).2)Determinethedataandmodelbudgetandinferencelatencyrequirements.制范围内接近钦奇拉最佳模型大小)。2)根据训练计算预算和推理延迟要fort.ThefollowingexamplesofcurrentmodelsareagoodguideherPodsconnectedoverdatacentePaLM(540B,谷歌总共使用了6144个TPUv4据中心网络(DCN)连接的TPUv4Pods组成,采用了模lelismwithMegatron-LMtensorparallGPT-NeoX(20B,EleutherAI):9640GBA100GPUsintotal.Megatron-TuringNLG(530B,NVIDIA&MSFT):560DGXAclusternodehas8NVIDIA80-GBA100GPUs.):GPT-NeoX(20B,EleutherAI共96个40GBA10):TrainingLLMsischallengingfromaninfrastructureperspectiveforsons.Forstarters,itissimplynolongerpossibletofithememoryofeventhelargestGPU(e.g.NVIDIA80GB-A100),soyou’llneedsomeparallelarchitecturecomputeoperationscanresultinuconcurrentlyoptimizingyouralgorithms,software,andhardwarest即使是最大的GPU(如英伟达80GB-Memoryvs.ComputeEfficiencyToachievethefullpotentialofthousandsofdisdesignparallelismintoyourarTrainingaLLMrequiresterabytesofaggregatememoryformodelweights,gra-typicalmitigationstrabatchissplitintomicro-batchesthatareprocessedinsequencewinggradientsaccumulatedbeforeupdatingtrainingbatchsizecanscalewithoutincreasingthepeakresidentactivationmemory.训练LLM需要数TB的总内存来存储模型权重、梯度和优化器状态,这WhilelargeGPUclusterscanhavethousandsofhigh-throughputGPUs,achiev-虽然大型GPU集群可以拥有成千上万个高吞吐量GPU,但在这种规模下havenegativeeffectsoTechniquesforParallelizatParallelizationreferstospously.Thisallowsformoreefficientuseofcomputeresourcesationtimescomparedtoneededforthetrainingprocess.Thereareseveraldifferentstrausedtoparallelizetraining,includinggradientaccumulation,micro-batching,dataparallelization,tensorparallelizationandpipelineparallelization,andmeach:datasetsthatcannotfitintoasingle(partitions)anddistributesthemtovariousnodes.EachnodefirstworkswithitscombinetheirresultsatcertainintervalsinordertoobtaintheTheparameterupdatesfordaTheadvantageofthismethodisthatitincreasescomputeefficiencyandtrelativelyeasytoimplemepassyouhavetopassthewholegradienttoallotherGPUs.Italsoreplicamodelandoptimizeracrossallworkerswhichisrathermemoryineffic数据并行是处理深度学习工作流程中单台机器无法处理的大型数据集的最后向传递过程中,必须将整个梯度传递给所有其他GPU。此外,它还会在所有工作站中复制模型和优化器,内存效率calculationswhicharethenexecutedsimultaneouslyusingmultipleGThisallowsforfastertrainingtimesduetoitsasyitytoreducecommunicationoverheadbetweennodes.Thebenefitofthismeth-additionalcommunicationofactivationsineachforward&tion,andthereforerequireshighcommunicationbandwidthtobeeffiPipelineparallelismandmodelparallelismPipelineparallelismimprovesboththememoryandcomlearningtrainingbypartitioningthelayerprocessedinparallel.Thishelpswithoverallthroughputspeedssignificantlywhileaddingthescommunicationoverhead.Youcanthparallelism"(wheretensorparallelismcanbethoughtofas"intra-layerparallel-ism").Similartopipelineparallelonapartofthemodelratherthanapartofthedata.Thedownsideofpipelineandmodelparallelismisthatitcannotscpipelineparallelismisboundedbythedepthofthemodel.线并行看作“层间并行”(而张量并行可以看作“层内并行”)。与流水Asmentionedatthestartofthissection,it’snotuncommonforteamstoleveracombinationofparallelismtechniquesduringt(GoogleBrain,2022)andOPT(MetaAI,2022)bothusedacombinationoften-sormodelparallelismanddataparalNVIDIAapproachedthinposedaPTD-Ptechniquethatcombinespipeline,tensor,anddataparalleachievestate-of-the-artcomputationalperformance(52%ofpeakdevicethroughput)on1000sofGP正如本节开头提到的,团队在训练过程中综合利用并行技术的情况并不少见。例如,PaLM(GoogleBrain,2022)和OPT(MetaAI,2022)都结合使用了张英伟达在《利用Megatron-LM在GPU集群上进行高效大规模语言模型训练》一文中采用了略微不同的方法。他们提出了一种PTD-P技术,该技术Specifically,PTD-Pleveragesacombinationofpipelineparallelismacrossmul-具体来说,PTD-P综合利用了多GPU服务器之间的流水线并行、多ti-GPUservers,tensorparallelismwithinamulti-GPUservismtopracticallytrainmodelswithatrillionparameters.ThemploysgracefulscalinginanoptimizedclusterenlinksbetweenGPUsontheUsingthesetechniquestotrainLLMsrequiresnotGPUstobeefficient,butalsonecommunication––InfiniBandisoftenusedtomovedatabetweennod宽的网络来实现最佳的通信——InfiniBand通Butthisofcoursecomeswithacost.LeveragingthousandGPUsandhigh-bandwidthnetworkstotraiForexample,aback-of-the-envelopecalculationestsis).但这当然是有代价的。利用数以千计的高性能GPU和高带宽网络来训练heresoitrequiressystemexpertiseifyou’regoingtobesuccessful.tributed、Horovod等软件工具包以及Dee在实施的复杂性,因此要想取得成功,就需要系统方面的专业知GradientaccumulationforeperformingoneweightupdatesteponallaThisapproachreducescommunicationoverheadbetweenGthemtoworkindependentlyontheirownlocalbatch独立工作,直到它们在积累足够的梯度后,再次彼此AsynchronousstochasticgradientdescentoptimAsynchronousstochasticgradientdesceployedwhenperformingmodeloptimizationovermultipleGPUs.Thismethodusessmallsubsets(microbatches)ofdatafromeachnodeinsteadofloadingalldataatonce,whiallowingforfastconvergenceratesduetoitsasynchronous),•First,wefetchthemostup-to-dateparametersofthemodelnethecurrentmini-batchfromtheparameterserve•Wethencomputegradientsofthelosswithrespecttotheseparameter.•Finally,thesegradientsaresentdatesthemodelaccordMicro-batchingcombinessmallmini-batchesintolargerobatchescanbeprocessedinlesstimeandwithfewersynchronizationpointsbe-tweendevicesduringbackpropagationoperatwithverylargedatasetsormodelsthatrequiresignificantamountsofprocessingpower.最后,这些梯度被送回参数服务器,然后相应Nowthatwe’vegonethroughscaling,hardware,Baddataleadstobadmodels.Butcarefulprocessingofhigh-quahigh-volume,diversedatasetsdirectlycontributestomodelperformanceindownstreamtasksaswellasmodelcoDatasetdiversityiseprovesthecross-domainknowledgeofthemoabilityofyourLLMtoperformwellonmyriadnuancedtasks.Atypicaltrainingdatasetiscomprisedoftextualdatafromdiversesources,suchGitHub,Wikipedia,news,socialmedia版物或书籍库、GitHub的代码数据、维基百科、新闻、社交媒EleutherAIforlarge-scalesources,coarselybrokendownintofivebroadcategoriUSPTOBackgrounds,PhilPapers,NIHExporter.标局背景资料、PhilPapers、NIHExpProse:BookCorpus2,Bibliotik,ProjectGuteDialog:YouTubesubtitles,UbuntuIRCMiscellaneous:GitHub,theDeepMindMathematicsdataset,EnronemailNotethatThePiledatasetisfreeforthepublic.Formostlactica,theirtrainingandevalutraining,mostcompanieshavekeptthem散文:BookCorpus2,Bibliotik,古对话:YouTube字幕,UbuntuIRC,Op力,大多数公司都将它们保留在内部,以保持竞争优势。这这样的数据集和来自AllenAI的一些数据集对于公共的大规模NLP研究目的tremelyvaluableforpubliclarge-scaleNLPresearAnotherthingworthmentioningicanbecollectedbynon-expertsbutdataforspecificdomainsnormallyneedstobecollectedorconsultgiventheirknowledgeofhowaLLM"learnstorabilitiestoflaganydataodditiesorgaps鉴于NLP工程师了解LLM"学习如何表示数据",因此他们也应在这一阶Onceyou’veidentifiedthedataset(s)you’llbeusing,you’llwanttopreparethatdataforyourmodel.ing)andtheprosandconsofvarioustokenizationstrategies.Let’niquescanbeusedbeforethepre-trainingstepCertaindatacomponentscantribution.Someresearchdown-sampleslowwebcrawldata.Otherresearchup-samplesdataofaspecificsetofdomapendingonthemodelobjectives.trainedclassifiermodelappliedtothedataset.Forexample,themodelGalacticabyMetaAIisbuiltpurposefullyforscience,specificallystoring,combinreasoningaboutscientificknowledge.据进行过滤。例如,MetaAI的Galactica模型就是专门为科学Duetoitsgoals,thepre-trainingdatasetiscomposedofhigh-qualitydatamainlyfromscienceresourcessufacilitatecompositionofthisknowledgeintonewtaskcontexts.Normally,datacleaningandreformattingExamplesincluderemovingboilerplatetextandremovingHTMLcodeormarkup.Inaddition,forsomeprojecross-domainhomographs,and/orremovingbiased/harformedtoimprovemodelperformance.Forotherprojenotusedundertheideathatmodelsshouldseethefairrepresentationoftherealworldandlearntodealwithmisspellingsandtoxicityasapartofthemodelca-Non-standardtextualcomponentshandl模板文本和HTML代码或标记。此外,在某些项目中,还需要修正拼写错doneprogrammatically,ofcoSomeresearchersseesignificantbenefitsfromdeduplicatingtrainingdatusedhere.SeeDeduplicatingTrapertounderstanddetailsregardingdeduplication.Dataleakagehappenswhentheinformationyouaretryingtopredic(suchasn-grams)areneededtoremovetrainingdataalsopresentintheevalua-要使用下游任务数据移除方法(如n-grams)来移除评估数据集中的训练数Tokenizationistheprocessofencodingastringoftextintotransformer-readabletokenIDintegers.Moststate-of-the-artLLMsusesubword-basedtokenizerslikethestrengthsandweaknessesofvarioustechniquesbelow,withspecialattenttosubwordstrategiesasthey’recurrentlythemostpopularversustheircouparts.优缺点,并特别关注子词策略,因为它们是目前最流行的同类技Summaryofthemostusedtokenizationmethods,TwominutesNLP—ATaxSpacetokenization(splitsentenrule-basedtokenization(e.g.Moses,spaCy).Charactertokenization(simplytokenicharacter).Byte-PairEncoding(BPE)Piece;Unigram(tokenizingbypartstheentiretyofaword;seetableabove).outputlayer;largenumberofout-of-vocabulary(OOV)tokens;anddifferentmeaningsofveTransformermodelsnormallyhaveavocabularyoflessthan50,000words,especiallyifthLeadtomuchsmallervocabulary;nofromindividualcharactDownside:Generatesmodeltolearnmeaningfuever,ifcharacter-basedtokenizationisusedonnon-Englishlanguage,asinglecharactercouinformationrich(like“mountain”inMandarin).principlethatfrequentlyubedecomposedintomeaningfulsubwortokenizationandcharacter-basedtokenizatiachievesbothreasonablevocabularysizewithmeaningfullearnedcontext-indepentions.词汇量大大减少;由于每个单词都可以由单个字符缺点:产生的序列很长但意义不大的单个词元。这样,模型就很难学习到有意义的输入表征。但是,如果在非英语语言中使用基于字符的标记化技术,基于子词的词元化方法遵循的原则是,常用词不应拆分成更小的子词,但罕见词应分解成有意义优势:解决了基于单词的词元化和基于字符的词Inotherwords,thechoiceoftokenizationtechniquedependsonthespecifictaskandlanguagebeingWord-basedtokenizationissihandlecomplexlanguages.Character-basedtokenizationcanbeuboundaries.Subword-basedtokenization,includingBpiecetokenization,andunigramtokenization,isparticularlyusecomplexmorphologyandout-of-vocabularywords.Let’slookatthosesubword-换句话说,词元化技术的选择取决于具体任务和分基于子词的词元化,包括BPE、词块词元化、句子块词元化和单字块词元Byte-PairEncoding(Unigram法UnigramOneofthemostpopularsubwtionalgorithms.Theworksbystartingwithcharacters,whilemergingthosethatarethemostfrequenseentogether,thuscreatingnewtokenthenworksiterativelytobuildnewtokensoutofthemostfrequentpairsitseesinacorpbyusingmultiplesubwonethatmaximizesthelikelihoodofthetrainingdataonceaddedtlary(evaluateswhatitlosesbtwosymbolstoensurgraminitializesitsbasevocabularytoratewords,andthereforespaceinthesetofcharachancesofhaving"unk"(unknown)tokens.最流行的子词词元化算法之一。该算法字合并同时出现频率最高的字符,从而创建新的词元。然后,它将在语料库中出现频BPE能够通过使用多个子词词元来构建它从未见过的词,因此所需的词汇量较小,与BPE非常相似。不同之处在于,WordPiece不会选择频率最高的符号对,而是选择在添加到词汇表后能最大化训练数据相似度的符号对(评估合并两个符号所造成的损失,以确保Unigram将其基本词库初始化为大量符号,并逐步减少每个符号的数量以获得更小的词汇量。它通常与左侧3种词元化方法假定输入文本使用空格分隔单词,因此通常不适用于不使用空格分SentencePiece将输入视为原始输入流,因此在字符集中包/Unigram算法来构建适当的BPEisparticularlyusefulfthemostcommoncharactersequenWordPiececanbeparticularlyuforlanguageswherethemeanUnigramtokenizationisparticularlylymeaningfulunits.However,ungramtokenizationcanstrareandout-of-vocabularywordlarlyusefulforlanguappears.BPE可以根据最常见的字符序列为新词生成子词,因此在处理罕见词和词汇表以外缺点:BPE可能会产生与语言意义不符的对于单词的含义可能取决于其出现的Unigram单字元词元化尤其适用于语态复杂的语言,并能生成子词与语言意义单元相对应。然而在处理SentencePiece对于一些语言一个词的含义可能取决于它出ofthetransformermodels.Instead,Unigram并不直接用于任何转换器Note:thereisalsorecentworkproposingatoken-freemfromrawbytes.Thebenefitisthatthesemodelscanprocesstextinanylanguageoutofthebox,thattheyworkbetterwithcorporawithalargequantityofOOV(out-of-vocabulary)words/tokensandaremorerobusminimizetechnicaldebtbyremovingcomplexanderror-pronetextpreprocessingtion-basedmodels.Moreresearchinthisareaisneededtodeterminehowprom-Aftertokenization,weusuallydingandtruncation.Paddingaddingaspecialpaddtensorshape.Incontrast,truncationshortensthelengthofsequencesfortheonesthataretoolongforamodeltdirectlyrelatedtothetokenizertechnique.Duetothatsubword-basedtokenizer’swordsashumansdo.Insteacharacters.相关。由于基于子词的词元器的标记粒度介于单词和字符之间,因此LLM不会像人类那样看到字母和单词。相反,它看到的是"词元",即字符块,Trainingamulti-billionparameterLLMisusuallyahighlyexperimentalprocessmodelsize,makesureit’spromising,andsKeepinmindthatasyouscale,therewillbeissuesthatrequireaddrsimplywon’tbepresentwhentrainingonsmallerdata数据规模上进行训练时不会出现而需要解决的Let’slookatsomecommonpre-trainiToreduceriskoftraininginstabilities,practi为了降低训练不稳定的风险,实践者通常会从GPT-2和GPT-3等流行前steadoflearnedpositionalembeddings,tobalancep•Parallelattentioncombinedwithfeedforseries,primarilyforcomputingefficieusesdenselayerstoreduceimplement•Batchsizeforincreasedcom•Learningrateschedule.stepsinOPT-175B,orover375Mtokendownto10%ofthemaximumLRover300Btokens.Anumberofmid-flightchangestoLRwerealsoreExperimentsandHyperparametAswementionedabove,typicalpre-traininginvolveslotsofexperimentstofindtheoptimalsetupformodelperforman如上所述,典型的预训练包括大量实验,以找到模型性Experimentscaninvolveanyorallofthefollowing:weightinitialization,posi-实验可以涉及以下任何一项或全部内容:权重初始化、位置嵌入、优化器、tion,sequencelength,numberoflayers,numberofattentionheads,numberof量、密集层与稀疏层、批量大小和退出。parameters,densevs.sparselayers,batchsizAcombinationofmanualtrialanderrorofthosehyperparametercombinationsandautomatichyperparameteroptimizationhyperparameterstoperformautomaticsearchon:learniHyperparametersearchisanexpensiveprocessandisoftentooatfullscaleformulti-billionparametsmallerscalesandbyinterpolatingparametersbasedworkinsteadoffromscratch.Inaddition,therearesomehyperparametersthatneedtobe•Learningrate:canincreaselinearlyduringtheearlystages,becauseyou’llbedealingwithsmalleramountsofdata,lettingyouperformmoreexperimentsearlyversuswhenthey’llbefarmorecostlydowntheline.Beforewecontinue,it’sworthbeingclearaboutarealityhereintoissueswhentrainingLLMs.Afterall:thesearebigprosufficientlylargeandcomplicated,thingsHardwareFailureDuringthecourseoftraining,asignificancurinyourcomputeclusters,whichwillrequiremanualorautomaticrestmanualrestarts,atraiconductedtodetectproblematicnodoffbeforeyouresumetrainingfromthelastsavedcheckpoint.然后,在从上次保存的检查点恢复训练之前,应封锁标记Trainingstabilityisalsoafundamentalchallenge.Whilmaynoticethathyperparameterlearningrateandrestartingfromanearliercheckpointmightallowthejocoverandcontinuetraining.习率并从较早的检查点重新开始可能会使作业恢复并继sometimeslateintoTherehasn’tbeenalotofsystematicanalysisofprincipledstspikes.Herearesomebestpracticeswehaveseenfromuseisthebestpolicyherspeedupconvergenceandimprovemodelperforman•LearningRateScheduling:Ahighlearningratecovertime,youcangraduallydecreasethemthelearningrateisdecreasedbyafiandexponentialdecay,wherethelearningratestep.NotethatitisnotreallypossibletoknowaheadoftimewhatLRtouse,butdetailshere.•WeightInitialization:ProperlyinitialiconvergefasterandimproTechniquesthatcanbeustion,layer-wiseinitialization,andinitializationusingpre-trainedweigh•Modeltrainingstartingpperformance.•Regularization:Regularizationtechniques,suchasL1/L2regularization,canhelpthemodelconvergebetterbyreducingoverfittingandimprovinggeneralizat•DataAugmentation:Augmentingthetrainingdatabyapplyingtransfor-mationscanhelpthemodelgeneralizebetterandreduceoverfittin•Hot-swappingduringtraining:Hot-swappingofoptimizersoractivationduringtheprocess.Itsometimesrequiresateamonitalmostheuristicstotrainfurther.seenduringthespike(theintuitionisthatspecificdatabatcheswithaparticularmodelparameterstate).Note:mostoftheabovemodelconvergencebestpracticesnotoarchitecturesandusecases.becauseyouhavethetrainingstatepreserved.partsofthemodeloutmightimpactperformance.Ablationstudiescanallowyoutomassivelyreducethesizeofyourmodel,whilestillretainiTypically,pre-trainedmodetoassesstheirabilitytoperformlogicalreasoninference,questionanswering,andmore.Machinelearningpractitionerscoalescedaroundavarietyofstabenchmarks.Afewpopularexam•ClozeandCompletiontasks:LAMBADA,HellaSwag•CommonSenseReasoning•NaturalLanguageInfere•Reasoningtasks:Arithmeticreasoning•Codetasks:HumanEval,MBPP(text-to-code);TransCode•Translationtasks:Tran执行逻辑推理、翻译、自然语言推理、问题解答等的机器学习从业者围绕各种标准评估基准展开讨论。一些流行的例子包•开放域问题解答任务:琐事问答、自•BIG-bench:Acollabo•BIG-bench:一个旨在为大型语言模型提供挑战性任务的协作基准,包括•LMEvaluationHarness:AlibraryforstandardizedevaluationofautoregressiveLLMsacross200+tasksreleasedbyEleutherAI.Ithasgainedpopularitybecauseofitssystematicframeworkapproachandrobustness.Hereisasummaryoftypicallanguagetasks(NLUtasksinblueNLGtasksinteal):典型语言任务的总结(蓝色的NLU任务;蓝绿色referstothenumberofsupervisedsamples(demonstmodelrightbeforeaskingittoperformagiventasvidedviaatechniquecalledpromptfollowingthreecategories:求模型执行给定任务之前向其提供的监督样本(演示)数量。N次样本通•Zero-shot:referstoevaluationonanysamplestothemodelatin•One-shot:similartofew-shotbutwithn=1,evaluationwhereonesusampleisprovidedtothemodelatinferencetim•Few-shot:referstoevaluatithemodelatinferencetime(e.g.5sampleEvaluationtypicallyinvolvesbothlookingatbenchmarkingmetricsoftheabovetasksandmoremanualethemodelperformancefromdifferentNLPengineers:peoplewithimprovement.Afailureclassexamplewouldbe“theLLMdoesnothaarithmeticwitheitherintegers(1,2,3,etc.)northeirspelled-outformsthree.”askedtoprobespecificclassesofLLMoutput,fixingerrorswherenecessary,and“talkingaloud”whiledoingso.Tstep-by-stepfashionthereasoningandlogicbehindtheircorrectanswerverstheincorrectmachine-producedanswer.NLP工程师:具有NLP、计算语言学、提示工程等背景一步一步的方式解释他们的正确答案和机器产生的错误答案背后的推理和Therearepotentialrisksassociatedwithmodelstrainedonwebtext.Whbiases.Inadditiontoperpetuatingorexacerbatin
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 金属纽扣饰扣制作工成果强化考核试卷含答案
- 甲基叔丁基醚丁烯-1装置操作工离岗水平考核试卷含答案
- 穿经工岗位标准化考核试卷含答案
- 壁画制作工工艺优化测试考核试卷含答案
- 2026年军训总结:团结协作的力量
- 2026年秋季高二班主任学业分化精准育人课件
- 2025年邯郸市大名县三年级数学第二学期期中考试模拟试题含解析
- 2026事业单位工勤技能-云南-云南防疫员四级(中级工)历年参考题库含答案详解
- 2025年辽阳市弓长岭区数学三下期中达标检测模拟试题含解析
- 液氨安全专项试题及完整答案
- 2026秋三年级数学脱式计算500道专项练习(分层训练+完整解析)
- 全称量词与存在量词的否定课件-高一上学期数学人教A版
- 登楼杜甫课件教学课件
- 西方文化概论(第二版)课件全套 曹顺庆 第0-6章 绪论 西方文化的渊源与流变、西方文学 -西方社会生活与习俗
- 护工照顾老人合同(2篇)
- 早发性卵巢功能不全的临床诊疗-
- 百度人才特质在线测评题
- 品质提升计划-人机料法环
- 钢结构平台施工组织设计
- (正式版)SHT 3046-2024 石油化工立式圆筒形钢制焊接储罐设计规范
- GA/T 2015-2023芬太尼类药物专用智能柜通用技术规范
评论
0/150
提交评论