<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Prefix Caching - 태그 - lee's blog</title><link>https://ken-0913.github.io/myblog/tags/prefix-caching/</link><description>Prefix Caching - 태그 - lee's blog</description><generator>Hugo -- gohugo.io</generator><language>ko-kr</language><managingEditor>hyeonjae0913@gmail.com (ken-0913)</managingEditor><webMaster>hyeonjae0913@gmail.com (ken-0913)</webMaster><lastBuildDate>Fri, 21 Aug 2026 21:00:00 +0900</lastBuildDate><atom:link href="https://ken-0913.github.io/myblog/tags/prefix-caching/" rel="self" type="application/rss+xml"/><item><title>LLM 스터디 3주차 - LLM 서빙 최적화 기법 — 배칭·어텐션·양자화·prefix 캐싱</title><link>https://ken-0913.github.io/myblog/posts/llm/llm-essential-llm-optimization-techniques/</link><pubDate>Fri, 21 Aug 2026 21:00:00 +0900</pubDate><author><name>ken-0913</name></author><guid>https://ken-0913.github.io/myblog/posts/llm/llm-essential-llm-optimization-techniques/</guid><description><![CDATA[<div class="featured-image">
                <img src="images/banners/llm-essential-llm-optimization-techniques-d756afc2.png" referrerpolicy="no-referrer">
            </div><p><a href="../llm-challenges-when-serving-llm/" rel="">앞 글</a>에서 병목이 어디에 있는지를 봤다. 이번에는  <strong>병목을 실제로 풀어보자.</strong> </p>
<h2 id="1-요청-배칭과-스케줄링" class="headerLink">
    <a href="#1-%ec%9a%94%ec%b2%ad-%eb%b0%b0%ec%b9%ad%ea%b3%bc-%ec%8a%a4%ec%bc%80%ec%a4%84%eb%a7%81" class="header-mark"></a>1. 요청 배칭과 스케줄링</h2><h3 id="왜-배칭이-필요한가" class="headerLink">
    <a href="#%ec%99%9c-%eb%b0%b0%ec%b9%ad%ec%9d%b4-%ed%95%84%ec%9a%94%ed%95%9c%ea%b0%80" class="header-mark"></a>왜 배칭이 필요한가</h3><p>prefill은 프롬프트 토큰을 한꺼번에 처리해 연산 강도가 높다. (앞서 말했듯이 연산강도가 높다는 것은 같은 가중치를 한 번 읽고 그것으로 훨씬 많은 토큰을 처리한다)</p>
<p><strong>문제는 decode다.</strong> 토큰 하나를 만들려고 수십억 개 파라미터를 전부 읽어야 하니 대역폭만 축내고 연산 유닛은 유휴상태이다. </p>
<p>여기서 배칭이 들어간다. 요청 세 개를 묶으면 <strong>가중치는 여전히 한 번만 읽으면서 토큰은 세 개를 만든다.</strong> 연산 강도를 인위적으로 끌어올린다.</p>]]></description></item></channel></rss>