Amazon Bedrock Model Distillation が一般提供開始となりました

Amazon Bedrock Model Distillation が一般提供開始となりました

Clock Icon2025.05.02

こんにちは、森田です。

以下のアップデートで Bedrock Model Distillation が一般提供開始となりました。

https://aws.amazon.com/jp/about-aws/whats-new/2025/05/amazon-bedrock-model-distillation-generally-available/

Amazon Bedrock Model Distillation とは

Amazon Bedrock 上で 教師モデル (teacher) の知識を 生徒モデル (student) に転移し、レイテンシと推論コストを削減できる機能です。

エージェント機能を含むワークフローでも、蒸留済みモデルを利用することで精度向上が期待できます。

image.png

引用:https://aws.amazon.com/jp/blogs/machine-learning/amazon-bedrock-model-distillation-boost-function-calling-accuracy-while-reducing-cost-and-latency/

本機能は re:Invent 2024 でプレビュー版が発表されていました。

https://dev.classmethod.jp/articles/amazon-bedrock-model-distillation-aws-reinvent

プレビューとの違い

対応モデルの追加

新たに以下のモデルでも蒸留モデルを作成できるようになりました。

教師モデル 生徒モデル
Nova Premier Nova Pro / Nova Lite / Nova Micro
Claude Sonnet 3.5 v2 Claude 3 Haiku
Llama 3.3 70B Llama 3.2 1B / Llama 3.2 3B

Nova Premierは、先日GAしたばかりのモデルですが、教師モデルとして早速対応しているようです。

https://dev.classmethod.jp/articles/amazon-bedrock-supports-amazon-nova-premier/

ジョブステータスの表示

従来はジョブ実行中の進捗が分かりませんでしたが、Job status details が追加され、
リアルタイムでステータス確認 ができるようになりました。

img.png

蒸留ジョブ実行は、時間がかかり、エラーも起こりやすいため、嬉しいアップデートですね。

やってみた

データの準備

以下記事と同じデータを用意します。

https://dev.classmethod.jp/articles/bedrock-model-distillation-basic/#%25E3%2583%2587%25E3%2583%25BC%25E3%2582%25BF%25E3%2581%25AE%25E6%25BA%2596%25E5%2582%2599

また、以前まで少なかったデータセット周りの情報も追加されているようでした。

https://github.com/aws-samples/amazon-bedrock-samples/blob/main/custom-models/model_distillation/dataset-validation/README.md

ジョブの作成

今回は、新規に追加されたNova Premierを教師モデルとしてジョブを実行します。

img_81.png

ジョブのステータス確認

正常に実行されますと、以下のようにJob status detailsに現在のステータスが表示されます。

img_82.png

1~2時間ほど待つとTrainingまで完了となり、モデルの利用が可能となります。

img.png

S3バケットの確認

S3バケットを確認することでトレーニングの詳細を確認することができます。

img.png

プレビューとの違いとしては、学習時に使用したデータも格納されています。

img.png

このファイルから、意図しない学習をしていないかを確認することができます。

sample_training_data.jsonl
{"schemaVersion": "bedrock-conversation-2024", "system": [{"text": "A chat between a curious User and an artificial intelligence Bot. The Bot gives helpful, detailed, and polite answers to the User's questions."}], "messages": [{"role": "user", "content": [{"text": "How does augmented reality work?"}]}, {"role": "assistant", "content": [{"text": "Augmented reality overlays digital information onto the real world through devices like smartphones or AR glasses."}]}]}
{"schemaVersion": "bedrock-conversation-2024", "system": [{"text": "A chat between a curious User and an artificial intelligence Bot. The Bot gives helpful, detailed, and polite answers to the User's questions."}], "messages": [{"role": "user", "content": [{"text": "How can I learn a new language quickly?"}]}, {"role": "assistant", "content": [{"text": "Focus on immersive techniques, daily practice, and language apps for rapid progress."}]}]}
{"schemaVersion": "bedrock-conversation-2024", "system": [{"text": "A chat between a curious User and an artificial intelligence Bot. The Bot gives helpful, detailed, and polite answers to the User's questions."}], "messages": [{"role": "user", "content": [{"text": "What are the principles of project management?"}]}, {"role": "assistant", "content": [{"text": "The main principles include scope, time, cost, quality, communication, risk, and procurement management."}]}]}
{"schemaVersion": "bedrock-conversation-2024", "system": [{"text": "A chat between a curious User and an artificial intelligence Bot. The Bot gives helpful, detailed, and polite answers to the User's questions."}], "messages": [{"role": "user", "content": [{"text": "What are the principles of content marketing?"}]}, {"role": "assistant", "content": [{"text": "Creating valuable and relevant content to attract a defined audience and drive profitable actions."}]}]}

さいごに

ジョブステータスや学習データを確認することができるようになったため、以前よりもトラブルシューティングが捗りそうです。

本記事では紹介していませんが、Bedrock Model Distillation では、モデル呼び出しログを使った学習もできるため、よりお手軽に蒸留モデルを作成できます。

ぜひ、試してみてはいかがでしょうか。

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.