Upgrade to Pro — share decks privately, control downloads, hide ads and more …

지연 시간 순삭! LLM 추론 구조와 효율적 애플리케이션 설계

kakao
November 01, 2024

지연 시간 순삭! LLM 추론 구조와 효율적 애플리케이션 설계

#LLM 추론 #성능 최적화 #캐릭터 페르소나

LLM 기반 애플리케이션에서 지연 시간 최소화는 핵심적인 도전 과제입니다. 이번 발표에서는 빠른 응답 속도를 자랑하는 캐릭터 페르소나 구현 경험과 노하우를 공유합니다. LLM의 시퀀스 생성 메커니즘을 분석하여 효율적인 활용 방안을 제시하고, 이를 통해 애플리케이션의 지연 시간을 최소화하는 방법을 탐구합니다. 최적화된 설계를 통해 사용자 경험을 극대화하고 실시간 응답 애플리케이션의 성능을 향상시키는 구체적인 전략을 소개합니다.

발표자 : umid.podo
웹툰과 웹소설 속 매력 넘치는 등장 인물들이 유저와 생생하게 소통할 수 있는 캐릭터 페르소나를 개발하고 있습니다.

kakao

November 01, 2024
Tweet

More Decks by kakao

Other Decks in Programming

Transcript

  1. --. ਬ੷ 3"( ୭न بݫੋౠച ࠺ҕѐ ޹х  -FXJT 1BUSJDL

    FUBM3FUSJFWBM - BVHNFOUFEHFOFSBUJPOGPSLOPXMFEHF - JOUFOTJWFOMQUBTLT  
  2. --. ೞܖ য়ט੿݈ "VUPSFHSFTTJWFݽ؛ --. о য়ט੿݈ೞܖ --. ӡ য়ט੿݈ೞܖо

     4IBOBIBO FUBM3PMFQMBZXJUIMBSHFMBOHVBHFNPEFMT   
  3. 5SBOTGPSNFSইఃఫ୊  5SBOTGPSNFS  &ODPEFS - %FDPEFS  5 

    &ODPEFS - 0OMZ  #&35  %FDPEFS - 0OMZ  (15   7BTXBOJ "TIJTI FUBM"UUFOUJPOJTBMMZPVOFFE  ] 3BGGFM $PMJO FUBM&YQMPSJOHUIFMJNJUTPGUSBOTGFSMFBSOJOHXJUIBVOJ fi FEUFYU - UP - UFYUUSBOTGPSNFSu  ] %FWMJO +BDPC#FSU 1SF - USBJOJOHPGEFFQCJEJSFDUJPOBMUSBOTGPSNFSTGPSMBOHVBHFVOEFSTUBOEJOH  ] 3BEGPSE "MFD FUBM*NQSPWJOHMBOHVBHFVOEFSTUBOEJOHCZHFOFSBUJWFQSF - USBJOJOH  
  4. %FDPEFS - 0OMZ5SBOTGPSNFSইఃఫ୊   IUUQT BJNFUBDPNCMPHNFUB - MMBNB ੑ۱

    UPLFOT UPLFO ੐߬٬ TFMG BUUFOUJPO ''// ୹۱ UPLFO TFMG BUUFOUJPO ''// "VUPSFHSFTTJWF%FDPEJOH 
  5. ࢿמ࠺Ү  IUUQT DPNNVOJUZPQFOBJDPNUHQUP - UPLFOT - QFS - TFDPOE

    - DPNQBSBCMF - UP - HQUUVSCP - EBUB - BOE - BOBMZTJTDPNQBSBUJWF - TUBUJTUJDT - UBCMF]  IUUQT QMBUGPSNPQFOBJDPNUPLFOJ[FS]  NT  ష௾ࣻ 0QFO 2VFTUJPO $MPTFE 2VFTUJPO ష௾ࣻ   दр NT     ݽ؛  HQUP  UPLFOTT .FBO   0QFO"*5PLFOJ[FS rযڃҗݾਸજই೧ sۄח૕ޙীח r৉ࢎীҙब੉݆ইҴࢎदр੉ӝ׮۰ ૓׮sۄחޙ੢੉׹ਵ۽੸੺೤פ׮  WT
  6. --.ੑ۱  ੑ۱ UPLFOT UPLFO ੐߬٬ TFMG BUUFOUJPO ''// ୹۱

    UPLFO TFMG BUUFOUJPO ''// "VUPSFHSFTTJWF%FDPEJOH
  7. 5PLFOJ[FS tഥࢎীب଱೮׮u <tഥu tࢎu tীu tبu t଱u t೮u t׮u tu>

    tഥࢎীب଱೮׮u <tഥࢎu tীu tب଱೮׮u tu> DIBSBDUFS - CBTFE TVCXPSE - CBTFE tഥࢎীب଱೮׮u <tഥࢎীu tب଱೮׮u> XIJUFTQBDF
  8. ੑ۱द௫झ  য়ט যٸ զॿ о 5PLFO 5PLFO &NCFEEJOH 

       1PTJUJPOBM &ODPEJOH     JE QPTJUJPO       j    j    j    j    j    j    j    j    j    j    j    j 
  9. ష௼ա੉੷  ష௼ա੉੷୭੸ച  IUUQT IVHHJOHGBDFDPMFBSOOMQ - DPVSTFDIBQUFS] IUUQT QMBUGPSNPQFOBJDPNUPLFOJ[FS

    tউ֞ೞࣁਃu <  > <tউu t֞ೞࣁਃu tu> tউ֞ೞࣁਃu <     > <tইu tũu t֗u tżu tೞࣁਃu tu> (15(15 (15P
  10. ࢿמ࠺Ү (15 5PLFOJ[FS (15P 5PLFOJ[FS ష௾ࣻ   दр NT

        ݽ؛HQUP  UPLFOTT .FBO   0QFO"*5PLFOJ[FS JG LBLBP ח஠஠য়Ӓܛ੄ӝࣿ࠺੹ਸҕѐೞҊ ӝࣿ੸ࢿஂী؀೧ѐߊ੗ழޭפ౭৬ೣԋҕਬೞ ח஠஠য়؀಴ѐߊ੗ஶಌ۠झੑפ׮ ݽ؛݃׮ష௾ࢤࢿࣘب UPLFOTT ׮ܰ૑݅ ੉࠺Үীࢲחэ׮ۄҊо੿  IUUQT DPNNVOJUZPQFOBJDPNUHQUP - UPLFOT - QFS - TFDPOE - DPNQBSBCMF - UP - HQUUVSCP - EBUB - BOE - BOBMZTJTDPNQBSBUJWF - TUBUJTUJDT - UBCMF]  IUUQT QMBUGPSNPQFOBJDPNUPLFOJ[FS]  NT  ష௾ࣻ
  11. --.୹۱  ੑ۱ UPLFOT UPLFO ੐߬٬ TFMG BUUFOUJPO ''// ୹۱

    UPLFO TFMG BUUFOUJPO ''// "VUPSFHSFTTJWF%FDPEJOH   j  ୭ઙIJEEFOTUBUF
  12. ୭ઙIJEEFOTUBUF ೖ੗ ࣻਭ ୭ઙIJEEFOTUBUF ۄݶ ӣ஖ ৬ ୭ઙIJEEFOTUBUF  

    j    j    j  TFMG BUUFOUJPO ''// TFMG BUUFOUJPO ''//
  13. -PHJUT ୭ઙIJEEFOTUBUF &NCFEEJOH.BUSJY ƒ      

       j -PHJUT ଵ ࣻਭ Ҋೱ ۄݶ ղੌ j ೖ੗ ଵ ࣻਭ Ҋೱ ۄݶ ղੌ j ೖ੗
  14. ష௾୹۱ഛਯ ೐܁೐౟  ઱য૓૕ޙী׹ਵ۽੸੺ೠޙ੢ਸ଺ই઻  э਷ഋधਵ۽׹ਸ೧઻ 2যڃҗݾਸજই೧ ӣߏਸજইೠ׮  

            r җݾ զॿ   j যڃ JOG JOG JOG JOG JOG JOG JOG -PHJUT
  15. --. \ +40/0VUQVU t --. { 1SPNQU 1SPNQU { "

    1SPNQU OBNF --. { "name": "Muzi", "age": 10 }
  16. --. .V[J { "name": 4USVDUVSFE0VUQVU  --. { "name": "Muzi",

    "age": { "name": "Muzi", "age": 10 } 1SPNQU 1SPNQU { "name": "Muzi", "age": 10 }
  17. ࢿמ࠺Ү 6OTUSVDUVSFE 4USVDUVSFE ష௾ࣻ   दр NT  

      ݽ؛HQUP  UPLFOTT .FBO   0QFO"*5PLFOJ[FS { "id": 12345, "name": "John Doe", "email": "[email protected]", "is_active": true }  IUUQT DPNNVOJUZPQFOBJDPNUHQUP - UPLFOT - QFS - TFDPOE - DPNQBSBCMF - UP - HQUUVSCP - EBUB - BOE - BOBMZTJTDPNQBSBUJWF - TUBUJTUJDT - UBCMF]  IUUQT QMBUGPSNPQFOBJDPNUPLFOJ[FS]  NT  ష௾ࣻ
  18.  0QFOݽ؛  0VUMJOFT  $MPTFEݽ؛  0QFO"*  ֙ਘ୹द

     (FNJOJ  ֙ਘ୹द 4USVDUVSFE0VUQVU  IUUQT HJUIVCDPNEPUUYU - BJPVUMJOFT] IUUQT PQFOBJDPNJOEFYJOUSPEVDJOH - TUSVDUVSFE - PVUQVUT - JO - UIF - BQJ] IUUQT DMPVEHPPHMFDPNWFSUFY - BJHFOFSBUJWF - BJEPDTNVMUJNPEBM DPOUSPM - HFOFSBUFE - PVUQVU
  19. 5SBOTGPSNFS࠶۟  ੑ۱ UPLFOT UPLFO ੐߬٬ ୹۱ UPLFO TFMG BUUFOUJPO

    ''// TFMG BUUFOUJPO ''// "VUPSFHSFTTJWF%FDPEJOH
  20. 5SBOTGPSNFS࠶۟ 5PLFO &NCFEEJOH 5SBOTGPSNFS #MPDLT ⃗ E1 ⃗ E2 ⃗

    E3 ⃗ E4 TFMG BUUFOUJPO ''// ⃗ E′  1 TFMG BUUFOUJPO ''// ⃗ E′  2 ⃗ E′  3 ⃗ E′  4 ⃗ E′  ′  ′  ′  ′  ′  ′  1 ⃗ E′  ′  ′  ′  ′  ′  ′  2 ⃗ E′  ′  ′  ′  ′  ′  ′  3 ⃗ E′  ′  ′  ′  ′  ′  ′  4 য়ט যٸ զॿ о
  21. "UUFOUJPO,FZ 2VFSZ 7BMVF 5PLFO &NCFEEJOH 5SBOTGPSNFS #MPDLT ⃗ E1 ⃗

    E2 ⃗ E3 ⃗ E4 TFMG BUUFOUJPO ''// ⃗ E′  1 TFMG BUUFOUJPO ''// ⃗ E′  2 ⃗ E′  3 ⃗ E′  4 ⃗ E′  ′  ′  ′  ′  ′  ′  1 ⃗ E′  ′  ′  ′  ′  ′  ′  2 ⃗ E′  ′  ′  ′  ′  ′  ′  3 ⃗ E′  ′  ′  ′  ′  ′  ′  4 , 2 7 , 2 7 , 2 7 , 2 7 , 2 7 , 2 7 , 2 7 , 2 7 ߹ݽন ੜۋ׮ ࢎҗ ܳ
  22. "UUFOUJPO,FZ 2VFSZ 7BMVF ⃗ E1 ⃗ E2 ⃗ E3 ⃗

    E4 TFMG BUUFOUJPO ''// , 2 7 , 2 7 , 2 7 , 2 7 WQ WK WV ⃗ K1 ⃗ Q1 ⃗ V1 ⃗ E1 ⃗ E1 ⋅ WK ⃗ E1 ⋅ WQ ⃗ E1 ⋅ WV ߹ݽন ੜۋ׮ ࢎҗ ܳ
  23. "UUFOUJPO,FZ 2VFSZ 7BMVF ⃗ E1 ⃗ E2 ⃗ E3 ⃗

    E4 K1 Q1 V1 Q1 ⋅ K1 Q2 ⋅ K1 Q2 ⋅ K2 Q3 ⋅ K1 Q3 ⋅ K2 Q3 ⋅ K3 Q4 ⋅ K1 Q4 ⋅ K2 Q4 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NBC - IB  (152CJU2VBOUJ[BUJPO  (16"  ೐܁೐౟ష௾ࣻ  ࢤࢿష௾ࣻ  ߓ஖ࢎ੉ૉ  )VHHJOH'BDF5SBOTGPSNFST  generate(..., use_cache=False) generate(..., use_cache=True)   IUUQT IVHHJOHGBDFDPNFUB - MMBNB-MBNBC - IG] IUUQT IVHHJOHGBDFDPEPDTUSBOTGPSNFST] IUUQT IVHHJOHGBDFDPCMPHPWFSWJFX - RVBOUJ[BUJPO - USBOTGPSNFSTHFOFSBUF - TQFFE
  31. ߽۳୶ۿ য়טզॿоযٸ  बबೡٺ ੷֘ݫ׏ח য়ט਷ޖटզ 1SPNQU 5PLFO(FOFSBUJPO ҳܴ ೠ

    ੼ হח ݉਷ ઁਭ श ߏ җ ػ੢ ଧѱ JG LBLBP ஶಌ۠झ ୐ ߣ૩ զ ஠஠য় ਢొ ਸ ࠊ &04 ೞט
  32. ,7$BDIFബਯച बब ೡ ٺ &04 য়ט ਷ ޖट զ &04

    ஠஠য় ਢొ ਸ ࠊ &04 JG LBLBP &04  ݫݽܻ౵ಞച  द௲झࢤࢿ੹޷ܻࢎਊೡݫݽܻ੼ਬ  ష௾੉঴݃݅ఀࢤࢿؼ૑৘ஏࠛо
  33. ,7$BDIFബਯച बब ೡ ٺ &04 য়ט ਷ ޖट զ &04

    ஠஠য় ਢొ ਸ ࠊ &04 JG LBLBP &04  ݫݽܻ౵ಞച  द௲झࢤࢿ੹޷ܻࢎਊೡݫݽܻ੼ਬ  ష௾੉঴݃݅ఀࢤࢿؼ૑৘ஏࠛо  ೠद௲झ੿ܻറ೧׼ҕрࢎਊࠁ੢উؽ
  34. ,7$BDIFബਯച য়ט ਷ ޖट զ &04 JG LBLBP &04 

    ݫݽܻ౵ಞച  द௲झࢤࢿ੹޷ܻࢎਊೡݫݽܻ੼ਬ  ష௾੉঴݃݅ఀࢤࢿؼ૑৘ஏࠛо  ೠद௲झ੿ܻറ೧׼ҕрࢎਊࠁ੢উؽ JG LBLBP ীࢲ যڃ ߊ಴ ٜ ੉ ੓য &04
  35. ,7$BDIFബਯച ஠஠য় ਢొ ਸ ࠊ &04 JG LBLBP &04 

    W--.  э਷௼ӝ࠶۾ਵ۽ա־Ҋ  п࠶۾ীҊ੿ػࣻష௾, 7੷੢  п࠶۾਷োࣘػҕр೙ਃ9 बब ೡ ٺ &04 য়ט ਷ ޖट զ &04 #MPDL"MMPDBUPS  ,XPO 8PPTVL FUBM&G fi DJFOUNFNPSZNBOBHFNFOUGPSMBSHFMBOHVBHFNPEFMTFSWJOHXJUIQBHFEBUUFOUJPO  
  36. ࢿמ࠺Ү  ݽ؛015#  (16/WJEJB"(#  ӝઓदझమ W--. ୭؀୊ܻ۝ UPLFOTT

    ড ড ୭؀ ߓ஖ࢎ੉ૉ ডѐ ডѐ  IUUQT IVHHJOHGBDFDPGBDFCPPLPQUC] 'BTUFS5SBOTGPSNFS 0SDB] ,XPO 8PPTVL FUBM&G fi DJFOUNFNPSZNBOBHFNFOUGPSMBSHFMBOHVBHFNPEFMTFSWJOHXJUI QBHFEBUUFOUJPO  
  37. --.୶ۿ੄ױ҅ "*ӝࣿ੉ࢎഥ৬҃ઁী޷஖חӛ੿੸ ࠗ੿੸ ৔ೱਸӐഋ੓ѱࢸݺೞҊ ੉ܳ؀࠺ೞӝਤ೧ пҴ੿ࠗ৬ӝস੉೧ঠೡ৉ೡী؀೧֤੄೧ ࠁইۄ "*ӝࣿ਷ബਯࢿೱ࢚җ࠺ਊ੺хীӝৈೞ חӛ੿੸ੋബҗо੓૑݅ زदীੌ੗ܻхࣗ

    աࢎഥ੸ࠛಣ١ਸୡېೡਤ೷੉੓णפ׮п Ҵ੿ࠗח੉۞ೠ߸ചী؀਽ೞӝਤೠӏઁ৬ ૑ਗ੿଼ਸ݃۲೧ঠೞݴ ӝস਷ӝࣿਮܻ৬ ੋ۱੤Үਭী൨ॄঠ೤פ׮ 1SPNQU1SPDFTTJOHױ҅ 5PLFO(FOFSBUJPOױ҅
  38. 1SPNQ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JJBOEEFFQTQFFE - JOGFSFODF    ݽ؛-MBNB#  (16 "(#  ೐܁೐౟ష௾ࣻ   ࢤࢿష௾ࣻ  ਃ୒۝RVFSJFTT  W--. %FFQ4QFFE - 'BTU(FO ୊ܻ۝ UPLFOTT ড ড
  42. زੌೠQSF fi Y ೐܁೐౟ ࢎਊ੗оਃ୒ೠ੿ࠁীࢲࠛ௝ೞѢաਬ೧ೠղ ਊ਷ઁ৻ೞҊ ݺഛೞҊਬ੊ೠ੿ࠁܳઁҕೞࣁ ਃࠗ੸੺ೞѢաࠛ೙ਃೠࣁࠗࢎ೦਷Ѧ۞ղ Ҋ ೨ब੸ੋղਊ݅рѾೞҊ੉೧ೞӝऔѱࢸݺ

    ೞࣁਃ಩۱੸ ର߹੸ ഇয়੸ ࠛߨ੸੉Ѣաࠛ ௝хਸ઴ࣻ੓חղਊ਷ݽفઁ৻ೞࣁਃ৘ܳ ٜয ੋઙ ࢿ߹ ઙҮী؀ೠର߹੸ੋj  оա׮ۄ݃߄ࢎ  ই੗ର஠ఋ౵ೞ ೐܁೐౟ ࢎਊ੗оਃ୒ೠ੿ࠁীࢲࠛ௝ೞѢաਬ೧ೠղ ਊ਷ઁ৻ೞҊ ݺഛೞҊਬ੊ೠ੿ࠁܳઁҕೞࣁ ਃࠗ੸੺ೞѢաࠛ೙ਃೠࣁࠗࢎ೦਷Ѧ۞ղ Ҋ ೨ब੸ੋղਊ݅рѾೞҊ੉೧ೞӝऔѱࢸݺ ೞࣁਃ಩۱੸ ର߹੸ ഇয়੸ ࠛߨ੸੉Ѣաࠛ ௝хਸ઴ࣻ੓חղਊ਷ݽفઁ৻ೞࣁਃ৘ܳ ٜয ੋઙ ࢿ߹ ઙҮী؀ೠର߹੸ੋj  "#$%&'(  )*+,-./01
  43. .BTLFE"UUFOUJPO ⃗ V2 ⃗ V3 9 "UUFOUJPO-BZFS ⃗ V1 ⃗

    E1 K1 Q1 V1 Q1 ⋅ K1 ⃗ E1 ⃗ E2 Q2 ⋅ K1 Q2 ⋅ K2 K2 Q2 V2 ⃗ E2 ⃗ E3 Q3 ⋅ K1 Q3 ⋅ K2 Q3 ⋅ K3 K3 Q3 V3 ⃗ E3 ⃗ E4 Q4 ⋅ K1 Q4 ⋅ K2 Q4 ⋅ K3 Q4 ⋅ K4 ⃗ V4 K4 Q4 V4 ⃗ E4 ⃗ V1 ⃗ V2 ⃗ V3 Q1 ⋅ K2 Q1 ⋅ K3 Q1 ⋅ K4 Q2 ⋅ K3 Q2 ⋅ K4 Q3 ⋅ K4
  44. QSF fi Yҕਬ  ࢲ۽׮ܲद௲झр,7நदҕਬ  W--.  $IVOL"UUFOUJPO 

    W--.֙ਘ  (FNJOJ֙ਘ  QSFWJFX  $MBVEF֙ਘ  CFUB  0QFO"*(15֙ਘ  :F -V FUBM$IVOLBUUFOUJPO&G fi DJFOUTFMG - BUUFOUJPOXJUIQSF fi Y - BXBSFLWDBDIFBOEUXP - QIBTFQBSUJUJPO  ] IUUQT HJUIVCDPNWMMN - QSPKFDUWMMNQVMM] IUUQT  BJHPPHMFEFWHFNJOJ - BQJEPDTDBDIJOH] IUUQT XXXBOUISPQJDDPNOFXTQSPNQU - DBDIJOH] IUUQT PQFOBJDPNJOEFYBQJ - QSPNQU - DBDIJOH
  45. QSF fi Yҕਬ from vllm import LLM llm = LLM(

    ..., enable_prefix_caching=True ) llm.generate(LONG_PROMPT + "AAA") llm.generate(LONG_PROMPT + “BBB") -PSFNJQTVNEPMPSTJU BNFU DPOTFDUFUVS BEJQJTDJOHFMJU6URVJT MPSFNNBTTjj """ -PSFNJQTVNEPMPSTJU BNFU DPOTFDUFUVS BEJQJTDJOHFMJU6URVJT MPSFNNBTTjj ###
  46. ࢿמ࠺Ү  ݽ؛$MBVEF4POOFU  ஏ੿ӝળ  5JNFUP fi STUUPLFO 

    நदػ೐܁೐౟ٍ_ష௾ੋझ౟۟࣌  1SF fi Yநद 9 1SF fi Yநद 0   UPLFODBDIFE QSPNQU T T   UPLFODBDIFE QSPNQU T T  IUUQT XXXBOUISPQJDDPNOFXTQSPNQU - DBDIJOH
  47.  --. EFDPEFS - POMZUSBOTGPSNFS ҳઑ  ੑ۱  ୹۱

     ղࠗ 5SBOTGPSNFS#MPDL  ୭੸ച  5PLFOJ[FS  $MPTFE2VFTUJPO  4USVDUVSFE0VUQVU  ,7$BDIF  ߽۳୊ܻ ,7$BDIF౵ಞച৮ച  ߽۳୊ܻ ߓ஖੹ۚ  QSF fi Yҕਬ ߊ಴੿ܻ
  48.  ә߸ೞח"*࠙ঠ ࢜۽਍ӝࣿҗߑߨٜ੉॔ইઉա১  ҳઑ৬ਗܻܳঌইঠજ਷೒ۖಬ ۄ੉࠳۞ܻ بҳࢶఖоמ  ҳઑ৬ਗܻܳঌইঠજ਷গ೒ܻா੉࣌ࢸ҅оמ 

    द௫झݽ؛݂࠙ঠীࢲ౟ےझನݠইఃఫ୊חೠزউ૑ߓ੸ੌѪ  ౟ےझನݠইఃఫ୊ܳੜ౵ঈೞӝਤ೧֢۱઺  જ਷ࢸ҅ܳೞӝਤ೧֢۱઺ Ѿۿ
  49. 2"