<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>모든 LLM 스터디 - lee's blog</title><link>https://ken-0913.github.io/myblog/posts/llm/</link><description>모든 LLM 스터디 | 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>Tue, 11 Aug 2026 20:00:00 +0900</lastBuildDate><atom:link href="https://ken-0913.github.io/myblog/posts/llm/" rel="self" type="application/rss+xml"/><item><title>kind + RTX 3050 6GB에서 Ray Serve LLM으로 vLLM 서빙하기 — RayService 실습 매뉴얼</title><link>https://ken-0913.github.io/myblog/posts/llm/llm-ray-serving-result/</link><pubDate>Tue, 11 Aug 2026 20:00:00 +0900</pubDate><author><name>ken-0913</name></author><guid>https://ken-0913.github.io/myblog/posts/llm/llm-ray-serving-result/</guid><description><![CDATA[<div class="featured-image">
                <img src="images/banners/llm-ray-serving-result-15513a3c.png" referrerpolicy="no-referrer">
            </div><p><a href="../llm-serving-single-model-lab/" rel="">앞선 두 실습</a>은 서버 한 대에서 프로세스를 직접 띄웠다. 이번에는 <strong>Kubernetes 위에 얹는다.</strong> KubeRay Operator가 Ray 클러스터를 관리하고, 그 위에서 Ray Serve LLM이 vLLM 엔진을 감싸 <strong>OpenAI 호환 엔드포인트</strong>를 노출하는 구조를 만든다.</p>
<p>최종 목표는 하나다. <code>kubectl apply</code> 한 번으로 LLM 서빙이 뜨고, 모델을 바꾸려면 매니페스트만 고치면 되는 상태다.</p>
<p><strong>이 글의 모든 명령과 결과는 RTX 3050 6GB 한 장이 달린 리눅스 데스크톱에서 실제로 실행한 것이다.</strong> 6GB는 LLM 서빙에 넉넉한 크기가 아니라서, 모델과 설정을 어디까지 줄여야 하는지가 이 실습의 절반을 차지한다.</p>]]></description></item><item><title>LLM 스터디 2주차 - 멀티 모델 서빙과 Triton 위임 직접 해보기</title><link>https://ken-0913.github.io/myblog/posts/llm/llm-serving-multi-model-lab/</link><pubDate>Mon, 10 Aug 2026 23:00:00 +0900</pubDate><author><name>ken-0913</name></author><guid>https://ken-0913.github.io/myblog/posts/llm/llm-serving-multi-model-lab/</guid><description><![CDATA[<div class="featured-image">
                <img src="images/banners/llm-serving-multi-model-lab-f87455c6.png" referrerpolicy="no-referrer">
            </div><p><a href="../llm-serving-single-model-lab/" rel="">앞 글</a>에서는 모델 <strong>하나</strong>를 어떻게 빠르게 굴릴지를 다뤘다. 배칭, 스트리밍, 프로세스 격리가 주제였다. 이번에는 질문이 바뀐다. <strong>모델이 여러 개일 때 무엇을 메모리에 올려두고 어디로 보낼 것인가.</strong></p>
<p>같은 저장소 <a href="https://github.com/orca3/llm-model-inference" target="_blank" rel="noopener noreferrer">orca3/llm-model-inference</a>의 <code>ch03/multi_model_serving</code>을 쓴다. 모델 4개를 LRU 캐시로 관리하고, 그중 하나는 <strong>NVIDIA Triton 컨테이너에 위임</strong>하는 구조다.</p>
<p>이 글의 모든 로그와 명령 결과는 <strong>RTX 3050 6GB 리눅스 머신에서 실제로 실행한 것</strong>이다.</p>
<h2 id="1-part-1과-무엇이-다른가" class="headerLink">
    <a href="#1-part-1%ea%b3%bc-%eb%ac%b4%ec%97%87%ec%9d%b4-%eb%8b%a4%eb%a5%b8%ea%b0%80" class="header-mark"></a>1. Part 1과 무엇이 다른가</h2><p>두 랩은 완전히 독립적이다. 그리고 <strong>torch 버전이 충돌</strong>하므로 venv를 반드시 분리해야 한다.</p>]]></description></item><item><title>LLM 스터디 2주차 - 단일 모델 LLM 서빙 서버 직접 만들어보기</title><link>https://ken-0913.github.io/myblog/posts/llm/llm-serving-single-model-lab/</link><pubDate>Mon, 10 Aug 2026 21:00:00 +0900</pubDate><author><name>ken-0913</name></author><guid>https://ken-0913.github.io/myblog/posts/llm/llm-serving-single-model-lab/</guid><description><![CDATA[<div class="featured-image">
                <img src="images/banners/llm-serving-single-model-lab-e6f25d84.png" referrerpolicy="no-referrer">
            </div><p>LLM 서빙은 보통 vLLM이나 TGI 같은 프레임워크를 가져다 쓴다. 하지만 그 안에서 무슨 일이 벌어지는지는 직접 만들어봐야 감이 온다. 이번 실습은 <strong>배칭 · 스트리밍 · 프로세스 격리</strong>를 손으로 구현한 서버를 띄우고, 로그를 읽어 동작을 확인하는 과정이다.</p>
<p>대상 코드는 책 <em>Hands-On LLM Serving and Optimization</em>의 공식 저장소 <a href="https://github.com/orca3/llm-model-inference" target="_blank" rel="noopener noreferrer">orca3/llm-model-inference</a> 중 <code>ch03/single_model_llm_serving</code>이다. 모델은 <strong>facebook/opt-125m</strong>을 쓴다. 작아서 6GB GPU에서도 충분히 돌아간다.</p>
<p>이 글의 모든 로그와 명령 결과는 <strong>RTX 3050 6GB 리눅스 머신에서 실제로 실행한 것</strong>이다.</p>]]></description></item><item><title>LLM 스터디 1주차 - Transformer격파하기</title><link>https://ken-0913.github.io/myblog/posts/llm/llm-series-all-in-one/</link><pubDate>Fri, 07 Aug 2026 20:00:00 +0900</pubDate><author><name>ken-0913</name></author><guid>https://ken-0913.github.io/myblog/posts/llm/llm-series-all-in-one/</guid><description><![CDATA[<div class="featured-image">
                <img src="images/banners/llm-series-all-in-one-85eb1b79.png" referrerpolicy="no-referrer">
            </div><h2 id="이-글의-구성" class="headerLink">
    <a href="#%ec%9d%b4-%ea%b8%80%ec%9d%98-%ea%b5%ac%ec%84%b1" class="header-mark"></a>이 글의 구성</h2><table>
	<thead>
			<tr>
					<th></th>
					<th>다루는 것</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>1부</td>
					<td><a href="#1%eb%b6%80-%ec%9e%84%eb%b2%a0%eb%94%a9%ea%b3%bc-%ec%9c%84%ec%b9%98-%ec%a0%95%eb%b3%b4-token%ec%9d%84-%eb%b2%a1%ed%84%b0%eb%a1%9c-%eb%b0%94%ea%be%b8%ea%b8%b0" rel="">임베딩과 위치 정보 (Token을 벡터로 바꾸기)</a></td>
			</tr>
			<tr>
					<td>2부</td>
					<td><a href="#2%eb%b6%80-qkv%eb%a1%9c-%eb%ac%b8%eb%a7%a5%ec%9d%84-%ec%84%9e%eb%8a%94-self-attention" rel="">Q·K·V로 문맥을 섞는 self-attention</a></td>
			</tr>
			<tr>
					<td>3부</td>
					<td><a href="#3%eb%b6%80-multi-head-%eb%a7%88%eb%ac%b4%eb%a6%ac--concat%ea%b3%bc-w%e2%82%92" rel="">Multi-Head 마무리 — concat과 Wₒ</a></td>
			</tr>
			<tr>
					<td>4부</td>
					<td><a href="#4%eb%b6%80-%ea%b0%81-token%ec%9d%84-%eb%94%b0%eb%a1%9c-%ea%b0%80%ea%b3%b5%ed%95%98%eb%8a%94-mlp" rel="">각 Token을 따로 가공하는 MLP</a></td>
			</tr>
			<tr>
					<td>5부</td>
					<td><a href="#5%eb%b6%80-prefill-decode-kv-cache" rel="">prefill, decode, KV Cache</a></td>
			</tr>
			<tr>
					<td>6부</td>
					<td><a href="#6%eb%b6%80-%ec%b6%9c%eb%a0%a5%ec%b8%b5%ea%b3%bc-sampling--%eb%8b%a4%ec%8b%9c-%ea%b8%80%ec%9e%90%eb%a1%9c" rel="">출력층과 sampling — 다시 글자로</a></td>
			</tr>
	</tbody>
</table>
<h1 id="1부-임베딩과-위치-정보-token을-벡터로-바꾸기" class="headerLink">
    <a href="#1%eb%b6%80-%ec%9e%84%eb%b2%a0%eb%94%a9%ea%b3%bc-%ec%9c%84%ec%b9%98-%ec%a0%95%eb%b3%b4-token%ec%9d%84-%eb%b2%a1%ed%84%b0%eb%a1%9c-%eb%b0%94%ea%be%b8%ea%b8%b0" class="header-mark"></a>1부. 임베딩과 위치 정보 (Token을 벡터로 바꾸기)</h1><p>LLM은 글자를 직접 다루지 못한다. 오직 <strong>숫자(벡터)</strong> 만 계산할 수 있다.
그래서 첫 단계는 단어(정확히는 token)를 벡터로 바꾸는 것인데, 이를 <strong>embedding(임베딩)</strong> 이라 한다. 먼저 GPT-3를 예로 임베딩이 <strong>행렬 연산</strong>으로 어떻게 이뤄지는지 본다.</p>]]></description></item></channel></rss>