LoginSignup
2
0

AWS CLIからBedrockで使えるモデルを確認する

Last updated at Posted at 2024-03-28

概要

AWS CLI を使って、Bedrockで使えるモデルの一覧を出力します。
モデルIDを調べたくなることも多いので、モデルID, モデル名, プロバイダの一覧をテーブル形式で出力します。

前提

  • Mac OS 13.6.2
  • aws-cli/2.13.35 Python/3.11.6 Darwin/22.6.0 exe/x86_64 prompt/off
  • AWS CLIはセットアップ済みとします

コマンド例

東京リージョンの場合

aws bedrock list-foundation-models --output table \
     --query 'modelSummaries[*].[modelId,modelName,providerName]' \
     --region ap-northeast-1

# --output: 出力形式を指定するオプション。json も使えます
# --query: 取得した結果をフィルタリングするためのクエリ式。
#          MESPath という JSON 用のクエリ言語を使う
# --region: リージョン
  • 出力例
----------------------------------------------------------------------------------
|                              ListFoundationModels                              |
+------------------------------------+------------------------------+------------+
|  amazon.titan-text-express-v1:0:8k |  Titan Text G1 - Express     |  Amazon    |
|  amazon.titan-text-express-v1      |  Titan Text G1 - Express     |  Amazon    |
|  amazon.titan-embed-text-v1:2:8k   |  Titan Embeddings G1 - Text  |  Amazon    |
|  amazon.titan-embed-text-v1        |  Titan Embeddings G1 - Text  |  Amazon    |
|  anthropic.claude-instant-v1:2:18k |  Claude Instant              |  Anthropic |
|  anthropic.claude-instant-v1       |  Claude Instant              |  Anthropic |
|  anthropic.claude-v2:1:18k         |  Claude                      |  Anthropic |
|  anthropic.claude-v2:1:200k        |  Claude                      |  Anthropic |
|  anthropic.claude-v2:1             |  Claude                      |  Anthropic |
+------------------------------------+------------------------------+------------+

2024/3/28時点ですが、 us-east-1 に比べると使えるモデルはだいぶ少ないですね。
ただ、徐々に増えていくのかと思います。Claude 3 が来るのを心待ちにしましょう。

us-east-1の場合

aws bedrock list-foundation-models --output table \
     --query 'modelSummaries[*].[modelId,modelName,providerName]' \
     --region us-east-1
  • 出力例
-----------------------------------------------------------------------------------------------
|                                    ListFoundationModels                                     |
+------------------------------------------+----------------------------------+---------------+
|  amazon.titan-tg1-large                  |  Titan Text Large                |  Amazon       |
|  amazon.titan-image-generator-v1:0       |  Titan Image Generator G1        |  Amazon       |
|  amazon.titan-image-generator-v1         |  Titan Image Generator G1        |  Amazon       |
...略...
|  anthropic.claude-3-sonnet-20240229-v1:0 |  Claude 3 Sonnet                 |  Anthropic    |
|  anthropic.claude-3-haiku-20240307-v1:0  |  Claude 3 Haiku                  |  Anthropic    |
...略...
|  meta.llama2-70b-v1:0:4k                 |  Llama 2 70B                     |  Meta         |
|  meta.llama2-70b-v1                      |  Llama 2 70B                     |  Meta         |
|  mistral.mistral-7b-instruct-v0:2        |  Mistral 7B Instruct             |  Mistral AI   |
|  mistral.mixtral-8x7b-instruct-v0:1      |  Mixtral 8x7B Instruct           |  Mistral AI   |
+------------------------------------------+----------------------------------+---------------+

参考

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0