🙌

00027.Amazon SageMaker JumpStart Create Endpoint

2024/07/27に公開

Situation

OSS LLM の Endpoint を SageMaker JumpStart で立ち上げたい。コンソールからポチポチ作るのだるいからスクリプトを雑に作る。

Goal

  1. JumpStart 対応のモデル一覧を引数で与えた文字列でフィルタしたうえで表示し、選択した Model id で Endpoint Deploy する

Prerequisites

IAM role、ローカルの credentials 設定は適当にググって頑張って設定している状態
必要なコマンドはなんか頑張って設定している状態

Step1: スクリプト実行

ここまでの成果

スクリプトの SAGEMAKER_ROLE_ARN を自身の設定したものに変更してスクリプト実行する。

python3 sagemaker-jumpstart-create-ep.py -f llama-3-1
Available models:
0: meta-textgeneration-llama-3-1-405b-fp8
1: meta-textgeneration-llama-3-1-405b-instruct-fp8
2: meta-textgeneration-llama-3-1-70b
3: meta-textgeneration-llama-3-1-70b-instruct
4: meta-textgeneration-llama-3-1-8b
5: meta-textgeneration-llama-3-1-8b-instruct
Select a model by number: 4
Deploying model meta-textgeneration-llama-3-1-8b to endpoint id00027-jumpstart-ep-meta-llama-3-1-8b-instruct-test01 on instance type None
Using model 'meta-textgeneration-llama-3-1-8b' with wildcard version identifier '*'. You can pin to version '1.0.0' for more stable results. Note that models may have different input/output signatures after a major version upgrade.
----------------!Endpoint id00027-jumpstart-ep-meta-llama-3-1-8b-instruct-test01 has been created successfully.

Conclusion

  • いい感じでできた
GitHubで編集を提案

Discussion