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
167
6
장
임베딩을 사용한 감성 프로그래밍
임베딩을 사용한 감성 프로그래밍
CHAPTER
6
5
장에서 단어를 토큰으로 인코딩하는 방법을 알아보았습니다. 그다음 단어로 구성된 문장을
토큰의 시퀀스로 인코딩하는 방법을 배웠습니다. 신경망 훈련에 사용 가능한 데이터 형태를 갖
추도록 적절하게 시퀀스에 패딩을 추가하거나 길이를 줄였습니다. 이런 방법은 단어의 의미를
모델링하는 방법은 아닙니다. 단어의 의미를 절대적인 수치로 인코딩하는 방법은 없지만 상대
적인 방법은 가능합니다.
이번 장에서 이 방법을 살펴봅니다. 특히 고차원 공간의 벡터로 단어를 표현하는
임베딩
embed-
ding
에 대해 다룹니다. 말뭉치에서 단어가 사용되는 방식을 기반으로 이 벡터의 방향을 학습시
킬 수 있습니다. 그리고 문장이 주어지면 단어 벡터의 방향을 조사하고 이를 모두 더합니다. 이
런 덧셈이 만드는 전반적인 방향이 단어로 구성된 문장의 감성을 형성합니다. 또한 이와 관련
하여 모델이 문장을 읽을 때 문장에 있는 단어의 위치도 적절한 임베딩을 훈련하는 데 도움이
될 수 있습니다.
이 장에서는 감성 프로그래밍의 작동 방식을 알아봅니다.
5
장에서 사용한
Sarcasm
데이터셋
을 사용해 임베딩으로 문장에서 빈정거림을 감지하는 모델을 만듭니다. 말뭉치의 단어가 벡터
에 매핑되는 방식을 이해하는 데 도움이 ...
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 에이전트 엔지니어링

마이클 알바다
핸즈온 LLM

핸즈온 LLM

제이 알아마르, 마르턴 흐루턴도르스트
만들면서 배우는 생성 AI

만들면서 배우는 생성 AI

데이비드 포스터

Publisher Resources

ISBN: 9791175790223