大模型深度定制以及在芯片設(shè)計(jì)應(yīng)用中的探索(英文版)_第1頁(yè)
大模型深度定制以及在芯片設(shè)計(jì)應(yīng)用中的探索(英文版)_第2頁(yè)
大模型深度定制以及在芯片設(shè)計(jì)應(yīng)用中的探索(英文版)_第3頁(yè)
大模型深度定制以及在芯片設(shè)計(jì)應(yīng)用中的探索(英文版)_第4頁(yè)
大模型深度定制以及在芯片設(shè)計(jì)應(yīng)用中的探索(英文版)_第5頁(yè)
已閱讀5頁(yè),還剩38頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(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ì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論