UPDATE EVENT TITLE IN SLIDE MASTER
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
AWS Generative AI 서비스의 활용 방법과 데모
문곤수
APJ Senior AIML Specialist Solutions Architect
전현상
Korea FSI Solutions Architect
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 2
Agenda
1. Generative AI (Gen AI) 개요
2. AWS Gen AI 서비스
Amazon Bedrock
데모: Bedrock
Amazon SageMaker Jumpstart
데모: Jumpstart
3. 기업의 데이터로 Gen AI 개발 접근 방향
검색 증강 생성
데모: 은행 FAQ Chatbot
파인 튜닝
데모: 인스트럭션 파인 튜닝
모델 배포 및 운영
UPDATE EVENT TITLE IN SLIDE MASTER
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Generative AI (Gen AI) 개요
3
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Generative AI는?
텍스트 요약, 질문 답변, 디지털 아트
생성, 코드 생성 등과 같은
많은 실제 사례에 적용
수천억 개의 매개변수가 있는
대규모 데이터 세트에서
사전 훈련된 파운데이션 모델 로 구동
최소한의 파인 튜닝으로
특정 도메인에 대해 커스터마이징이
가능한 작업
실제 작업을 위해 사람이 만든
콘텐츠에 충분히 근접한
콘텐츠를 생성할 수 있는 AI
New Volvo car concept design by midjourney
Credit: @sugardesign_1 Instagram
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 5
Foundation model의 유형
Text-to-text
여러 어플리케이션에 적용될 수 있게
심플한 자연어 질의에 대한 답변 문장을 생성
“’걷기가 심장 건강에 미치는
영향’이라는 기사를 요약해 주세요”
“화성 평야를 말달리는 우주
조종사 사진”
Multimodal
자연어 질의에 대응하는 이미지/음악/코드를
생성. 입력과 출력의 모드가 다름
“GDP”
“작년 한국 GDP는… “
“2023년 올해 한국 GDP
예상치는… ”
“심장 건강을 유지하기
위해선 하루 만보를 걷는
것이 이상적입니다.”
Input Output
Foundation model
Text-to-embeddings
검색 및 문서 간 유사성 찾기와 같은
애플리케이션을 위한 텍스트의 숫자 표현
생성
[2.343, -0,239, 1.233 ….]
유사 검색 등에 이용
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Generative AI:
A timeline of large
language models
Source: Yang, Jingfeng, et al. "Harnessing the Power of LLMs in Practice: A Survey on
ChatGPT and Beyond." arXiv preprint arXiv:2304.13712 (2023).
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 7
Generative AI 의 참여 기업 유형
파운데이션 모델을 처음부터
스스로 구축하여 Tuner
와 Consumer 에게 제품으로
제공하는 기업.
Provider
Provider 가 생성한
파운데이션 모델을 이용하여
자사 데이터로 파인 튜닝 된
모델을 생성 및 배포하여
자사목적에 맞게 활용
Tuner
참여
유형
Consumer
Provider 및 Tuner 가 생성한
파운데이션 모델에 API 및
개발자 툴을 (e.g. Lang Chain)
사용하여 자사 AI
애플리케이션 개발
대표적인
Providers
HuggingFace
UPDATE EVENT TITLE IN SLIDE MASTER
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
AWS Gen AI 서비스
8
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 9
The AWS AI/ML Stack
ML FRAMEWORKS
& INFRASTRUCTURE
PyTorch, TensorFlow Amazon EC2 CPUs GPUs AWS Trainium
AWS Inferentia FPGA
Habana
Gaudi
Tuner
Consumer
AI
SERVICES
Core
Specialized
AI Services
BUSINESS PROCESSES
Amazon Personalize
Amazon Forecast
Amazon Fraud Detector
Amazon Lookout for Metrics
SEARCH
Amazon Kendra
CONVERSATION
Amazon Lex
Contact Lens
Voice ID
Amazon Transcribe Call Analytics
CODE + DEVOPS
Amazon CodeGuru
Amazon CodeWhisperer
Amazon DevOps Guru
INDUSTRIAL
Amazon Monitron
Amazon Lookout for Equipment
Amazon Lookout for Vision
HEALTH
Amazon HealthLake
Amazon Comprehend Medical
Amazon Transcribe Medical
Amazon Omics
TEXT
Amazon Translate Amazon Comprehend
SPEECH
Amazon Polly Amazon Transcribe
VISION
Amazon Textract Amazon Rekognition AWS
Panorama
Generative
AI
SCALING GENERATIVE AI
Amazon Bedrock
AMAZON BUILT FOUNDATIONAL MODEL
Amazon Titan
AMAZON
SAGEMAKER
STUDIO IDE
CANVAS
No-code ML for
business analysts
STUDIO LAB
Learn ML
GROUND TRUTH
Label data
Prepare data Geospatial ML
Store features
Build with
notebooks
Train models
Tune parameters Manage and monitor
Deploy in production
CI/CD | GOVERNANCE | RESPONSIBLE ML
JUMPSTART
Use pre-built models
in SageMaker
Provider
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 10
New AWS Offerings for Generative AI
CODE + DEVOPS
Amazon CodeGuru
Amazon DevOps Guru
ML FRAMEWORKS
& INFRASTRUCTURE
PyTorch, TensorFlow Amazon EC2 CPUs GPUs FPGA
Habana
Gaudi
Tuner
Consumer
AI
SERVICES
Core
Specialized
AI Services
BUSINESS PROCESSES
Amazon Personalize
Amazon Forecast
Amazon Fraud Detector
Amazon Lookout for Metrics
SEARCH
Amazon Kendra
CONVERSATION
Amazon Lex
Contact Lens
Voice ID
Amazon Transcribe Call Analytics
INDUSTRIAL
Amazon Monitron
Amazon Lookout for Equipment
Amazon Lookout for Vision
HEALTH
Amazon HealthLake
Amazon Comprehend Medical
Amazon Transcribe Medical
Amazon Omics
TEXT
Amazon Translate Amazon Comprehend
SPEECH
Amazon Polly Amazon Transcribe
VISION
Amazon Textract Amazon Rekognition AWS
Panorama
AMAZON
SAGEMAKER
STUDIO IDE
CANVAS
No-code ML for
business analysts
STUDIO LAB
Learn ML
GROUND TRUTH
Label data
Prepare data Geospatial ML
Store features
Build with
notebooks
Train models
Tune parameters Manage and monitor
Deploy in production
CI/CD | GOVERNANCE | RESPONSIBLE ML
JUMPSTART
Use pre-built models
in SageMaker
Provider
AI
SERVICES
Generative
AI
SCALING GENERATIVE AI
Amazon Bedrock
AMAZON BUILT FOUNDATIONAL MODEL
Amazon Titan
NEW NEW
Amazon CodeWhisperer
NEW
NEW
AMAZON
SAGEMAKER
ML FRAMEWORKS
& INFRASTRUCTURE
AWS Trainium
AWS Inferentia NEW
NEW
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
클라우드의 Generative AI 활용 방향
Fully customizable Fully-managed
Gen AI Building Platform
Amazon
SageMaker
JumpStart
Amazon
Bedrock
Amazon Foundation Model Hub
Provider
Amazon
SageMaker
(full control)
AWS Neuron
(Inferentia
&Trainium)
Tuner Consumer
FM Building Platform
FM Model 제공
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 12
Provider
Foundation Model
SageMaker
Customer
Tuner Customer
SageMaker
JumpStart
Consumer API Layer
Customer
Amazon Bedrock
(under private preview)
고객 수행
AWS 제공
모델 제공
가능
• Prompt/text embedding
• Fine-tune
• Fine-tune
• Model pretrained
• Prompt/text embedding
Tuning
Deployment
Consumer
참여 유형에 맞는 Generative AI 서비스
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
© 2023, Amazon Web Services, Inc. or its affiliates. Al rights reserved.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Amazon Bedrock
13
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 14
AWS Summit New York City 2023 – Keynote with Swami Sivasubramanian on July 26, 2023
https://www.youtube.com/watch?v=1PkABWCJINM
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 15
파운데이션 모델(FM)을 사용하여 생성 AI
애플리케이션을 구축하고 확장하는 쉬운 방법
Benefits
• API를 통해 FM을 사용하여 생성 AI 애플리케이션
개발 가속화
• 인프라를 관리할 필요가 없음
• Amazon 및 AI21 Labs, Anthropic, Stability AI의
FM 선택
• 데이터 유출 없이 조직의 데이터를 사용하여 FM
을 커스터마이징
• 포괄적인 AWS 보안 제어 및 서비스
API
Layer
Amazon
bedrock
Prompt / text
embedding
Fine-tune
Foundation
Models
Amazon Bedrock (under private preview)
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 16
Demo:
AWS Generative AI Demo Showcase
Under NDA (Non-Disclosure Agreement)
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 17
Anthropic
Claude
[한글]
AI
SERVICES
Core
Specialized
AI Services
BUSINESS PROCESSES
Amazon Personalize
Amazon Forecast
Amazon Fraud Detector
Amazon Lookout for Metrics
SEARCH
Amazon Kendra
CONVERSATION
Amazon Lex
Contact Lens
Voice ID
Amazon Transcribe Call Analytics
CODE + DEVOPS
Amazon CodeGuru
Amazon CodeWhisperer
Amazon DevOps Guru
INDUSTRIAL
Amazon Monitron
Amazon Lookout for Equipment
Amazon Lookout for Vision
HEALTH
Amazon HealthLake
Amazon Comprehend Medical
Amazon Transcribe Medical
Amazon Omics
TEXT
Amazon Translate Amazon Comprehend
SPEECH
Amazon Polly Amazon Transcribe
VISION
Amazon Textract Amazon Rekognition AWS
Panorama
Amazon Bedrock
+
Bedrock + AI 서비스 :
예: Rekognition, Transcribe, Polly, Kendra, etc
Gen AI Show Case Demo:
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Demo1 : 교보 생명 약관
참고: 이 데모는 발표자가 데모를 위해서 “교보 생명 약관”을 사용하였고, 교보
생명과는 이 데모관련해서 협의된 사항은 없습니다.
18
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Demo2 : Finance Analyst
19
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 20
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Amazon Bedrock 보안
21
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Amazon Bedrock 보안
22
인터넷 단절된 환경인
"고객 사설 네트워크(VPC)” 에서
Bedrock 접근
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
© 2023, Amazon Web Services, Inc. or its affiliates. Al rights reserved.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Amazon SageMaker Jumpstart
23
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 24
AWS Summit New York City 2023 – Keynote with Swami Sivasubramanian on July 26, 2023
https://www.youtube.com/watch?v=1PkABWCJINM
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 25
파 운 데 이 션 모 델 허 브 로 서 몇 번 의 클 릭 만 으 로
배 포 및 기 본 파 인 튜 닝 스 크 립 트 제 공
Benefits
• Generative AI 생태계의 다양한 파운데이션
모델 허브
• 사전 구축된 모델 파인 튜닝 및 추론 스크립트
제공
• 직관적이고 쉬운 UI 및 API 기반
• 빠르게 시작할 수 있는 예제가 포함된 노트북 제공
• 조직 내에서 파인 튜닝 모델 공유 및 협업
SageMaker
Training
and
Inference
Prompt / text
embeddings
API
Layer
SageMaker
Endpoint
Foundation Models
SageMaker JumpStart
Model hub, deploy, fine-tune
Accelerated Computing
Trn1(n), Inf2, P4d, P5
Fine-tune
Amazon SageMaker Jumpstart
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Demo2 : JumpStart
26
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 27
• 인터넷 연결 없이 개인 및 보안 네트워크
링크를 통한 모든 트래픽 전송
• S3에 대한 모든 트래픽은 특정 IP와 같은
액세스를 추가로 제한하기 위해 VPC
endpoint 를 사용
컴퓨팅 및 네트워크 격리
인증 및 승인
• 전송중인(in-transit) 데이터 및 저장(at-rest)
데이터를 모두 암호화
• 저장 데이터 암호화를 위한 고객 관리형 KMS
Key(CMKs) 또는 AWS 관리형 KMS Key
데이터 보호
감사 가능성
• VPC Config 및 기본 IAM 실행 역할과 같은
구성을 승인된 사용자에 한해서 허용
• 모든 SageMaker API 호출은 CloudTrail 에 기록
• CloudWatch 이벤트를 사용하여 불법 활동과 같은
리소스 상태 변경에 대한 자동화된 응답 트리거
가능
Amazon SageMaker JumpStart 보안
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 28
• 1. 모델 구독 (상용 모델만 해당)
• 2. 모델을 사용자 사설 네트워크 (VPC) 에 배포
• SageMaker Inference Service 의 Endpoint
Instance 에 연결하는 ENI (네트워트 인터페이스)
생성 됨.
• 3. 사용자 Application 이 배포된 모델에 추론
• 사용자 Application 은 ENI 및 Private Link 를
통하여 SageMaker Inference Service를 통해
추론. SageMaker Inference Service 에는 EC2
인스턴스를 호스팅 함.
JumpStart 모델 배포 아키텍처
모델 제공자 계정
SageMaker Escrow 계정
3.모델 추론
Private Link
2.모델 배포
1.모델 구독
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 29
Ref: https://aws.amazon.com/blogs/machine-learning/use-
generative-ai-foundation-models-in-vpc-mode-with-no-internet-
connectivity-using-amazon-sagemaker-jumpstart/
인터넷 단절된 환경인
"고객 사설 네트워크(VPC)”
에서 FM 모델 배포 및 서빙
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 30
SageMaker JumpStart Current capabilities
General purpose
publicly available
models
• Image generation (Stable Diffusion)
• Publicly-available zero-shot and Few-shot models
(LLaMa2, FLAN UL2, FLAN T5 XXL, GPT-J 6B, GPT-NeoX, BloomZ)
• Hugging Face task models
Proprietary and
Domain-specific
models
• Top proprietary models (AI21 Jurassic 2 models, Cohere Command XL)
• LightOn (Lyra)
Customization
features
• Retrieval augmented generation (RAG) notebooks using KNN and LangChain
• Instruction and domain adaptation finetuning for FLAN T5 XL and GPT-J
• Fine-tuning for Image generation (Stable Diffusion)
Deployment modes • Secure deployment in your VPC
• Proprietary models – SageMaker console, Playground UX
• Publicly available models - SageMaker Studio, Python SDK, Playground UX
• Batch transform and real time batch inference
Available today
오픈 모델
상용 모델
커스터마이제이션
배포 / 보안
UPDATE EVENT TITLE IN SLIDE MASTER
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
기업의 데이터로 Gen AI 개발 접근 방향
31
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
생성 AI 활용 단계
베이스라인: 사전 훈련된 모델로 “인컨텍스트 학습 (Zero-shot, Few-shot 등)”
최적 응답 결과 얻기 à “프롬프트 엔지니어링” 검토
모델 환각 개선 & 정확한 답변 필요 à “RAG 검토”
여러 작업이 필요한 도메인 특화 모델 à “도메인 코퍼스로 베이스모델 파인 튜닝”
신규 유형의 작업이 필요한 도메인 특화 모델 à “인스트럭션 파인 튜닝” 검토
시간
비용
리소스
인력
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 33
상황 별 적절한 Generative AI 활용
프롬프트 엔지니어링 검색증강생성(RAG) 파인 튜닝 사전 훈련/재훈련
목적
LLM의 유용한
응답을 생성하기
위한 지침/질문/맥락
생성
환각 없는 정확한 응답
생성
응답 품질 및 도메인
관련 결과 개선
모델 공급 (public /
proprietary)
훈련 기간 N/A N/A 대개 몇 분에서 몇 시간
모델 및 인프라에
따라 며칠에서 몇
달까지 소요
훈련 비용 없음 없음 중간 높음
커스터마이징
프롬프트
커스터마이징 (One
shot, Few Shot)
기업 내부 데이터를
이용하여 프롬프트
“맥락”을 위한
지식 DB 구축 및 검색
모델 일부
• 특정 작업 튜닝
(Instruction tuning)
• 도메인별 훈련 데이터 추가
(Domain Adaptation)
모델 전체
• 신경망 아키텍처
및 크기
• 어휘 크기 및
컨텍스트 길이
요구되는 ML
전문성
낮음 낮음-중간 중간 높음
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 34
• 지식 단절 (Knowledge cutoff)
• 예: LLM 이 2021 년도 이전의 데이터로 학습이 되었으면, 2023 년도의 최신 데이타는 생성할 수 없음.
•환각 (Hallucination)
•사용자 정의 부족 (Lack of user customization)
• 여러 사용 사례(예: 텍스트 요약, 분류)에 사용이 가능하고
깊이 있는 답변이 가능함.
• LLM의 내부 지식을 업데이트 및 확장하거나 특정 작업에
맞게 미세 조정하는 데 사용. 성능을 최적화하기 위해 질문-
답변 쌍이 제공되는 감독 학습 (Supervised Training) 필요
• 미세 조정은 단순히 컷오프를 나중으로 미루기 때문에 지식
컷오프 문제를 해결하지 못함. 환각을 완전히 제거할 수 없음
• 최신 데이터 반영 보다는 천천히 변화하는 데이터 세트에
권장.
Fine-Tuning (미세조정)
• 내부 지식 (기업내 데이터) 이용하여 최신 데이터 반영, 출처
인용 포함, 환각 억제, 업데이트 용이성, 빠르게 구현, 개인화에
사용 가능.
• 관련 정보를 검색하기 위해 벡터 데이터 베이스 구축 (예: 오픈
서치) , 및 지능형 검색 도구 에 의존(예: Amazon Kendra)
• 질문을 해결하는 데 필요한 정보가 있는 경우에만 질문에
답변할 수 있음. 답변에 문서에 대한 심층적인 이해가 필요한
경우 작동하지 않음.
•질문과 답변의 사례에만 제한 적임.
검색 증강 생성(Retrieval-Augmented Generation)
해결 방법
Application 개발 시 FM 의 어려움
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
© 2023, Amazon Web Services, Inc. or its affiliates. Al rights reserved.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
검색 증강 생성
(Retrieval Augmented Generation, RAG)
35
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
RAG 설명 – 특정 지식을 위한 LLM
LLM
Question
Answer
XX 회사 6월 매출은?
XX 회사 6월 매출은
약 12억원 입니다.
LLM은 특정 지식이 아닌 일반적인 추론을 위한 것입니다.
“환각 발생”
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
LLM
Question
Answer
Context
XX 회사 6월 매출은?
XX 회사 6월 매출 : 20억
XX 회사 6월
매출은 20 억 입니다.
Context 는 LLM에 특정 지식 및 최신 정보를 제공하는 방법입니다.
RAG 설명 – 특정 지식을 위한 LLM
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
RAG 구현 플로우
XX 회사 6월 매출은?
XX 회사 6월
매출은 20 억 입니다.
프롬프트 + 쿼리
최종 응답 결과
(프롬프트 + 쿼리) +
개선된 컨텍스트
문장 생성 모델
1
5
출력 문장 생성
6
7
임베딩 모델
관련 인덱스
검색
(FAISS 등)
개선된
컨텍스트
지식 소스(FAQ, PDF, Doc)
YY 회사
6월 매출은
30억
XX 회사
6월 매출은
20억
3
2
임베딩 벡터
4
임베딩 모델
Knowledge
base
Vector based storage
1
2
”6월 매출은 20억”
6월 매출은 20억
XX 회사 6월 매출은?
+
UPDATE EVENT TITLE IN SLIDE MASTER
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Demo: 은행 FAQ Chatbot
39
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 40
Demo : 은행 FAQ Chatbot
참고: 이 데모는 발표자가 데모를 위해서 “신한 은행 FAQ”을 사용하였고, 신한은행
과는 이 데모관련해서 협의된 사항은 없습니다.
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 41
은행 FAQ Chatbot demo Architecture
Query:
다른곳에서 받은 OTP 등록?
1
AWS Cloud
Amazon SageMaker Endpoint , GPU
(LLM for Embedding)
Amazon SageMaker Endpoint GPU
Korean LLM, ploy-glot 문장 생성기
Amazon OpenSearch Service
Query:
다른곳에서 받은 OTP 등록?
2
Embedding Search:
[2.333, -3.234, …]
3
4
Context:
category : 다른곳에서 받은 OTP의 등록방법
Info : 인터넷 뱅킹 로그인 -> 사용자관리 ->
뱅킹관리 -> OTP 등록 ⋯..
Prompt
Query: 고객 서비스 센터 직원처럼, '다른 곳에서 받은 OTP' 카테고리에 대한 Info를 찾아서 설명해주세요.
Context::
category : 다른곳에서 받은 OTP의 등록방법
Info : 인터넷 뱅킹 로그인 -> 사용자관리 -> 뱅킹관리 -> OTP 등록 ⋯..
5
타기관OTP 등록방법 알려드릴께요!
우선 인터넷 뱅킹 로그인 후 ’사용자 관리’ 메뉴로 이동하세요.
그리고 인터넷 뱅킹 관리 메뉴에서⋯⋯
Answer
6
타기관OTP 등록방법 알려드릴께요!
우선 인터넷 뱅킹 로그인 후 ’사용자 관리’
메뉴로 이동하세요. 그리고 인터넷 뱅킹 관리
메뉴에서⋯⋯
Answer
7
Amazon SageMaker Studio
(Documents to embeddings)
Amazon S3
(Bank FAQ Corpus)
category : 다른곳에서
받은 OTP
Info : 인터넷 뱅킹 로그인 ->
사용자관리 -> 뱅킹관리 ->
OTP 등록 ⋯..
S3//bucket/bank.csv
1
FAQ 전처리 to csv
2
FAQ data embedding
3
FAQ embedding data
index insert
rag 챗봇 로직
Rag 데이터 처리 로직
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 42
은행 FAQ Chatbot 인사이트:
Data Argumentation 필요
한국어의 조사 중 '란'은 상대적으로 사용빈도가 낮은 부분으로,
이는 자연어 처리에서 벡터 검색을 통한 분석 시 눈에 띄지 않게
만듭니다.
문장의 유형판단 분류 모델
Amazon SageMaker Endpoint
(LLM for Embedding)
Amazon SageMaker Endpoint
문장 분류기(ex : Bert multiclass)
금융대화 : 1
일반대화 : 2
금칙대화 : 3
대출대화 : 4
FAQ 의 검색 모델이 응답 문장이 유사하다고 판단하는 경우
여러 정보를 추천 검색합나다.
데어터 전처리 인력
웹컨텐츠 (css, hyperlink)로
구성된 데이터는 데이터
수집에 교정이 필요합니다.
문장 케이스별 조건 검색을 하면 LLM 대화의 정확도 상승
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
© 2023, Amazon Web Services, Inc. or its affiliates. Al rights reserved.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
파인 튜닝
43
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Domain Adaptation
Instruction tuning
Prompt Engineering (1)
Base
model
Domain
Corpus
Training
Fine tuned
model
Base model
Instructions
Training
Instruction
tuned model
Base model
Instructions
/ prompts /
Pre-Training (4)
Large corpus +
custom task or
corpus
Training
Trained Model
RAG (2)
Base
model
RAG
Fine-Tuning (3)
Model Customization 플로우
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Fine-Tuning (1) : Instruction-Tuning
§ 지침 (Instruction) 을 통해 설명된 데이터 세트 언어
모델을 미세 조정합니다.
§ Task 별 훈련 데이터가 필요함.
§ 작은 LLM 에서도 좋은 결과를 얻을 수 있음.
§ Unseen Task 에 대한 제로 샷 성능 향상
데이터 세트 예시:
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 46
Instruction tuning on SageMaker JumpStart
hyperparameters[‘peft_type’]
• lora : Lora 사용
• none : full fine-tuning
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Parameter-Efficient Fine-tuning (PEFT)?
47
Foundation Model
Foundation Model
Foundation Model
Foundation Model
Foundation Model
Foundation Model
ℎ
Normal Fine-tuning
Foundation Model
Foundation Model
Foundation Model
Foundation Model
PEFT ℎ! = ℎ + Δℎ
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
PEFT 사례: BLOOMZ-7B 파인 튜닝 및 배포
모델
아티팩트
Amazon S3
(모델 아티팩트)
SageMaker Training Job
3.9M 모델
파라미터
파인 튜닝
모델
아티팩트
SageMaker Endpoint
TorchServe*
Amazon SageMaker
Studio Lab
BLOOMZ-7B
모델 파라미터
(모델 허브)
Huggingface/notebooks
Fine-Tune BLOOM with
LoRA in SageMaker
AWS Cloud
BLOOMZ-7B
파라메터 통합
Int8 양자화
모델 배포
모델 허브로부터
모델 다운로드
Amazon S3
(훈련 데이터)
핸즈온: https://github.com/daekeun-ml/sm-distributed-train-bloom-peft-lora
Falcon-40B PEFT 사례: https://aws.amazon.com/blogs/machine-learning/interactively-fine-tune-falcon-40b-and-other-llms-on-amazon-sagemaker-studio-notebooks-using-qlora
사용자
Blog: https://aws.amazon.com/ko/blogs/tech/train-a-large-language-model-on-a-single-amazon-sagemaker-gpu
hugging-face-and-lora/
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 49
Demo : PEFT LoRA 학습 방법
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 50
Fine-Tuning (2) : Domain Adaptation
§ 언어 모델을 특정 산업, 맥락, 애플리케이션에 맞춤화하는
프로세스
§ 연계성 개선: 해당 도메인의 언어와 개념을 이해하고 생성할 수
있도록 보장
§ 엔터프라이즈 애플리케이션: 특수 분야에서의 감정 분석, 문서
분류, 정보 추출 등 작업에 필수적
§ 해석 오류 감소: 친숙하지 않은 용어, 특수용어, 또는 복잡한 도메인
지식 때문에 발생하는 에러 최소화
AMAZON.COM, INC. SCHEDULE II -- VALUATION AND QUALIFYING ACCOUNTS INVENTORY
VALUATION ALLOWANCE 61EX-10.9 2 OFFER OF EMPLOYMENT TO JOSEPH GALLI, JR. 1 EXHIBIT
10.9 [AMAZON.COM
LETTERHEAD] June 23, 1999 Mr. Joseph Galli 2809 Boston Street, Apt. 110
Baltimore, MD 21224 RE: OFFER OF EMPLOYMENT Dear Joe: On behalf of Amazon.com,
Inc. (the ""Company""), I am very pleased to offer you the position of President
and Chief Operating Officer. This letter, as amended and restated on September
30, 1999, clarifies and confirms the terms of your employment with the
Company. 1. START DATE Unless we mutually agree otherwise, you will commence
employment on June 24, 1999 (the ""Start Date""). 2. SALARY Your starting
salary will be $16,666.70 per month, ($200,000 annualized), payable monthly in
accordance with the Company's standard payroll practice and subject to
applicable withholding taxes. Because your position is exempt from overtime
pay
데이터 세트 (Unlabeled Data) 예시:
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 51
Blog: Domain-Adaptation
https://aws.amazon.com/blogs/machine-learning/domain-
adaptation-fine-tuning-of-foundation-models-in-amazon-
sagemaker-jumpstart-on-financial-data/
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Fine-tuning Model Blog Notebook
Instruction fine-tuning FLAN T5 XL Notebook
Domain adaptation fine-tuning (with AMT) GPT-J-6B Blog Notebook
Text-to-image dreambooth fine-tuning (with AMT) Stable Diffusion 2.1 Blog Notebook
Customization
Question answering using RAG All text-gen models Blog
Notebook-QnA on
custom dataset
Notebook-using
LangChain
Few shot learning GPT-J, GPT Neo
Notebook
Fine Tuning and RAG on JumpStart
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
© 2023, Amazon Web Services, Inc. or its affiliates. Al rights reserved.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
모델 배포 및 운영
53
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 54
SageMaker에 배포하여 비용 절감
Infrastructure cost
Operations cost
Infrastructure cost
Operations cost Security and
compliance cost
• Compute instances
• Storage
• Network
Operating, managing,
and maintaining
infrastructure
Security and compliance
for ML features, encrypt
data and models, access
policies, track and trace
Deploy on SageMaker
Self-managed deployment on
Amazon EKS or Amazon ECS
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
55
대규모 모델 호스팅 및 최적화 파이프라인 - SageMaker의 LMI 컨테이너
Model
download
Model
partitioning
(optional)
Quantization
(runtime)
Multi
(single) -
GPU
inference
Model
Optimization
(compilation,
quantization,
compression)
Model
loading &
serving
(orchestration,
serving, batching)
Prompt
engineering
Model hosting
In-training or
Post training Post-hosting
Faster
Transformer
Amazon S3
Hugging Face Hub
Amazon SageMaker Transformers-NeuronX
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 56
Single model
deployment
Single container Multi-container
Invoke
Response
Inference
Pipelines
Real-time synchronous response
Serverless GPUs CPUs
추론을 제공하기 위해 모델 배포
Near real-time asynchronous response
Invoke
Response
Offline batch inference
Submit
Complete
Amazon SageMaker
Multi-Model
deployment
Model
Container
Infrastructure
UPDATE EVENT TITLE IN SLIDE MASTER
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Thank you!
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
문곤수
moongons@amazon.com
전현상
hsjeon@amazon.com
UPDATE EVENT TITLE IN SLIDE MASTER
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Appendix
58
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Purpose-built accelerators for generative AI
AWS Inferentia
딥 러닝(DL) 모델 실행을 위한
클라우드에서 추론당 최저
비용
추론 당 비용이 동급의 Amazon EC2
인스턴스보다 최대 70% 저렴
AWS Trainium
LLM 및 Diffusion 모델의 가장
비용 효율적인 고성능 학습
활용
동급의 Amazon EC2 인스턴스 대비
최대 50% 학습 비용 절감
AWS Inferentia2
LLM 및 diffusion 모델을 위한
최저 추론 당 비용으로 높은
성능 제공
동급의 Amazon EC2 인스턴스 대비
최대 40% 낮은 가격 성능
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
CodeWhisperer:
ML-powered coding companion
이전 코드와 주석 등 컨텍스트 정보를 기반으로
코드 권장 사항 제공
GENERATES:
컨텍스트기반 신규 코드 생성
주석기반 코드 생성
함수 완성
Available in all major integrated
development environments (IDEs) as
an extension
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 61
Amazon Kendra를 활용한 빠른 RAG 구현
Amazon Kendra
Index with Data
Ingested
SageMaker에 호스팅된
대규모 모델
사용자
1
2
3
4
5
6
생성형 AI 애플리케이션
• 관리형 서비스로 단어 임베딩, 문서 청킹 등을 고려할 필요 없음
Source: https://aws.amazon.com/ko/blogs/tech/quickly-build-high-accuracy-generative-ai-applications-on-enterprise-data-
using-amazon-kendra-langchain-and-large-language-models/
금융사를 위한 AWS GENERATIVE AI DAY
FINANCIAL SERVICES |
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 62
Gen AI vs. Traditional ML 선택 고려 사항
Deterministic Non-Deterministic
Algorithms Generative AI
Machine Learning
Explainable Non-Explainable
다양한 비즈니스 과제 및 예상 결과에 대한 올바른 접근 방식 선택:
§ 데이터 세트에 기반한 체계적 편향
§ 파운데이션 모델에 포함된 지식의
실제 (예: 2021년도 이전 데이터로
학습)
§ 환각 (Hallucination)
§ Content moderation (욕설 등)
Risk
§ (논리적) 추론 또는 상식 없음
§ 파운데이션 모델에 특정 도메인별 지식이
없음 (예: 금융, 리테일)
§ 문맥 해석(예: 빈정거림) 어려움
§ 리소스/비용 집약적 모델 추론
Limitations

[금융사를 위한 AWS Generative AI Day 2023] 4_AWS Generative AI 서비스의 활용 방법과 데모_문곤수_전현상_AWS.pdf

  • 1.
    UPDATE EVENT TITLEIN SLIDE MASTER FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. AWS Generative AI 서비스의 활용 방법과 데모 문곤수 APJ Senior AIML Specialist Solutions Architect 전현상 Korea FSI Solutions Architect
  • 2.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 2 Agenda 1. Generative AI (Gen AI) 개요 2. AWS Gen AI 서비스 Amazon Bedrock 데모: Bedrock Amazon SageMaker Jumpstart 데모: Jumpstart 3. 기업의 데이터로 Gen AI 개발 접근 방향 검색 증강 생성 데모: 은행 FAQ Chatbot 파인 튜닝 데모: 인스트럭션 파인 튜닝 모델 배포 및 운영
  • 3.
    UPDATE EVENT TITLEIN SLIDE MASTER FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Generative AI (Gen AI) 개요 3
  • 4.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Generative AI는? 텍스트 요약, 질문 답변, 디지털 아트 생성, 코드 생성 등과 같은 많은 실제 사례에 적용 수천억 개의 매개변수가 있는 대규모 데이터 세트에서 사전 훈련된 파운데이션 모델 로 구동 최소한의 파인 튜닝으로 특정 도메인에 대해 커스터마이징이 가능한 작업 실제 작업을 위해 사람이 만든 콘텐츠에 충분히 근접한 콘텐츠를 생성할 수 있는 AI New Volvo car concept design by midjourney Credit: @sugardesign_1 Instagram
  • 5.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 5 Foundation model의 유형 Text-to-text 여러 어플리케이션에 적용될 수 있게 심플한 자연어 질의에 대한 답변 문장을 생성 “’걷기가 심장 건강에 미치는 영향’이라는 기사를 요약해 주세요” “화성 평야를 말달리는 우주 조종사 사진” Multimodal 자연어 질의에 대응하는 이미지/음악/코드를 생성. 입력과 출력의 모드가 다름 “GDP” “작년 한국 GDP는… “ “2023년 올해 한국 GDP 예상치는… ” “심장 건강을 유지하기 위해선 하루 만보를 걷는 것이 이상적입니다.” Input Output Foundation model Text-to-embeddings 검색 및 문서 간 유사성 찾기와 같은 애플리케이션을 위한 텍스트의 숫자 표현 생성 [2.343, -0,239, 1.233 ….] 유사 검색 등에 이용
  • 6.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Generative AI: A timeline of large language models Source: Yang, Jingfeng, et al. "Harnessing the Power of LLMs in Practice: A Survey on ChatGPT and Beyond." arXiv preprint arXiv:2304.13712 (2023).
  • 7.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 7 Generative AI 의 참여 기업 유형 파운데이션 모델을 처음부터 스스로 구축하여 Tuner 와 Consumer 에게 제품으로 제공하는 기업. Provider Provider 가 생성한 파운데이션 모델을 이용하여 자사 데이터로 파인 튜닝 된 모델을 생성 및 배포하여 자사목적에 맞게 활용 Tuner 참여 유형 Consumer Provider 및 Tuner 가 생성한 파운데이션 모델에 API 및 개발자 툴을 (e.g. Lang Chain) 사용하여 자사 AI 애플리케이션 개발 대표적인 Providers HuggingFace
  • 8.
    UPDATE EVENT TITLEIN SLIDE MASTER FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. AWS Gen AI 서비스 8
  • 9.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 9 The AWS AI/ML Stack ML FRAMEWORKS & INFRASTRUCTURE PyTorch, TensorFlow Amazon EC2 CPUs GPUs AWS Trainium AWS Inferentia FPGA Habana Gaudi Tuner Consumer AI SERVICES Core Specialized AI Services BUSINESS PROCESSES Amazon Personalize Amazon Forecast Amazon Fraud Detector Amazon Lookout for Metrics SEARCH Amazon Kendra CONVERSATION Amazon Lex Contact Lens Voice ID Amazon Transcribe Call Analytics CODE + DEVOPS Amazon CodeGuru Amazon CodeWhisperer Amazon DevOps Guru INDUSTRIAL Amazon Monitron Amazon Lookout for Equipment Amazon Lookout for Vision HEALTH Amazon HealthLake Amazon Comprehend Medical Amazon Transcribe Medical Amazon Omics TEXT Amazon Translate Amazon Comprehend SPEECH Amazon Polly Amazon Transcribe VISION Amazon Textract Amazon Rekognition AWS Panorama Generative AI SCALING GENERATIVE AI Amazon Bedrock AMAZON BUILT FOUNDATIONAL MODEL Amazon Titan AMAZON SAGEMAKER STUDIO IDE CANVAS No-code ML for business analysts STUDIO LAB Learn ML GROUND TRUTH Label data Prepare data Geospatial ML Store features Build with notebooks Train models Tune parameters Manage and monitor Deploy in production CI/CD | GOVERNANCE | RESPONSIBLE ML JUMPSTART Use pre-built models in SageMaker Provider
  • 10.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 10 New AWS Offerings for Generative AI CODE + DEVOPS Amazon CodeGuru Amazon DevOps Guru ML FRAMEWORKS & INFRASTRUCTURE PyTorch, TensorFlow Amazon EC2 CPUs GPUs FPGA Habana Gaudi Tuner Consumer AI SERVICES Core Specialized AI Services BUSINESS PROCESSES Amazon Personalize Amazon Forecast Amazon Fraud Detector Amazon Lookout for Metrics SEARCH Amazon Kendra CONVERSATION Amazon Lex Contact Lens Voice ID Amazon Transcribe Call Analytics INDUSTRIAL Amazon Monitron Amazon Lookout for Equipment Amazon Lookout for Vision HEALTH Amazon HealthLake Amazon Comprehend Medical Amazon Transcribe Medical Amazon Omics TEXT Amazon Translate Amazon Comprehend SPEECH Amazon Polly Amazon Transcribe VISION Amazon Textract Amazon Rekognition AWS Panorama AMAZON SAGEMAKER STUDIO IDE CANVAS No-code ML for business analysts STUDIO LAB Learn ML GROUND TRUTH Label data Prepare data Geospatial ML Store features Build with notebooks Train models Tune parameters Manage and monitor Deploy in production CI/CD | GOVERNANCE | RESPONSIBLE ML JUMPSTART Use pre-built models in SageMaker Provider AI SERVICES Generative AI SCALING GENERATIVE AI Amazon Bedrock AMAZON BUILT FOUNDATIONAL MODEL Amazon Titan NEW NEW Amazon CodeWhisperer NEW NEW AMAZON SAGEMAKER ML FRAMEWORKS & INFRASTRUCTURE AWS Trainium AWS Inferentia NEW NEW
  • 11.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 클라우드의 Generative AI 활용 방향 Fully customizable Fully-managed Gen AI Building Platform Amazon SageMaker JumpStart Amazon Bedrock Amazon Foundation Model Hub Provider Amazon SageMaker (full control) AWS Neuron (Inferentia &Trainium) Tuner Consumer FM Building Platform FM Model 제공
  • 12.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 12 Provider Foundation Model SageMaker Customer Tuner Customer SageMaker JumpStart Consumer API Layer Customer Amazon Bedrock (under private preview) 고객 수행 AWS 제공 모델 제공 가능 • Prompt/text embedding • Fine-tune • Fine-tune • Model pretrained • Prompt/text embedding Tuning Deployment Consumer 참여 유형에 맞는 Generative AI 서비스
  • 13.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2023, Amazon Web Services, Inc. or its affiliates. Al rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon Bedrock 13
  • 14.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 14 AWS Summit New York City 2023 – Keynote with Swami Sivasubramanian on July 26, 2023 https://www.youtube.com/watch?v=1PkABWCJINM
  • 15.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 15 파운데이션 모델(FM)을 사용하여 생성 AI 애플리케이션을 구축하고 확장하는 쉬운 방법 Benefits • API를 통해 FM을 사용하여 생성 AI 애플리케이션 개발 가속화 • 인프라를 관리할 필요가 없음 • Amazon 및 AI21 Labs, Anthropic, Stability AI의 FM 선택 • 데이터 유출 없이 조직의 데이터를 사용하여 FM 을 커스터마이징 • 포괄적인 AWS 보안 제어 및 서비스 API Layer Amazon bedrock Prompt / text embedding Fine-tune Foundation Models Amazon Bedrock (under private preview)
  • 16.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 16 Demo: AWS Generative AI Demo Showcase Under NDA (Non-Disclosure Agreement)
  • 17.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 17 Anthropic Claude [한글] AI SERVICES Core Specialized AI Services BUSINESS PROCESSES Amazon Personalize Amazon Forecast Amazon Fraud Detector Amazon Lookout for Metrics SEARCH Amazon Kendra CONVERSATION Amazon Lex Contact Lens Voice ID Amazon Transcribe Call Analytics CODE + DEVOPS Amazon CodeGuru Amazon CodeWhisperer Amazon DevOps Guru INDUSTRIAL Amazon Monitron Amazon Lookout for Equipment Amazon Lookout for Vision HEALTH Amazon HealthLake Amazon Comprehend Medical Amazon Transcribe Medical Amazon Omics TEXT Amazon Translate Amazon Comprehend SPEECH Amazon Polly Amazon Transcribe VISION Amazon Textract Amazon Rekognition AWS Panorama Amazon Bedrock + Bedrock + AI 서비스 : 예: Rekognition, Transcribe, Polly, Kendra, etc Gen AI Show Case Demo:
  • 18.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Demo1 : 교보 생명 약관 참고: 이 데모는 발표자가 데모를 위해서 “교보 생명 약관”을 사용하였고, 교보 생명과는 이 데모관련해서 협의된 사항은 없습니다. 18
  • 19.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Demo2 : Finance Analyst 19
  • 20.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 20
  • 21.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon Bedrock 보안 21
  • 22.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon Bedrock 보안 22 인터넷 단절된 환경인 "고객 사설 네트워크(VPC)” 에서 Bedrock 접근
  • 23.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2023, Amazon Web Services, Inc. or its affiliates. Al rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon SageMaker Jumpstart 23
  • 24.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 24 AWS Summit New York City 2023 – Keynote with Swami Sivasubramanian on July 26, 2023 https://www.youtube.com/watch?v=1PkABWCJINM
  • 25.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 25 파 운 데 이 션 모 델 허 브 로 서 몇 번 의 클 릭 만 으 로 배 포 및 기 본 파 인 튜 닝 스 크 립 트 제 공 Benefits • Generative AI 생태계의 다양한 파운데이션 모델 허브 • 사전 구축된 모델 파인 튜닝 및 추론 스크립트 제공 • 직관적이고 쉬운 UI 및 API 기반 • 빠르게 시작할 수 있는 예제가 포함된 노트북 제공 • 조직 내에서 파인 튜닝 모델 공유 및 협업 SageMaker Training and Inference Prompt / text embeddings API Layer SageMaker Endpoint Foundation Models SageMaker JumpStart Model hub, deploy, fine-tune Accelerated Computing Trn1(n), Inf2, P4d, P5 Fine-tune Amazon SageMaker Jumpstart
  • 26.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Demo2 : JumpStart 26
  • 27.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 27 • 인터넷 연결 없이 개인 및 보안 네트워크 링크를 통한 모든 트래픽 전송 • S3에 대한 모든 트래픽은 특정 IP와 같은 액세스를 추가로 제한하기 위해 VPC endpoint 를 사용 컴퓨팅 및 네트워크 격리 인증 및 승인 • 전송중인(in-transit) 데이터 및 저장(at-rest) 데이터를 모두 암호화 • 저장 데이터 암호화를 위한 고객 관리형 KMS Key(CMKs) 또는 AWS 관리형 KMS Key 데이터 보호 감사 가능성 • VPC Config 및 기본 IAM 실행 역할과 같은 구성을 승인된 사용자에 한해서 허용 • 모든 SageMaker API 호출은 CloudTrail 에 기록 • CloudWatch 이벤트를 사용하여 불법 활동과 같은 리소스 상태 변경에 대한 자동화된 응답 트리거 가능 Amazon SageMaker JumpStart 보안
  • 28.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 28 • 1. 모델 구독 (상용 모델만 해당) • 2. 모델을 사용자 사설 네트워크 (VPC) 에 배포 • SageMaker Inference Service 의 Endpoint Instance 에 연결하는 ENI (네트워트 인터페이스) 생성 됨. • 3. 사용자 Application 이 배포된 모델에 추론 • 사용자 Application 은 ENI 및 Private Link 를 통하여 SageMaker Inference Service를 통해 추론. SageMaker Inference Service 에는 EC2 인스턴스를 호스팅 함. JumpStart 모델 배포 아키텍처 모델 제공자 계정 SageMaker Escrow 계정 3.모델 추론 Private Link 2.모델 배포 1.모델 구독
  • 29.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 29 Ref: https://aws.amazon.com/blogs/machine-learning/use- generative-ai-foundation-models-in-vpc-mode-with-no-internet- connectivity-using-amazon-sagemaker-jumpstart/ 인터넷 단절된 환경인 "고객 사설 네트워크(VPC)” 에서 FM 모델 배포 및 서빙
  • 30.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 30 SageMaker JumpStart Current capabilities General purpose publicly available models • Image generation (Stable Diffusion) • Publicly-available zero-shot and Few-shot models (LLaMa2, FLAN UL2, FLAN T5 XXL, GPT-J 6B, GPT-NeoX, BloomZ) • Hugging Face task models Proprietary and Domain-specific models • Top proprietary models (AI21 Jurassic 2 models, Cohere Command XL) • LightOn (Lyra) Customization features • Retrieval augmented generation (RAG) notebooks using KNN and LangChain • Instruction and domain adaptation finetuning for FLAN T5 XL and GPT-J • Fine-tuning for Image generation (Stable Diffusion) Deployment modes • Secure deployment in your VPC • Proprietary models – SageMaker console, Playground UX • Publicly available models - SageMaker Studio, Python SDK, Playground UX • Batch transform and real time batch inference Available today 오픈 모델 상용 모델 커스터마이제이션 배포 / 보안
  • 31.
    UPDATE EVENT TITLEIN SLIDE MASTER FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 기업의 데이터로 Gen AI 개발 접근 방향 31
  • 32.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 생성 AI 활용 단계 베이스라인: 사전 훈련된 모델로 “인컨텍스트 학습 (Zero-shot, Few-shot 등)” 최적 응답 결과 얻기 à “프롬프트 엔지니어링” 검토 모델 환각 개선 & 정확한 답변 필요 à “RAG 검토” 여러 작업이 필요한 도메인 특화 모델 à “도메인 코퍼스로 베이스모델 파인 튜닝” 신규 유형의 작업이 필요한 도메인 특화 모델 à “인스트럭션 파인 튜닝” 검토 시간 비용 리소스 인력
  • 33.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 33 상황 별 적절한 Generative AI 활용 프롬프트 엔지니어링 검색증강생성(RAG) 파인 튜닝 사전 훈련/재훈련 목적 LLM의 유용한 응답을 생성하기 위한 지침/질문/맥락 생성 환각 없는 정확한 응답 생성 응답 품질 및 도메인 관련 결과 개선 모델 공급 (public / proprietary) 훈련 기간 N/A N/A 대개 몇 분에서 몇 시간 모델 및 인프라에 따라 며칠에서 몇 달까지 소요 훈련 비용 없음 없음 중간 높음 커스터마이징 프롬프트 커스터마이징 (One shot, Few Shot) 기업 내부 데이터를 이용하여 프롬프트 “맥락”을 위한 지식 DB 구축 및 검색 모델 일부 • 특정 작업 튜닝 (Instruction tuning) • 도메인별 훈련 데이터 추가 (Domain Adaptation) 모델 전체 • 신경망 아키텍처 및 크기 • 어휘 크기 및 컨텍스트 길이 요구되는 ML 전문성 낮음 낮음-중간 중간 높음
  • 34.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 34 • 지식 단절 (Knowledge cutoff) • 예: LLM 이 2021 년도 이전의 데이터로 학습이 되었으면, 2023 년도의 최신 데이타는 생성할 수 없음. •환각 (Hallucination) •사용자 정의 부족 (Lack of user customization) • 여러 사용 사례(예: 텍스트 요약, 분류)에 사용이 가능하고 깊이 있는 답변이 가능함. • LLM의 내부 지식을 업데이트 및 확장하거나 특정 작업에 맞게 미세 조정하는 데 사용. 성능을 최적화하기 위해 질문- 답변 쌍이 제공되는 감독 학습 (Supervised Training) 필요 • 미세 조정은 단순히 컷오프를 나중으로 미루기 때문에 지식 컷오프 문제를 해결하지 못함. 환각을 완전히 제거할 수 없음 • 최신 데이터 반영 보다는 천천히 변화하는 데이터 세트에 권장. Fine-Tuning (미세조정) • 내부 지식 (기업내 데이터) 이용하여 최신 데이터 반영, 출처 인용 포함, 환각 억제, 업데이트 용이성, 빠르게 구현, 개인화에 사용 가능. • 관련 정보를 검색하기 위해 벡터 데이터 베이스 구축 (예: 오픈 서치) , 및 지능형 검색 도구 에 의존(예: Amazon Kendra) • 질문을 해결하는 데 필요한 정보가 있는 경우에만 질문에 답변할 수 있음. 답변에 문서에 대한 심층적인 이해가 필요한 경우 작동하지 않음. •질문과 답변의 사례에만 제한 적임. 검색 증강 생성(Retrieval-Augmented Generation) 해결 방법 Application 개발 시 FM 의 어려움
  • 35.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2023, Amazon Web Services, Inc. or its affiliates. Al rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 검색 증강 생성 (Retrieval Augmented Generation, RAG) 35
  • 36.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. RAG 설명 – 특정 지식을 위한 LLM LLM Question Answer XX 회사 6월 매출은? XX 회사 6월 매출은 약 12억원 입니다. LLM은 특정 지식이 아닌 일반적인 추론을 위한 것입니다. “환각 발생”
  • 37.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. LLM Question Answer Context XX 회사 6월 매출은? XX 회사 6월 매출 : 20억 XX 회사 6월 매출은 20 억 입니다. Context 는 LLM에 특정 지식 및 최신 정보를 제공하는 방법입니다. RAG 설명 – 특정 지식을 위한 LLM
  • 38.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. RAG 구현 플로우 XX 회사 6월 매출은? XX 회사 6월 매출은 20 억 입니다. 프롬프트 + 쿼리 최종 응답 결과 (프롬프트 + 쿼리) + 개선된 컨텍스트 문장 생성 모델 1 5 출력 문장 생성 6 7 임베딩 모델 관련 인덱스 검색 (FAISS 등) 개선된 컨텍스트 지식 소스(FAQ, PDF, Doc) YY 회사 6월 매출은 30억 XX 회사 6월 매출은 20억 3 2 임베딩 벡터 4 임베딩 모델 Knowledge base Vector based storage 1 2 ”6월 매출은 20억” 6월 매출은 20억 XX 회사 6월 매출은? +
  • 39.
    UPDATE EVENT TITLEIN SLIDE MASTER FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Demo: 은행 FAQ Chatbot 39
  • 40.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 40 Demo : 은행 FAQ Chatbot 참고: 이 데모는 발표자가 데모를 위해서 “신한 은행 FAQ”을 사용하였고, 신한은행 과는 이 데모관련해서 협의된 사항은 없습니다.
  • 41.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 41 은행 FAQ Chatbot demo Architecture Query: 다른곳에서 받은 OTP 등록? 1 AWS Cloud Amazon SageMaker Endpoint , GPU (LLM for Embedding) Amazon SageMaker Endpoint GPU Korean LLM, ploy-glot 문장 생성기 Amazon OpenSearch Service Query: 다른곳에서 받은 OTP 등록? 2 Embedding Search: [2.333, -3.234, …] 3 4 Context: category : 다른곳에서 받은 OTP의 등록방법 Info : 인터넷 뱅킹 로그인 -> 사용자관리 -> 뱅킹관리 -> OTP 등록 ⋯.. Prompt Query: 고객 서비스 센터 직원처럼, '다른 곳에서 받은 OTP' 카테고리에 대한 Info를 찾아서 설명해주세요. Context:: category : 다른곳에서 받은 OTP의 등록방법 Info : 인터넷 뱅킹 로그인 -> 사용자관리 -> 뱅킹관리 -> OTP 등록 ⋯.. 5 타기관OTP 등록방법 알려드릴께요! 우선 인터넷 뱅킹 로그인 후 ’사용자 관리’ 메뉴로 이동하세요. 그리고 인터넷 뱅킹 관리 메뉴에서⋯⋯ Answer 6 타기관OTP 등록방법 알려드릴께요! 우선 인터넷 뱅킹 로그인 후 ’사용자 관리’ 메뉴로 이동하세요. 그리고 인터넷 뱅킹 관리 메뉴에서⋯⋯ Answer 7 Amazon SageMaker Studio (Documents to embeddings) Amazon S3 (Bank FAQ Corpus) category : 다른곳에서 받은 OTP Info : 인터넷 뱅킹 로그인 -> 사용자관리 -> 뱅킹관리 -> OTP 등록 ⋯.. S3//bucket/bank.csv 1 FAQ 전처리 to csv 2 FAQ data embedding 3 FAQ embedding data index insert rag 챗봇 로직 Rag 데이터 처리 로직
  • 42.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 42 은행 FAQ Chatbot 인사이트: Data Argumentation 필요 한국어의 조사 중 '란'은 상대적으로 사용빈도가 낮은 부분으로, 이는 자연어 처리에서 벡터 검색을 통한 분석 시 눈에 띄지 않게 만듭니다. 문장의 유형판단 분류 모델 Amazon SageMaker Endpoint (LLM for Embedding) Amazon SageMaker Endpoint 문장 분류기(ex : Bert multiclass) 금융대화 : 1 일반대화 : 2 금칙대화 : 3 대출대화 : 4 FAQ 의 검색 모델이 응답 문장이 유사하다고 판단하는 경우 여러 정보를 추천 검색합나다. 데어터 전처리 인력 웹컨텐츠 (css, hyperlink)로 구성된 데이터는 데이터 수집에 교정이 필요합니다. 문장 케이스별 조건 검색을 하면 LLM 대화의 정확도 상승
  • 43.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2023, Amazon Web Services, Inc. or its affiliates. Al rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 파인 튜닝 43
  • 44.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Domain Adaptation Instruction tuning Prompt Engineering (1) Base model Domain Corpus Training Fine tuned model Base model Instructions Training Instruction tuned model Base model Instructions / prompts / Pre-Training (4) Large corpus + custom task or corpus Training Trained Model RAG (2) Base model RAG Fine-Tuning (3) Model Customization 플로우
  • 45.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Fine-Tuning (1) : Instruction-Tuning § 지침 (Instruction) 을 통해 설명된 데이터 세트 언어 모델을 미세 조정합니다. § Task 별 훈련 데이터가 필요함. § 작은 LLM 에서도 좋은 결과를 얻을 수 있음. § Unseen Task 에 대한 제로 샷 성능 향상 데이터 세트 예시:
  • 46.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 46 Instruction tuning on SageMaker JumpStart hyperparameters[‘peft_type’] • lora : Lora 사용 • none : full fine-tuning
  • 47.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Parameter-Efficient Fine-tuning (PEFT)? 47 Foundation Model Foundation Model Foundation Model Foundation Model Foundation Model Foundation Model ℎ Normal Fine-tuning Foundation Model Foundation Model Foundation Model Foundation Model PEFT ℎ! = ℎ + Δℎ
  • 48.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. PEFT 사례: BLOOMZ-7B 파인 튜닝 및 배포 모델 아티팩트 Amazon S3 (모델 아티팩트) SageMaker Training Job 3.9M 모델 파라미터 파인 튜닝 모델 아티팩트 SageMaker Endpoint TorchServe* Amazon SageMaker Studio Lab BLOOMZ-7B 모델 파라미터 (모델 허브) Huggingface/notebooks Fine-Tune BLOOM with LoRA in SageMaker AWS Cloud BLOOMZ-7B 파라메터 통합 Int8 양자화 모델 배포 모델 허브로부터 모델 다운로드 Amazon S3 (훈련 데이터) 핸즈온: https://github.com/daekeun-ml/sm-distributed-train-bloom-peft-lora Falcon-40B PEFT 사례: https://aws.amazon.com/blogs/machine-learning/interactively-fine-tune-falcon-40b-and-other-llms-on-amazon-sagemaker-studio-notebooks-using-qlora 사용자 Blog: https://aws.amazon.com/ko/blogs/tech/train-a-large-language-model-on-a-single-amazon-sagemaker-gpu hugging-face-and-lora/
  • 49.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 49 Demo : PEFT LoRA 학습 방법
  • 50.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 50 Fine-Tuning (2) : Domain Adaptation § 언어 모델을 특정 산업, 맥락, 애플리케이션에 맞춤화하는 프로세스 § 연계성 개선: 해당 도메인의 언어와 개념을 이해하고 생성할 수 있도록 보장 § 엔터프라이즈 애플리케이션: 특수 분야에서의 감정 분석, 문서 분류, 정보 추출 등 작업에 필수적 § 해석 오류 감소: 친숙하지 않은 용어, 특수용어, 또는 복잡한 도메인 지식 때문에 발생하는 에러 최소화 AMAZON.COM, INC. SCHEDULE II -- VALUATION AND QUALIFYING ACCOUNTS INVENTORY VALUATION ALLOWANCE 61EX-10.9 2 OFFER OF EMPLOYMENT TO JOSEPH GALLI, JR. 1 EXHIBIT 10.9 [AMAZON.COM LETTERHEAD] June 23, 1999 Mr. Joseph Galli 2809 Boston Street, Apt. 110 Baltimore, MD 21224 RE: OFFER OF EMPLOYMENT Dear Joe: On behalf of Amazon.com, Inc. (the ""Company""), I am very pleased to offer you the position of President and Chief Operating Officer. This letter, as amended and restated on September 30, 1999, clarifies and confirms the terms of your employment with the Company. 1. START DATE Unless we mutually agree otherwise, you will commence employment on June 24, 1999 (the ""Start Date""). 2. SALARY Your starting salary will be $16,666.70 per month, ($200,000 annualized), payable monthly in accordance with the Company's standard payroll practice and subject to applicable withholding taxes. Because your position is exempt from overtime pay 데이터 세트 (Unlabeled Data) 예시:
  • 51.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 51 Blog: Domain-Adaptation https://aws.amazon.com/blogs/machine-learning/domain- adaptation-fine-tuning-of-foundation-models-in-amazon- sagemaker-jumpstart-on-financial-data/
  • 52.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Fine-tuning Model Blog Notebook Instruction fine-tuning FLAN T5 XL Notebook Domain adaptation fine-tuning (with AMT) GPT-J-6B Blog Notebook Text-to-image dreambooth fine-tuning (with AMT) Stable Diffusion 2.1 Blog Notebook Customization Question answering using RAG All text-gen models Blog Notebook-QnA on custom dataset Notebook-using LangChain Few shot learning GPT-J, GPT Neo Notebook Fine Tuning and RAG on JumpStart
  • 53.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2023, Amazon Web Services, Inc. or its affiliates. Al rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 모델 배포 및 운영 53
  • 54.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 54 SageMaker에 배포하여 비용 절감 Infrastructure cost Operations cost Infrastructure cost Operations cost Security and compliance cost • Compute instances • Storage • Network Operating, managing, and maintaining infrastructure Security and compliance for ML features, encrypt data and models, access policies, track and trace Deploy on SageMaker Self-managed deployment on Amazon EKS or Amazon ECS
  • 55.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 55 대규모 모델 호스팅 및 최적화 파이프라인 - SageMaker의 LMI 컨테이너 Model download Model partitioning (optional) Quantization (runtime) Multi (single) - GPU inference Model Optimization (compilation, quantization, compression) Model loading & serving (orchestration, serving, batching) Prompt engineering Model hosting In-training or Post training Post-hosting Faster Transformer Amazon S3 Hugging Face Hub Amazon SageMaker Transformers-NeuronX
  • 56.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 56 Single model deployment Single container Multi-container Invoke Response Inference Pipelines Real-time synchronous response Serverless GPUs CPUs 추론을 제공하기 위해 모델 배포 Near real-time asynchronous response Invoke Response Offline batch inference Submit Complete Amazon SageMaker Multi-Model deployment Model Container Infrastructure
  • 57.
    UPDATE EVENT TITLEIN SLIDE MASTER FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Thank you! © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 문곤수 moongons@amazon.com 전현상 hsjeon@amazon.com
  • 58.
    UPDATE EVENT TITLEIN SLIDE MASTER FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Appendix 58
  • 59.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Purpose-built accelerators for generative AI AWS Inferentia 딥 러닝(DL) 모델 실행을 위한 클라우드에서 추론당 최저 비용 추론 당 비용이 동급의 Amazon EC2 인스턴스보다 최대 70% 저렴 AWS Trainium LLM 및 Diffusion 모델의 가장 비용 효율적인 고성능 학습 활용 동급의 Amazon EC2 인스턴스 대비 최대 50% 학습 비용 절감 AWS Inferentia2 LLM 및 diffusion 모델을 위한 최저 추론 당 비용으로 높은 성능 제공 동급의 Amazon EC2 인스턴스 대비 최대 40% 낮은 가격 성능
  • 60.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. CodeWhisperer: ML-powered coding companion 이전 코드와 주석 등 컨텍스트 정보를 기반으로 코드 권장 사항 제공 GENERATES: 컨텍스트기반 신규 코드 생성 주석기반 코드 생성 함수 완성 Available in all major integrated development environments (IDEs) as an extension
  • 61.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 61 Amazon Kendra를 활용한 빠른 RAG 구현 Amazon Kendra Index with Data Ingested SageMaker에 호스팅된 대규모 모델 사용자 1 2 3 4 5 6 생성형 AI 애플리케이션 • 관리형 서비스로 단어 임베딩, 문서 청킹 등을 고려할 필요 없음 Source: https://aws.amazon.com/ko/blogs/tech/quickly-build-high-accuracy-generative-ai-applications-on-enterprise-data- using-amazon-kendra-langchain-and-large-language-models/
  • 62.
    금융사를 위한 AWSGENERATIVE AI DAY FINANCIAL SERVICES | © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 62 Gen AI vs. Traditional ML 선택 고려 사항 Deterministic Non-Deterministic Algorithms Generative AI Machine Learning Explainable Non-Explainable 다양한 비즈니스 과제 및 예상 결과에 대한 올바른 접근 방식 선택: § 데이터 세트에 기반한 체계적 편향 § 파운데이션 모델에 포함된 지식의 실제 (예: 2021년도 이전 데이터로 학습) § 환각 (Hallucination) § Content moderation (욕설 등) Risk § (논리적) 추론 또는 상식 없음 § 파운데이션 모델에 특정 도메인별 지식이 없음 (예: 금융, 리테일) § 문맥 해석(예: 빈정거림) 어려움 § 리소스/비용 집약적 모델 추론 Limitations