Skip to Content
파이토치로 배우는 LLM & AI
book

파이토치로 배우는 LLM & AI

by 로런스 모로니, 박해선
March 2026
Intermediate
504 pages
11h 26m
Korean
Hanbit Media, Inc.
Content preview from 파이토치로 배우는 LLM & AI
389
15
장
트랜스포머와 transformers
15.5
핵심 개념
transformers
를 사용할 때 활용할 수 있는 중요한 여러 핵심 개념이 있습니다.
transformers
의 단순한 설계가 필요할 때까지 핵심 개념을 감춰주지만 여기서 일부 개념을 조금 자세히 알아
보겠습니다.
14
장에서 배웠던 파이프라인으로 시작해 봅니다.
15.5.1
파이프라인
pipeline
함수는
transformers
의 추상화 중 가장 유용합니다. 최소한의 코드로 복잡한
transformers
연산을 수행할 수 있습니다. 적절한 파이프라인과 기본 매개변수 값을 사용하
여 모델의 기본 기능을 수행하게 하거나 기본 매개변수 값을 재정의하여 기능을 커스터마이징
할 수도 있습니다.
파이프라인은 데이터 전처리부터 모델 추론, 결과 포맷팅까지 모든 머신러닝 처리 단계를 하나
의 함수로 캡슐화합니다.
파이프라인의 강력한 성능을 실제로 확인하기 위해 하나의 예를 들어 보죠.
from transformers import pipeline
# 기본 감성 분석
classifier = pipeline("sentiment-analysis")
result = classifier("I love working with transformers!")
이 경우 모델이 아니라 작업 (
sentiment
-
analysis
)
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

PyTorch의 코더를 위한 AI 및 ML

PyTorch의 코더를 위한 AI 및 ML

Laurence Moroney
헤드 퍼스트 자바(3판)

헤드 퍼스트 자바(3판)

케이시 시에라, 버트 베이츠

Publisher Resources

ISBN: 9791175790223