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)

제3장. 모델 서빙 시스템 설계: 심층 분석

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

제1장에서는 주요 모델 서빙 패러다임을 소개하고, 일반적인 아키텍처 패턴과 장단점을 개괄적으로 살펴보았습니다. 제2장에서는 LLMs이 모델 수준에서 어떻게 추론을 수행하고 텍스트를 생성하는지 살펴보았습니다. 이 장에서는 이러한 기초 지식을 실제 엔지니어링에 적용하여, 단일 모델 및 다중 모델 시나리오 모두를 위한 완전한 서빙 시스템을 구축하기 위해 코드와 인프라를 어떻게 구성해야 하는지 다룹니다.

모델 서빙은 수백 개의 오픈소스 서빙 프레임워크와 상용 솔루션이 존재하는, 급속도로 진화하는 분야입니다. 적합한 솔루션을 평가하고, 도입하며, 맞춤화하는 과정은 금세 압도적일 수 있습니다. 특정 프레임워크부터 시작하기보다는, 이 장에서는 제1원리(first principles)를 바탕으로 직관력을 기르는 데 중점을 둡니다. 서빙 시스템이 근본적인 수준에서 어떻게 구조화되어 있는지 이해함으로써, 어떤 프레임워크나 관리형 서비스에 대해서도 더 잘 판단할 수 있게 될 것입니다.

이를 위해 우리는 단순하지만 대표적인 두 가지 서빙 시스템을 개발합니다. 하나는 단일 모델 LLM 서빙용이고, 다른 하나는 다중 모델 서빙용입니다. 이러한 구현은 의도적으로 간소화되었으며(Triton이나 vLLM과 같은 실제 운영 프레임워크를 대체하기 위한 것이 아님), 실제 시스템을 정의하는 핵심 구성 요소와 아키텍처 결정을 포착합니다. 이러한 예시를 통해 배치, 스트리밍, 라우팅, 격리, 리소스 관리가 실제로 어떻게 조화를 이루는지 확인할 수 있을 것입니다.

먼저, 배칭과 스트리밍을 지원하는 단일 모델 LLM 서빙 서비스를 구축합니다. 이를 바탕으로 일반적인 단일 모델 서빙 설계 패턴과 그 실제적인 제약 조건을 살펴봅니다. 그런 다음 이러한 아이디어를 확장하여 다중 모델 서빙 시스템을 구축하고, 비용 효율성을 최적화한 방식과 지연 시간 및 확장성을 최적화한 방식이라는 두 가지 일반적인 아키텍처 변형을 심층적으로 비교하며 마무리합니다.

이 장을 마치면, 단일 모델 및 다중 모델 서빙 시스템의 내부 작동 원리에 대해 자신 있게 이해할 수 있게 될 것입니다. 더 중요한 것은, 오픈 소스 또는 Cloud 기반 서빙 솔루션을 평가하고, 조정하며, 확장하여 특정 성능, 비용 및 운영 요구 사항에 맞출 수 있게 된다는 점입니다.

본 장의 코드

이 장에 수반되는 GitHub 저장소에서 ' ' 샘플 코드의 전체 내용을 확인할 수 있습니다 . 설명을 위해 코드의 핵심 부분을 선별하여 간소화했습니다. 완전한 구현 세부 사항과 정확한 맥락을 확인하려면 전체 저장소를 참조하십시오. 또한 데모 서비스를 로컬에서 실행하는 단계별 지침은 README 파일을 참조하십시오.

온라인 LLM 서빙 서비스를 처음부터 구축하기

vLLM이나 Triton과 같은 현대적인 서빙 프레임워크( )는 LLMs 호스팅에 수반되는 복잡성을 상당 ...

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