Skip to Content
LLM 서비스 및 최적화 실습하기 (Korean Edition)
book

LLM 서비스 및 최적화 실습하기 (Korean Edition)

by Chi Wang, Peiheng Hu
May 2026
Intermediate
374 pages
6h 40m
Korean
O'Reilly Media, Inc.
Content preview from LLM 서비스 및 최적화 실습하기 (Korean Edition)

제9장. 실무에서의LLM 최적화

이 작품은 AI를 사용하여 번역되었습니다. 여러분의 피드백과 의견을 환영합니다: translation-feedback@oreilly.com

최적화는 끊임없이 변화하는 목표입니다. 환경( )에 따라 '최적'의 전략도 달라집니다. 자원은 한정되어 있으므로 모든 옵션을 무차별적으로 시도할 수는 없습니다. 여러분이 자신의 도메인에 맞게 효율적으로 최적화할 수 있도록, 하드웨어 구성, 모델 선택, 메모리 및 KV-캐시 동작, 분산 서빙 및 트래픽 패턴과 같은 핵심 요소가 서빙 성능에 어떤 영향을 미치는지, 그리고 이러한 차이를 측정하고 해석하는 방법을 보여주기 위해 실제 사례를 신중하게 선정했습니다. 이러한 이해를 바탕으로 제약 조건을 헤쳐 나가고 강력한 서빙 설정에 도달할 수 있는 직관을 얻을 수 있을 것입니다.

이 실습 장에서는 이전 장에서 배운 모든 내용을 실제로 적용해 봅니다. vLLM이 포함된 오픈소스 Qwen3-14B 모델을 예시로 사용하여, 실용적인 LLM 서빙 최적화 과정을 단계별로 안내하고 서빙을 수평 및 수직으로 확장하는 방법을 보여드리겠습니다.

간결한 최적화 계획을 수립하여 단계별로 실행해 보겠습니다. 환경 설정, 평가 워크로드 준비, 실험 실행, 단일 및 다중 GPU 환경에서 모델 서빙, 결과 분석, 그리고 앞서 소개한 기법 적용까지 다룰 것입니다. 마지막으로, 실제 현장에서 검증된 핵심 요점과 저희의 경험을 바탕으로 한 절충안 권장 사항을 제시하며, 이는 향후 최적화 작업을 위한 지침이 될 것입니다.

이 장을 읽은 후에는 LLM 서빙 최적화가 실제로 어떻게 이루어지는지 명확히 이해하게 될 것이며, 여러분의 사용 사례와 트래픽 패턴에 맞춰 LLM을 최적화할 수 있는 자신감을 갖게 될 것입니다.

실습 코드

이 장의 ' ' 실습 코드(및 설정 안내)는 ch09 폴더에서 확인할 수 있습니다. 이 실습에는 고성능 GPU(예: NVIDIA L40S)가 필요하며, 경우에 따라 멀티 GPU 하드웨어가 필요하기 때문에 많은 독자분들이 필요한 컴퓨팅 리소스를 확보하지 못할 가능성이 높습니다.

이 챕터를 더 쉽게 이용할 수 있도록, 전체 실습 코드뿐만 아니라 각 최적화 단계에서 캡처한 출력 결과도 포함된 Jupyter 노트북을 준비했습니다. 이를 통해 직접 실험을 실행하지 않아도 프로세스와 결과를 따라갈 수 있습니다.

LLM 서빙 최적화 계획

이 연습에서는 온라인 모델 서빙 환경에서 Qwen/Qwen3-14B 모델의 토큰 처리량 ( )을 최적화하는 데 중점을 둡니다. 구체적으로, 주어진 시간 내에 가능한 한 많은 토큰을 처리하여 단일 모델 인스턴스의 서빙 처리량을 극대화하는 것이 목표입니다. 처리된 토큰 수가 대부분의 LLM 가격 책정 모델의 기초가 되므로, 토큰 처리량이 높을수록 서빙 비용은 낮아집니다. 이 최적화 목표는 실제 LLM 서빙 시나리오에서 흔히 볼 수 있는 목표, 즉 단위 시간당 가능한 한 높은 토큰 처리 효율을 달성하는 것과 일치합니다.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

What Successful Brick-and-Mortar Retailers Get Right

What Successful Brick-and-Mortar Retailers Get Right

Rob Angell
The Human Factor in AI-Based Decision-Making

The Human Factor in AI-Based Decision-Making

Philip Meissner, Christoph Keding
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 0642572383671