Skip to Content
Scikit-Learn과 PyTorch를 활용한 실전 머신러닝
book

Scikit-Learn과 PyTorch를 활용한 실전 머신러닝

by Aurélien Géron
October 2025
Intermediate to advanced
878 pages
16h 9m
Korean
O'Reilly Media, Inc.
Content preview from Scikit-Learn과 PyTorch를 활용한 실전 머신러닝

17장. 트랜스포머의 속도 향상

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

15장과 16장에서는 분류기, 번역기, 챗봇부터 비전 및 멀티모달 트랜스포머에 이르기까지 모든 종류의 트랜스포머를 구축했습니다. 트랜스포머는 놀라울 정도로 다재다능하고 강력하지만 완벽하지는 않습니다. 특히 긴 입력 시퀀스를 처리할 때는 속도가 매우 느려질 수 있습니다.

다행히도 모든 크기의 트랜스포머의 속도를 높이기 위한 많은 기술이 개발되었습니다:

  • 생성 트랜스포머의 디코딩 속도를 높이기 위해 키/값 캐싱과 추측 디코딩을 사용한 다음 텍스트 생성을 병렬화하는 몇 가지 접근 방식을 간략히 살펴보겠습니다.

  • 트랜스포머에서 가장 계산 비용이 많이 드는 구성 요소 중 하나인 다중 헤드 주의(MHA)를 가속화하기 위해 스파스 주의, 근사 주의, 공유 투영 및 플래시 주의에 대해 살펴봅니다.

  • 최대 수조 개의 파라미터로 구성된 거대한 트랜스포머의 속도를 높이기 위해 전문가 혼합(MoE)에 대해 알아볼 것입니다.

  • 대규모 트랜스포머를 효율적으로 훈련하기 위해 LoRA(Low-Rank Adaptation), 활성화 체크포인트, 시퀀스 패킹, 그라데이션 누적, 병렬 처리와 같은 어댑터를 사용한 파라미터 효율적 미세 조정(PEFT)에 대해 설명합니다.

트랜스포머의 속도를 높이는 또 다른 방법은 트랜스포머를 작게 만드는 것입니다. 이는 부록 B에서 설명하는 정밀도 감소 및 양자화를 사용하여 수행할 수 있습니다.

다룰 기술이 상당히 많고 상당히 고급 기술이기 때문에 트랜스포머를 처음 접하는 분이라면 지금은 이 장을 건너뛰고 나중에 필요할 때 언제든지 다시 보셔도 됩니다. 그렇기 때문에 이 장은 다른 장을 위한 공간을 확보하기 위해 https://homl.info 에서 온라인 전용으로 제공됩니다.

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

잘되는 머신러닝 팀엔 이유가 있다

잘되는 머신러닝 팀엔 이유가 있다

데이비드 탄, 에이다 양, 데이비드 콜스
생성형 AI를 위한 프롬프트 엔지니어링

생성형 AI를 위한 프롬프트 엔지니어링

제임스 피닉스, 마이크 테일러

Publisher Resources

ISBN: 0642572270094