Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
20240713 Generative AI with AWS
Search
@twingo_b
July 13, 2024
Technology
6
580
20240713 Generative AI with AWS
2024/7/13 JAWS-UG Okayama 2024
@twingo_b
July 13, 2024
Tweet
Share
More Decks by @twingo_b
See All by @twingo_b
Amazon RDS / Amazon Aurora パフォーマンスチューニングとモニタリング
twingob
8
2.3k
短縮 URL サービス 4分間クッキング - Amazon CloudFront KeyValueStore, CloudFront Functions, AWS CDK で作成、CloudWatch Logs で簡易アクセス集計 -
twingob
1
1k
失敗知識から学ぶ!クラウドアプリ設計で避けるべき事例とその対策
twingob
11
5.3k
Amazon CodeCatalyst と Amazon CodeWhisperer で開発を加速しよう!
twingob
1
750
AWS Copilot with AWS CDK
twingob
1
500
Amazon Redshift Serverless with CDK
twingob
1
1.7k
Rapid Prototyping with AWS
twingob
0
450
Using cdk-remote-stack and AWS Edge Networking Services for cross-regional applications
twingob
0
330
Try Infrastructure as Code with AWS CDK!
twingob
1
390
Other Decks in Technology
See All in Technology
サイト信頼性エンジニアリングとAmazon Web Services / SRE and AWS
ymotongpoo
6
1k
「正しく」失敗できる チームの作り方 〜リアルな事例から紐解く失敗を恐れない組織とは〜 / A team that can fail correctly
i35_267
3
730
わたしのOSS活動
kazupon
2
340
日経のデータベース事業とElasticsearch
hinatades
PRO
0
210
2025-02-21 ゆるSRE勉強会 Enhancing SRE Using AI
yoshiiryo1
1
470
AWSアカウントのセキュリティ自動化、どこまで進める? 最適な設計と実践ポイント
yuobayashi
5
240
コンテナサプライチェーンセキュリティ
kyohmizu
1
130
速くて安いWebサイトを作る
nishiharatsubasa
15
15k
AWSを活用したIoTにおけるセキュリティ対策のご紹介
kwskyk
0
310
JEDAI Meetup! Databricks AI/BI概要
databricksjapan
0
300
Snowflakeの開発・運用コストをApache Icebergで効率化しよう!~機能と活用例のご紹介~
sagara
1
360
実は強い 非ViTな画像認識モデル
tattaka
2
1.1k
Featured
See All Featured
Six Lessons from altMBA
skipperchong
27
3.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
360
YesSQL, Process and Tooling at Scale
rocio
172
14k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
Git: the NoSQL Database
bkeepers
PRO
427
65k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Code Reviewing Like a Champion
maltzj
521
39k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
100
18k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Building an army of robots
kneath
303
45k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
Transcript
© 2024, Amazon Web Services, Inc. or its affiliates. ©
2024, Amazon Web Services, Inc. or its affiliates. Generative AI with AWS - AWS で実現する⽣成 AI - Yoshinori Fujiwara Sr. Solutions Architect Amazon Web Services Japan G.K. 2 0 2 4 / 7/ 1 3 JAW S - U G O k a ya m a 2 0 2 4
© 2024, Amazon Web Services, Inc. or its affiliates. ⾃⼰紹介
藤原 吉規 🧑🚒 デジタルサービスソリューション部 シニア ソリューションアーキテクト デジタルネイティブビジネスのお客様に 技術⽀援しています。 好きなAWSサービス︓ • Amazon CloudFront • AWS 技術サポート 2
© 2024, Amazon Web Services, Inc. or its affiliates. 7/8
週 (今週) の⽣成 AI 関連アップデート W h a t ’ s N e w w i t h A W S 記 載 の も の が 1 4 個 ︕ 3 https://aws.amazon.com/about-aws/whats-new/2024/
© 2024, Amazon Web Services, Inc. or its affiliates. アジェンダ
1. ⽣成 AI とは 2. Amazon Bedrock 3. ⽣成 AI のキャッチアップ⽅法 4
© 2024, Amazon Web Services, Inc. or its affiliates. ©
2024, Amazon Web Services, Inc. or its affiliates. ⽣成 AI とは 5
© 2024, Amazon Web Services, Inc. or its affiliates. 6
⽣成 AI を実現する仕組み - 基盤モデル ⽣成 AI は「基盤モデル」と呼ばれる 「膨⼤なデータに基づき事前にトレーニングされた⼤規模な機械学習モデル」によって実現 テキスト⽣成 要約 情報抽出 Q&A チャットボット 利⽤ タスク ラベル付け されていない データ (教師なし データ) 基盤モデル (FM) テキスト⽣成 要約 情報抽出 Q&A チャットボット 学習 利⽤ タスク MLモデル … … … … ラベル付き データ … … … … 事前学習
© 2024, Amazon Web Services, Inc. or its affiliates. 7
⽣成 AI (Generative AI) とは テキスト⽣成 商品説明⽂の⽣成 画像⽣成 商品画像の背景⽣成 会話、ストーリー、画像、動画、⾳楽など、 指⽰に沿い⾼精度なコンテンツを⽣成可能なモデルやモデル込みのアプリケーション ⼀般に 基盤モデルと呼ばれる、膨⼤なデータに基づいて事前にトレーニングされた⼤規模モデルを利⽤ 指⽰︓ プロのカメラマンが撮影した商品画像、 ⼤理⽯のテーブルの上に、たくさんの果物が乗っている、 背景は少しボケている
© 2024, Amazon Web Services, Inc. or its affiliates. 8
⽣成 AI (Generative AI) とは テキスト⽣成 商品説明⽂の⽣成 画像⽣成 商品画像の背景⽣成 会話、ストーリー、画像、動画、⾳楽など、 指⽰に沿い⾼精度なコンテンツを⽣成可能なモデルやモデル込みのアプリケーション ⼀般に 基盤モデルと呼ばれる、膨⼤なデータに基づいて事前にトレーニングされた⼤規模モデルを利⽤ 指⽰︓ プロのカメラマンが撮影した商品画像、 ⼤理⽯のテーブルの上に、たくさんの果物が乗っている、 背景は少しボケている カスタマイズ要素 • 役割やシチュエーションを補⾜ E.g. あなたは、デジタルマーケティングの専⾨家です。 • 望ましい回答を例⽰ • ⾃社データ等を事前情報として埋め込む(RAG) カスタマイズ要素 • 現れてはいけない項⽬の指定 • 元画像の特定要素や領域のみ指定 簡単な指⽰(プロンプト)で多様なタスクを解かせることができる ⇒プロンプトの⼯夫にてカスタマイズや精度向上が可能
© 2024, Amazon Web Services, Inc. or its affiliates. 9
⽣成 AI サービスやツール GPUs Inferentia Trainium SageMaker EC2 Capacity Blocks Neuron UltraClusters EFA Nitro Amazon Bedrock Agents Guardrails Customization Capabilities Amazon Q Business Amazon Q Developer Amazon Q in QuickSight Amazon Q in Connect
© 2024, Amazon Web Services, Inc. or its affiliates. 10
⽣成 AI 活⽤をはじめる上での難しさ ⽣成 AI の進化への追従 プライバシーと セキュリティ インフラストラクチャ 複数のモデルを簡単に 利⽤できる環境の構築 データ漏洩の防⽌、 国内にデータを留めたい … … モデル A モデル B … モデル C … モデルの実⾏を⽀える インフラの管理 “… ? “ “… 。“ in 海外 in ⽇本 必要なこと • 各モデルごとの環境構築と 機械学習の知識 • モデルのデプロイや カスタマイズのための ⼤規模な計算リソース • インフラの維持管理 • 柔軟なスケーリング • … v1 v2 v3 v1 v1 Lite パラ メータ ◦ B パラ メータ △△ B モデル モデル モデル モデル
© 2024, Amazon Web Services, Inc. or its affiliates. 11
⽣成 AI サービスやツール GPUs Inferentia Trainium SageMaker EC2 Capacity Blocks Neuron UltraClusters EFA Nitro Amazon Bedrock Agents Guardrails Customization Capabilities Amazon Q Business Amazon Q Developer Amazon Q in QuickSight Amazon Q in Connect
© 2024, Amazon Web Services, Inc. or its affiliates. ©
2024, Amazon Web Services, Inc. or its affiliates. Amazon Bedrock 12
© 2024, Amazon Web Services, Inc. or its affiliates. 13
基盤モデルを活⽤した ⽣成 AI アプリケーションを 簡単に構築、拡張できる⽅法 Amazon Bedrock API を介してさまざまな基盤モデルにアクセス、 インフラ管理は不要 お客様の業務⽤途に適した基盤モデルを選択 Amazon、AI21 Labs、 Anthropic、Cohere、Meta、Stability AI 東京リージョン含む 複数のリージョンで⼀般提供 ( 2024 年 7 ⽉時点) エージェント機能、RAG 機能、⾮公開でのモデル のカスタマイズなど基盤モデルの効果を⾼める さまざまな機能を提供 データセキュリティやコンプライアンスを実現
© 2024, Amazon Web Services, Inc. or its affiliates. 14
幅広いモデルの選択肢を提供 - 将来のモデル変更への柔軟性確保 Amazon 要約、複雑な推測、 ⽂書作成、コーディング ⽂脈に応じた回答、 要約、書き換え ⾼品質な画像、 アート テキスト⽣成、 検索、分類 Q&A、読解 ⽂書要約、⽣成、 Q&A、検索、 画像⽣成 Amazon Titan Text Lite Amazon Titan Text Express Amazon Titan Text Embeddings Amazon Titan Text Embeddings V2 Amazon Titan Text Premier Amazon Titan Multimodal Embeddings Amazon Titan Image Generator Claude 3.5 Sonnet Claude 3 Opus Claude 3 Sonnet Claude 3 Haiku Claude 2.1 Claude 2 Claude Instant Llama 3 8B Llama 3 70B Llama 2 13B Llama 2 70B Command Command Light Embed English Embed Multilingual Command R+ Command R Stable Diffusion XL1.0 Stable Diffusion XL 0.8 Jurassic-2 Ultra Jurassic-2 Mid Mistral Large Mistral 7B Mistral Small Mixtral 8x7B テキスト要約、Q&A、 テキスト分類、 テキスト補完、 コード⽣成
© 2024, Amazon Web Services, Inc. or its affiliates. 15
検索拡張⽣成 Retrieval augmented generation (RAG) 回答を企業データに限定し モデルのハルシネーション (誤った発⾔) を軽減 ナレッジベースから取得した 情報にはソースの情報が付随 され、回答の透明性を確保 回 答 質 問 ナレッジベース 基盤モデル ⾃社の商品やサービスに 関する正確な情報を参照 1 2 3 4 ナレッジベースとしての Amazon Bedrock
© 2024, Amazon Web Services, Inc. or its affiliates. 16
ファインチューニングで ビジネスの差別化を俊敏かつ安全に実現 Meta—Llama 広告 製品情報 プログラム ⽣成されたコンテンツ ファインチューン モデル Amazon Bedrock ラベル付されたサンプル Amazon S3 Copy Meta—Llama 基盤モデル 少量のラベル付けされたサンプルを使って特定のタスクに精度の⾼い推論を実現
© 2024, Amazon Web Services, Inc. or its affiliates. 17
Guardrails for Amazon Bedrock アプリケーション要件と責任ある AI ポリシーに合わせた保護⼿段を実装する ファインチューニングモデルやエー ジェントを含め、すべての基盤モデル にガードレールを適⽤ 責任ある AI ポリシーに基づいて、 有害なコンテンツやトピックをフィル タリングして回避するように設定 個⼈を特定できる情報 (PII) やカスタ ム正規表現をブロックまたはマスク
© 2024, Amazon Web Services, Inc. or its affiliates. 18
AWS Cloud Amazon Bedrock を介した⽣成 AI 搭載アプリケーションの構造 ユーザー アプリ or システム Amazon Bedrock Amazon Bedrock で選べる基盤モデル アプリを操作 アプリが Bedrockの APIを呼び出し モデルごとに 求められる⽅法で 呼び出し Converse API
© 2024, Amazon Web Services, Inc. or its affiliates. 19
AWS Cloud Amazon Bedrock を介した⽣成 AI 搭載アプリケーションの構造 ユーザー アプリ or システム Amazon Bedrock で選べる基盤モデル アプリを操作 モデルごとに 求められる⽅法で 呼び出し Guardrails for Amazon Bedrockが ⼊出⼒を評価・フィルタ Converse API Amazon Bedrock
© 2024, Amazon Web Services, Inc. or its affiliates. 20
ココ(岩盤) “You are my Bedrock”
© 2024, Amazon Web Services, Inc. or its affiliates. ©
2024, Amazon Web Services, Inc. or its affiliates. ⽣成 AI のキャッチアップ⽅法 21
© 2024, Amazon Web Services, Inc. or its affiliates. 週刊⽣成
AI with AWS 22 https://aws.amazon.com/jp/blogs/news/weekly-genai-20240701/
© 2024, Amazon Web Services, Inc. or its affiliates. AWS
公式ウェブマガジン "builders.flash✨" 23 https://aws.amazon.com/jp/builders-flash/
© 2024, Amazon Web Services, Inc. or its affiliates. 24
Generative AI Use Cases JP (通称 GenU) すぐに業務活用できるビジネスユースケース集付きの安全な生成AIアプリ実装 https://catalog.workshops.aws/generative-ai-use-cases-jp/ja-JP
© 2024, Amazon Web Services, Inc. or its affiliates. 25
そして、 作ってみよう︕
© 2024, Amazon Web Services, Inc. or its affiliates. 26
Amazon CloudFront クライアント Lambda 関数 URL 1. リクエスト Amazon Bedrock 4. コマンドの指示 5. レスポンス 6. ストリーミングレスポンス AWS WAF Amazon S3 Origin Access Control (OAC) Amazon S3 (Transfer Acceleration) Lambda 関数 URL 2. S3 署名付 URL 3. S3 ダイレクト アップロード OAC OAC Amazon CloudFront + AWS Lambda 関数 URL feat. “⽣成 AI”
© 2024, Amazon Web Services, Inc. or its affiliates. Thank
you! © 2024, Amazon Web Services, Inc. or its affiliates.