Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
DeepSeek-R1をカスタムモデルとしてAmazon Bedrockにインポートし活用
Search
為藤アキラ
January 29, 2025
Technology
290
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DeepSeek-R1をカスタムモデルとしてAmazon Bedrockにインポートし活用
為藤アキラ
January 29, 2025
Transcript
29 slides
AWS活用 AI/ML/LLM #2 大規模言語モデル(LLM)のモデル開発 DeepSeek-R1をカスタムモデルとして Amazon Bedrockにインポートし活用 株式会社BLUEISH 代表取締役CEO兼CTO 為藤アキラ
@AkiraTameto
為藤 アキラ (Akira Tameto) 株式会社BLUEISH 代表取締役 CEO兼CTO ・AWS歴12年 ・直近のAIプロジェクト
・画像を中心とした機械学習とLLM のハイブリッドのアーキテクト 自己紹介
今回のゴール ・Amazon Bedrockをカスタムモデルを構築すること
デモンストレーション
Hugging Face DeepSeek
DeepSeekのダウンロード pip install huggingface_hub from import model_id = (repo_id=model_id, local_dir=f
) huggingface_hub snapshot_download snapshot_download # model_id = "deepseek-ai/DeepSeek-R1-Distill-Llama-8B" # snapshot_download(repo_id=model_id, local_dir=f"./DeepSeek-R1-Distill-Llama-8B") "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" "./DeepSeek-R1-Distill-Qwen-1.5B" 1.Huggingfaceからダウンロードを行うのでライブラリーのインストール 2.Huggingfaceからモデルをライブラリーのインストール
DeepSeekのダウンロード ダウンロード中 ダウンロードできている事を確認
モデルを格納する為のバケット作成
モデルを格納する為のバケット作成
モデルを格納する為のバケット作成
バケットにアップロード
バケットにアップロード
バケットにアップロード
バケットにアップロード
モデルのインポート
モデルのインポート
モデルのインポート
モデルのインポート
モデルのインポート
モデルのインポート
モデルのインポート
モデルのインポート
InvokeModel APIで実行
InvokeModel APIで実行
InvokeModel APIで実行 import import = . = = = \n
= . = = = =2 = json boto3 client boto3 ( ) model_id prompt formatted_prompt prompt response client ( modelId model_id, body json. ( { :prompt, } ), ) response_body json. (response[ ]. ()) (json. (response_json, indent , ensure_ascii False)) client invoke_model dumps loads read print dumps "bedrock-runtime", region_name="us-east-1" "arn:aws:bedrock:us-west-1:{先ほどのモデル}" "東京都の歴史を説明してください" "prompt" "body" f"""<s>[INST] Human: { }[/INST] Assistant: """
InvokeModel APIで実行 { “generation”: “嗯,用户让我解释东京都的历史,我需要先理清思路。首先,东京都 现在是一个大都市,但它的历史可能从古代开始。我记得江户时代之前,东京可能只 是个小渔村或者不太重要的地方。然后德川家康在江户建立幕府,这应该是东京发展 的转折点。江户时代持续了大约260年,直到明治维新。明治时期,首都从京都迁到 江户,改名东京,成为日本的政治经济中心。接下来是近代的发展,关东大地震和二 战的影响可能也很重要,特别是战后重建和经济高速增长期。现在东京都是全球重要
的城市,可能还需要提到行政区划的变化,比如23特别区的设立。用户可能想知道关 键的历史事件和时期,以及它们如何塑造了今天的东京。需要确保时间线清晰,重要 事件不遗漏。可能还需要简要提到古代部分,比如平安时代或更早的时期,是否有相 关历史。另外,东京都的成立时间,可能是在1943年,合并了东京府和东京市。”
Hugging Face DeepSeek
Hugging Face サイバーエージェントさんのDeepSeek
Thank You!
More Decks by 為藤アキラ
See All by 為藤アキラ
【書籍出版記念】 10周回って、エージェント開発は RAGがすべてだった。〜RAGの歴史と開発現場で見えた実践知〜
akiratameto
25
11k
Agent ServerはWeb Serverではない。ADKで考えるAgentOps
akiratameto
0
350
AI Agent Vertex AI Agent Builder × A2A × ADKで繋げるマルチエージェント
akiratameto
1
210
[OpsJAWS Meetup33 AIOps] Amazon Bedrockガードレールで守る安全なAI運用
akiratameto
2
470
Amazon Bedrockで実現する堅牢なデータエンジニアリング
akiratameto
1
170
Bedrock カスタムモデルvs汎用モデルの比較
akiratameto
1
200
Vertex AIで実現するLLMデータアノテーションの効率化と自動化
akiratameto
0
280
Amazon Bedrock Agents (ナレッジベースの種類)
akiratameto
1
440
Amazon Bedrock Agents (基本編)
akiratameto
0
330
Other Decks in Technology
See All in Technology
飯から始まるデータエンジニア
sansantech
PRO
0
100
「任されビリティ」で引き受けて「よしなりてぃ」に頼らず任せる / Accept tasks with "makasarebility" and hand them over without relying on "yoshinarily"
pauli
1
790
共通基盤の実装に Kotlin - Quarkus を選定した理由と採用したアーキテクチャ
nealle
1
130
サーバーラックは作る時代! 3Dプリンターで作る10インチラックのススメ
jacopen
2
460
Agent Harnessはどう作る?事例から学ぶAI Agentの設計思想
sergicalsix
0
350
Del vibe coding a un Desarrollo (agéntico) fiable
jcabot
0
160
[NW-JAWS DAY]「うちのAWS、インターネット出られないんで」― AWS外の自社サービスをPrivateLinkでシュッと公開する方法
ykimi
3
860
DevOps Agentにあらゆるセキュリティインシデントのトリアージを任せた件
jirtosterone
1
180
落とし穴にハマってわかった 開発生産性を測るときに気をつけたいこと
munakata
3
410
Agent Routerで作るマルチテナント 推論基盤 #CNDW2026 / Building Multi-Tenant Inference Platform with Agent Router #CNDW2026
everpeace
3
250
Frontier Teams — Amazon は AI で「開発のやり方」をどう変えたのか
kmotohas
0
300
高品質と高スピードを支える品質のシフトレフトのアプローチ
goyoki
4
1.6k
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.2k
Speed Design
sergeychernyshev
33
2.2k
Embracing the Ebb and Flow
colly
88
5.2k
エンジニアに許された特別な時間の終わり
watany
109
250k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
350
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.8k
How GitHub (no longer) Works
holman
316
150k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
360
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k