版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
ChipNeMo-DomainAdapted
LLMsforChipDesign
劉鳴杰MingjieLiu
SlidescontentsfromHaoxingRenandMiguelMartinez
Outline
LLMIntroduction
HowcanLLMhelpchipdesignprocess
Domain-adaptionLLMtechniquesforchipdesign
LLMApplicationsToday
NaturalLanguageTasks
Generation:writeemails
Open/ClosedQA:answerquestionswith/withoutcontext
Brainstorming:generateideasChat
Rewrite:languagetranslationSummarization
Classification:sentimentanalysisReasoning:math/logic
Applications
ChatBot,APIs
CodingTasks
Understand/explaincode,errormessagesDocument,commentcode
Generatecodesnippetsfromspecs
TranslatecodetoadifferentlanguageEdit,debugcode
ToolUse/Agents
Applications
CoPilot
PromptEngineering
Zeroshot
Prompt:
Classifythetextintoneutral,negativeorpositive.
Text:Ithinkthevacationisokay.
Sentiment:
Response:
Neutral
Fewshot
Prompt:
Thisisawesome!//NegativeThisisbad!//Positive
Wowthatmoviewasrad!//PositiveWhatahorribleshow!//
Response:
Negative
mptingguide.ai/
ChainofThoughts(CoT)
Prompt:
Iwenttothemarketandbought10apples.Igave2applestotheneighborand2applestotherepairman.Ithenwentandbought5
moreapplesandate1.HowmanyapplesdidIremainwith?
Let'sthinkstepbystepandcalculateeachstep.
Response:
Youhave10apples.
Yougive2applestotheneighborand2to
therepairman.
Youhave6applesremaining.Youbuy5moreapples.
Youhave11apples.Youeat1apple.
Youhave10applesremaining.
RetrievalAugmentedGeneration
AddContexttoGroundLLMonUnseenFacts
5
4
LLM
Response
“TellmeaboutSM”
1
4
VectorDBsupportingsimilaritysearch
RetrievalModel
Embedding
Chunk
xxxx
AGPUcontainstwoormore
StreamingMultiprocessors(SM)dependingupon…
2
EmbeddingVector
3
HowcanLLMHelpChipDesignProcess?
Know-howAssistance+CodingAssistance
Know-howAssistanceGeneratinginsights,knowledge,ideas
Designknow-howQ&A:questionsaboutdesigns,infrastructures,tools,flows,HWdomains,etc.
AnalysisandReport:summarization,checkrule
violations,writetestplans,visualizationofdesignandrelateddata,etc.
Triageadesignproblem:debugaregressionproblem,howtofixabug,etc.
CodingAssistanceGeneratingcode(software,RTL,testbenches,EDAscripts,toolsscripts,andconfigs)
Generatecodeforauxiliarydesigntaskssuchasassertions,comments,etc.
Generatelower-levelprogramsfromhigher-leveldescriptions
Generatescriptsforspecifictasks(VLSI,Verification)Transformcodeformoreefficientimplementation
HWTeamLLMApplicationSurvey
(~100proposals)
CodeGenuQ&A
aTriage
Analysis&Report
15%
46%
17%
21%
UseCasesEvaluated
EngineeringAssistant
Chatbot
Designknow-howQ&A
EDAScriptsGenerationBugSummaryandAnalysis
CodeGenAnalysisandReport
UseGeneral-PurposeLLMsforChipDesign
Challengesofgeneral-purposeLLMsforChipDesign
Lackofspecificcodinglanguage/toolsknowledgeLackofdesignknowledge
Lackofdesigntasks-specificskillsReference/Accuracyrequirement
Solutions
PromptEngineering
RetrievalAugmentedGeneration(RAG)
Additionalchallenges
RetrievalaccuracyContextlimitationComplexquestionsCodingquestions
Canwedobetter?
TypicalLLMTrainingFlow
Humanfeedback
RLHF
Trainascalarscorefor(prompt,response)
LowqualitydataHighqualitydata
Comparisondata
Prompt
maximizescorefromrewardmodel
Text
e.g.Internetdata
Demonstrationdata
PredictnexttokenGivenprompt
Classification
ReinforcementLearning
predictresponse
Pretraining
Supervisedfinetuning
Rewardmodel
Finalmodel
FoundationLLM
SFTmodel
Scale>1trilliontokens10K-1Mexamples100k-1Mcomparisons10k-100kprompts
Basedon
/2023/05/02/rlhf.html
andNeurIPStutorial(AndrewNg)
ChipNeMo:Domain-AdaptionofLLMforChipDesign
GPUHours(A100)
1000000
100000
10000
1000
100
10
10000000
1
7B13B70B
PretrainingDAPTSFT
/abs/2311.00176
DomainAdaptationTechniques
TraincustomizedLLMfordomain
Customtokenizationimproveinferenceefficiency
Trainingdatarebalanceimprovetrainingdataquality
Domain-adaptedpretraininglearncoding/tools/designknowledge
General/Domain-specificinstructionalignmentlearntofollowgeneralanddomain-specificinstructions
Domain-adaptedretrievalaugmentedgeneration(RAG)improveretrievalaccuracy
Tokenization
Customizedtokenizerhelpstokenizationefficiencyandperformance
TrainingDataRebalance
Collected24Bdatatokensfrominternaldocumentsandcode,including2BtokensofGitHubandwikidata
AdjusttrainingweightstobalancecodeandtexttokensRemovemostlymachine-generatedcode
text
text
code
code
CollectedDataTokens(24B)TrainingTokens(24B)
AutoEvalForChipNeMoFoundationModels
Multiplechoicequestions(humangenerated)toevaluatemodelperformance
DesignKnowledge(94)
WhatdoesCGAstandfor?
A:CooperativeGridArray
B:Co-dependentGridArrayC:CUDAGridArray
D:CooperativeGPUArray
MMLU(14.6K)
LetGdenotedthesetofallnxnnon-
singularmatriceswithrationalnumbersasentries.ThenundermultiplicationGisa/an?
A:subgroup
B:finiteabeliangroup
C:infinite,nonabeliangroupD:infinite,abelian
EDAScripts(74)
HowdoIgettheobjectoftheABCnetinVIVID?
A:get_net("ABC")B:get_nets("ABC")C:get_cell("ABC")D:get_pins("ABC")
BugAnalysis(70)
WhatisthebugmodulethatdealswithMATHSarchitecture?
A:DFX-MATHS-ArchitectureB:DFX-MATHS-Access
C:DFX-Architecture-MATHSD:DFTMATHSLink
OpenDomainCircuitDesign
(227)
WhichVerilogsystemtaskemitsa
formattedstringwithacarriagereturn?A:"$display"
B:"$write"C:"$probe"D:"$finish“
WhatisaG-elementinHSPICE?
A:voltage-controlledcurrentsourceB:voltage-controlledvoltagesourceC:current-controlledvoltagesourceD:current-controlledcurrentsource
Domain-AdaptivePretraining
FoundationModelPerformanceComparison
Performanceimproveswithbasemodelsize
ChipNeModomain-adaptivepre-trainingprovidessignificantperformanceimprovementsoverthebasemodel
BestChipNeMomodelhasbetterperformancethanGPT-3.5*onallbenchmarksandGPT-4ondesignknow-howandBugsbenchmarks
LLaMA2-7BLLaMA2-13BLLaMA2-70BGPT-3.5
ChipNeMo-7BChipNeMo-13BChipNeMo-70BGPT-4
100
80
70
60
50
40
90
30
DesignScriptingBugsCircuitsMMLU
RetrievalAugmentedGeneration
Customretrievalmodelimprovesretrievalaccuracy
Additionalcontext-Retrieval-Augmented-Generation(RAG)orOracle-helpsalot
RAGresultssignificantlydependonretrievalaccuracy
Fine-tunedretrievalmodelwithdomaindata
improvesretrievalmodelaccuracySamplepassagesfromthedocstore
Generatequeriesfromselectedpassages
Generatepositive/negativeresponsesforeachquery
Fine-tuneretrievalmodelwith3Kquery/responsepairs
ImproveretrievalaccuracyoverE5andbetterthanSOTAsentencetransformer
Integratedsearchengineforbetterretrieval
10.90.80.70.60.50.40.30.20.10
E5SentenceTransformerDomain-AdaptedE5
SpecsTestbenchBuildTOTAL
RetrievalModelAccuracy
BetterAlignmentTechnique
AttributeConditionedSFT(SteerLM)
IssuewithSFT
Responsesareterse
TrainingexamplesarenotexactlycleanToxicity
SteerLM:RLHFreplacement
SFTwithscoresonhelpfulness,verbosity,etc.foreachexample’spromptcontext
Prompt,Helpfulness:4,Correctness:4,Verbosity:2,…Response
TrainedeasierthanRLHF
ChipNeMo-70B-SteerLMmodeloutperformsGPT-4by20%,evenwithRAG
Humanevaluation(1-7)88designquestionswithRAG
SteerLM:AttributeConditionedSFTasan(User-Steerable)AlternativetoRLHF,Arxiv2023
EDAScriptGeneration
IntegratedwithVLSItoolsandeditor
Caneditandexecutegeneratedcodeonrealdesigns
SFTdatacollectionwithmodel-generatedcomments
RetrieverelevantAPIsascontextfromadatabase
ChipNeMomodelsperformmuchbetteronsimpleproblems
Basemodelperformanceimportancefor
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025租房協(xié)議書(shū)合同簡(jiǎn)易版
- 洛陽(yáng)文化旅游職業(yè)學(xué)院《航空攝影》2023-2024學(xué)年第一學(xué)期期末試卷
- 2024年度商鋪物業(yè)管理及環(huán)境維護(hù)服務(wù)協(xié)議3篇
- 2024全新專業(yè)醫(yī)療護(hù)理機(jī)構(gòu)護(hù)工雇傭合同樣本下載3篇
- 退休設(shè)計(jì)師返聘協(xié)議范例
- 動(dòng)物園水地暖施工合同
- 2024年度高端智能家居紗窗定制服務(wù)合同3篇
- 公園管理處聘用合同樣本
- 聯(lián)營(yíng)項(xiàng)目管理質(zhì)量保證
- 化肥廠地磅租賃協(xié)議
- 消化道出血的PBL教學(xué)查房
- 醫(yī)療單位總務(wù)科工作總結(jié)
- 鐵路施工安全培訓(xùn)課件
- 混凝土強(qiáng)度評(píng)定表(自動(dòng)計(jì)算)
- 公安內(nèi)勤培訓(xùn)課件
- 《5.1.2 弧度制》教學(xué)設(shè)計(jì)、導(dǎo)學(xué)案、同步練習(xí)
- ADS射頻電路設(shè)計(jì)與仿真從入門到精通
- 喀什草湖鎮(zhèn)發(fā)展規(guī)劃方案
- 河道綜合整治規(guī)劃方案
- 粵教版科學(xué)四年級(jí)上冊(cè)全冊(cè)試卷(含答案)
- 民宿集體管理方案
評(píng)論
0/150
提交評(píng)論