Skip to Content
실무로 통하는 LLM 애플리케이션 설계
book

실무로 통하는 LLM 애플리케이션 설계

by 수하스 파이, 박조은
October 2025
Intermediate
424 pages
10h 19m
Korean
Hanbit Media, Inc.
Content preview from 실무로 통하는 LLM 애플리케이션 설계
243
7
고급 파인 튜닝 기법
LLM
이 생성하는 텍스트는 지금까지 생성된 출력과 프롬프트에 따라 조건화됩니다. 여기에
LLM
이 주목할 수 있는 추가 컨텍스트를 이러한 프리픽스 벡터 형태로 추가합니다. 입력에 접
두어로 붙는 이 새로운 토큰들을 가상 토큰
virtual
token
이나 소프트 프롬프트라고 합니다.
[그림
7
-
3
]은 트랜스포머에서 프리픽스 튜닝이 어떻게 이루어지는지 보여줍니다.
그림에서 볼 수 있듯이, 프리픽스 파라미터는 각 층에 추가됩니다. 프리픽스 튜닝은 병목 어댑
터보다 훨씬 더 파라미터 효율적이며, 일반적으로
2
% 이상인 어댑터와 비교해 모델 파라미터
0
.
1
% 이하만 차지합니다. 그러나 프리픽스 튜닝은 어댑터보다 효과적으로 훈련하기가 더
어렵습니다. 또한 프리픽스 튜닝은 가상 토큰을 수용하기 위해 모델의 시퀀스 길이를 줄여야
합니다.
어댑터와 마찬가지로, 초기화는 프리픽스 튜닝에서 매우 중요합니다. 가상 토큰은 모델이 파인
튜닝되는 작업과 관련된 단어를 선택해 초기화할 수 있습니다.
어댑터 라이브러리를 사용해 프리픽스 튜닝을 구현할 수 있습니다.
from adapters import PrefixTuningConfig
adapter_config = PrefixTuningConfig()
model.add_adapter(“prefix_tuning”, ...
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 Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer
How to Overcome a Power Deficit

How to Overcome a Power Deficit

Cyril Bouquet, Jean-Louis Barsoux
Relational Power Is the New Currency of Hybrid Work

Relational Power Is the New Currency of Hybrid Work

Lebene Soga, Yemisi Bolade-Ogunfodun, Nazrul Islam, Joseph Amankwah-Amoah

Publisher Resources

ISBN: 9791169214384