

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Gemma 4 31B
<a name="model-card-google-gemma-4-31b"></a>

## ![Google logo with multicolored G letter icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/models/google.png) Google — Gemma 4 31B
<a name="model-card-google-gemma-4-31b-header"></a>

## モデルの詳細
<a name="model-card-google-gemma-4-31b-details"></a>

Gemma 4 31B は Google の 307 億パラメータの高密度モデルで、推論、ネイティブ関数呼び出し、テキストとイメージ間のマルチモーダル入力が組み込まれており、256K000 トークンコンテキストウィンドウをサポートしています。モデルの開発とパフォーマンスの詳細については、[モデル/サービスカード](https://huggingface.co/google/gemma-4-31B-it)を参照してください。
+ **モデル開始日: 2025** 年 6 月 10 日
+ **モデル終了日:** 該当なし
+ **エンドユーザーライセンス契約と利用規約:** [表示](https://ai.google.dev/gemma/apache_2)
+ **モデルライフサイクル:** アクティブ
+ **コンテキストウィンドウ:** 256K000 トークン


| **入力モダリティ** | **出力モダリティ** | **[サポートされている APIs ](https://docs.aws.amazon.com/bedrock/latest/userguide/apis.html)** | **[サポートされているエンドポイント](https://docs.aws.amazon.com/bedrock/latest/userguide/endpoints.html)** | 
| --- | --- | --- | --- | 
| ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) オーディオ | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) 埋め込み | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) Responses | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) bedrock-runtime | 
| ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) イメージ | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) イメージ | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) Chat Completions | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) bedrock-mantle | 
| ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) 音声 | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) 音声 | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) Invoke |  | 
| ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) テキスト | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) テキスト | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) Converse |  | 
| ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) のビデオ | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) のビデオ | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) Messages |  | 

**注記**  
Gemma 4 モデルはエンドポイントでのみ使用できます`bedrock-mantle`。  
このモデルは、`bedrock-mantle`エンドポイントの`openai/v1/responses`パスで使用できます。これは、レスポンスエンドポイントの他のモデルで使用される`v1/responses`パスとは異なります。

## 機能と機能
<a name="model-card-google-gemma-4-31b-capabilities"></a>

***Bedrock の機能***

**`bedrock-mantle`エンドポイントを使用してサポートされる機能**


| **サポート** | **サポートされていない** | 
| --- | --- | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/model-card-google-gemma-4-31b.html)  | — | 

## 料金
<a name="model-card-google-gemma-4-31b-pricing"></a>

料金については、[Amazon Bedrock の料金](https://aws.amazon.com/bedrock/pricing/)ページを参照してください。

## プログラムによるアクセス
<a name="model-card-google-gemma-4-31b-programmatic-access"></a>

次のモデル IDs とエンドポイント URLsを使用して、このモデルにプログラムでアクセスします。使用可能な APIs[「サポートされている APIs](https://docs.aws.amazon.com/bedrock/latest/userguide/apis.html)と[サポートされているエンドポイント](https://docs.aws.amazon.com/bedrock/latest/userguide/endpoints.html)」を参照してください。


| **Endpoint** | **モデル ID** | **リージョン内エンドポイント URL** | **地理推論 ID** | **グローバル推論 ID** | 
| --- | --- | --- | --- | --- | 
| bedrock-mantle | google.gemma-4-31b | https://bedrock-mantle.{region}.api.aws/openai/v1 | サポートされません | サポートされません | 

*たとえば、region が us-east-1 (バージニア北部) の場合、bedrock-mantle エンドポイント URL は「https://bedrock-mantle.us-east-1.api.aws/openai/v1」になります。*

## サービス階層
<a name="model-card-google-gemma-4-31b-tiers"></a>

Amazon Bedrock は、ワークロードの要件に合わせて複数のサービス層を提供します。**Standard** はpay-per-tokenアクセスを提供します。**Priority** は、時間ベースのコミットメントでより高いスループットを提供します。**Flex** は、柔軟でnon-time-sensitiveワークロードに対して低コストのアクセスを提供します。**リザーブド**は、予測可能なワークロードに対するコミットメントという用語で、専用のスループットを提供します。詳細については、[「 サービス層](https://docs.aws.amazon.com/bedrock/latest/userguide/service-tiers-inference.html)」を参照してください。


| **スタンダード** | **優先度** | **Flex** | **予約済み** | 
| --- | --- | --- | --- | 
| ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) | 

## リージョン別の利用可能性
<a name="model-card-google-gemma-4-31b-regional-availability"></a>

***リージョンの可用性の概要***

Bedrock には 3 つの推論オプションがあります。In**-Region **は厳格なコンプライアンスのために 1 つのリージョン内にリクエストを保持し、**Geo Cross-Region** ルートは 1 つの地域 (米国、欧州など) 内のリージョン間でより高いスループットを実現し、**Global Cross-Region** ルートは世界中どこでもデータレジデンシーを尊重して、レジデンシーの制約がない場合に最大スループットを実現します。詳細については、[リージョン別の可用性](models-region-compatibility.md)「」ページを参照してください。


| **リージョン** | **リージョン内** | **地域** | **グローバル** | 
| --- | --- | --- | --- | 
| us-east-1 (バージニア北部) | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) | 
| us-east-2 (オハイオ) | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) | 
| us-west-2 (オレゴン) | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) | 
| eu-central-1 (フランクフルト) | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/images/icons/icon-no.png) | 

## クォータと制限
<a name="model-card-google-gemma-4-31b-quotas"></a>

AWS アカウントには、サービスのパフォーマンスを維持し、Amazon Bedrock の適切な使用を確保するためのデフォルトのクォータがあります。アカウントに割り当てられたデフォルトのクォータは、リージョンの要因、支払い履歴、不正使用、および/またはクォータ[引き上げリクエスト](https://docs.aws.amazon.com/bedrock/latest/userguide/quotas-increase.html)の承認に応じて更新される場合があります。詳細については、 [Amazon Bedrock のクォータ](quotas.md)ドキュメントを参照し、モデル[の制限](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#limits_bedrock)を参照してください。

`bedrock-mantle` エンドポイントでオンデマンドスループットを消費すると、[使用可能なスループットは時間の経過とともにスケール](https://docs.aws.amazon.com/bedrock/latest/userguide/scaling-throughput-best-practices.html#scaling-ramp-up)されます。クォータ内のすべてのリクエストが需要の高い期間に成功することが保証されるわけではないため、徐々に増やすことが重要です。このモデルでは、デフォルトの制限は Service Quotas から直接表示されないため、ガイドとしてランプに従うことをお勧めします。

## サンプルコード
<a name="model-card-google-gemma-4-31b-sample-code"></a>

**ステップ 1 - AWS アカウント:** AWS アカウントがすでにある場合は、このステップをスキップします。AWS を初めて使用する場合は、[AWS アカウントに](https://portal.aws.amazon.com/billing/signup)サインアップします。

**ステップ 2 - API キー:** [Amazon Bedrock コンソール](https://console.aws.amazon.com/bedrock/home#/api-keys/long-term/create)に移動し、長期 API キーを生成します。

**ステップ 3 - SDK を取得する:** この入門ガイドを使用するには、Python がすでにインストールされている必要があります。次に、使用している APIs に応じて、関連するソフトウェアをインストールします。

```
pip install openai
```

**ステップ 4 - 環境変数を設定する:** API キーを認証に使用するように環境を設定します。

```
OPENAI_API_KEY="<provide your Bedrock API key>"
OPENAI_BASE_URL="https://bedrock-mantle.<your-region>.api.aws/openai/v1"
```

**ステップ 5 - 最初の推論リクエストを実行する:** ファイルを として保存する `bedrock-first-request.py`

------
#### [ Chat Completions API ]

```
from openai import OpenAI

client = OpenAI()

response = client.chat.completions.create(
    model="google.gemma-4-31b",
    messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}]
    )
print(response)
```

------
#### [ Responses API ]

```
from openai import OpenAI

client = OpenAI()

response = client.responses.create(
    model="google.gemma-4-31b",
    input="Explain the benefits of mixture-of-experts architectures for production inference.",
    max_output_tokens=512,
)
print(response.output_text)
```

------

## 使用上の考慮事項と制限事項
<a name="model-card-google-gemma-4-31b-considerations"></a>
+ **推論モード** — 推論の労力は Chat Completions API と Responses APIs の両方で尊重され、モデルはどちらの場合も拡張推論を実行します。ただし、推論コンテンツは Responses API によってのみ返されます。Chat Completions API は推論トークンを返しません。これは、OpenAI Chat Completions 仕様が推論トークンの返しをサポートしていないためです。
+ **並列ツール呼び出し** — 1 回のターンで複数のツール呼び出しをリクエストすることは、現在サポートされていません。リクエストツールは一度に 1 つずつ呼び出します。
+ **リクエストペイロードサイズ** — イメージやビデオを含む Gemma 4 31B のリクエストボディペイロードの合計は、最大サイズ 3.5 MB をサポートします。