View a markdown version of this page

DeepSeek V3 - Amazon Bedrock

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

DeepSeek V3

DeepSeek logo. DeepSeek — DeepSeek V3

模型詳細資訊

DeepSeek V3.2 是 DeepSeek mixture-of-experts模型,具有改善的推理、編碼和下列指示功能。如需模型開發和效能的詳細資訊,請參閱模型/服務卡。

輸入模態 輸出模式 支援的 APIs 支援的端點
not-supported 音訊not-supported 內嵌not-supported Responsessupported bedrock-runtime
not-supported 影像not-supported 影像supported Chat Completionssupported bedrock-mantle
not-supported 語音not-supported 語音supported Invoke
supported 文字supported 文字supported Converse
not-supported 影片not-supported 影片
提示

我們建議您盡可能將bedrock-runtime端點用於新應用程式。如需詳細資訊,請參閱 Amazon Bedrock 支援的推論端點。

功能和功能

Bedrock 功能

使用bedrock-mantle端點支援的功能

使用bedrock-runtime端點支援的功能

定價

如需定價資訊,請參閱 Amazon Bedrock 定價頁面。

程式設計存取

使用以下模型 IDs和端點 URLs以程式設計方式存取此模型。如需可用 APIs和端點的詳細資訊,請參閱支援的 APIs和支援的端點。

端點 模型 ID 區域端點 URL 地理推論 ID 全域推論 ID
bedrock-runtime deepseek.v3.2 https://bedrock-runtime.{region}.amazonaws.com 不支援 不支援
bedrock-mantle deepseek.v3.2 https://bedrock-mantle.{region}.api.aws/v1 不支援 不支援

例如,如果 region 是 us-east-1 (維吉尼亞北部),則 bedrock-runtime 端點 URL 將為 "https://bedrock-runtime.us-east-1.amazonaws.com",bedrock-mantle 則為 "https://bedrock-mantle.us-east-1.api.aws/v1"。

服務層

Amazon Bedrock 提供多種服務層,以符合您的工作負載需求。Standard 提供pay-per-token存取 (設定"service_tier": "default"或省略 欄位)。Priority 提供價格溢價最快的回應時間 (設定 "service_tier": "priority")。Flex 為彈性、non-time-sensitive的工作負載提供較低成本的存取 (設定 "service_tier": "flex")。預留為可預測工作負載提供具有期限承諾的專用輸送量;它在帳戶層級設定,而不是根據請求設定 (請聯絡您的 AWS 帳戶團隊啟用)。如需詳細資訊,請參閱 服務方案。

標準 優先順序 Flex 預留
supported supported supported not-supported

區域可用性

區域可用性一目了然

Amazon Bedrock 提供三種推論選項:為嚴格合規,區域內將請求保留在單一 區域內、在遵守資料駐留時跨區域 (例如美國、歐洲和亞太區域) 的地理跨區域路由,以及在沒有駐留限制的情況下全球跨區域路由。如需詳細資訊,請參閱 依模型的區域可用性頁面。

區域 區域內 地理 全域
us-east-1 (維吉尼亞北部)supportednot-supportednot-supported
us-east-2 (俄亥俄)supportednot-supportednot-supported
us-west-2 (奧勒岡)supportednot-supportednot-supported
eu-north-1 (斯德哥爾摩)supportednot-supportednot-supported
eu-west-2 (倫敦)supportednot-supportednot-supported
ap-northeast-1 (東京)supportednot-supportednot-supported
ap-south-1 (孟買)supportednot-supportednot-supported
ap-southeast-2 (雪梨)supportednot-supportednot-supported
ap-southeast-3 (雅加達)supportednot-supportednot-supported
ap-northeast-2 (首爾)supportednot-supportednot-supported
ap-southeast-1 (新加坡)supportednot-supportednot-supported
ap-southeast-4 (墨爾本)supportednot-supportednot-supported
sa-east-1 (聖保羅)supportednot-supportednot-supported

配額和限制

AWS 您的帳戶具有預設配額來維持服務的效能,並確保適當使用 Amazon Bedrock。指派給帳戶的預設配額可能會根據區域因素、付款歷史記錄、詐騙使用量和/或配額增加請求的核准而更新。如需詳細資訊,請參閱 Amazon Bedrock 的配額 文件並參閱模型的限制。

範例程式碼

步驟 1 - AWS 帳戶:如果您已經有 AWS 帳戶,請略過此步驟。如果您是新手 AWS,請註冊 AWS 帳戶。

步驟 2 - API 金鑰:前往 Amazon Bedrock 主控台並產生長期 API 金鑰。

步驟 3 - 取得 SDK:若要使用此入門指南,您必須已安裝 Python。然後,根據您使用的 APIs相關軟體。

Chat Completions API
pip install boto3 openai
Invoke/Converse API
pip install boto3

步驟 4 - 設定環境變數:設定您的環境以使用 API 金鑰進行身分驗證。

Chat Completions API
OPENAI_API_KEY="<provide your Bedrock API key>" OPENAI_BASE_URL="https://bedrock-runtime.<your-region>.amazonaws.com/openai/v1"
Invoke/Converse API
AWS_BEARER_TOKEN_BEDROCK="<provide your Bedrock API key>"

步驟 5 - 執行您的第一個推論請求:將檔案儲存為 bedrock-first-request.py

Chat Completions API
from openai import OpenAI client = OpenAI() response = client.chat.completions.create( model="deepseek.v3.2", messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}] ) print(response)
Invoke API
import json import boto3 client = boto3.client('bedrock-runtime', region_name='us-east-1') response = client.invoke_model( modelId='deepseek.v3.2', body=json.dumps({ 'messages': [{ 'role': 'user', 'content': 'Can you explain the features of Amazon Bedrock?'}], 'max_tokens': 1024 }) ) print(json.loads(response['body'].read()))
Converse API
import boto3 client = boto3.client('bedrock-runtime', region_name='us-east-1') response = client.converse( modelId='deepseek.v3.2', messages=[ { 'role': 'user', 'content': [{'text': 'Can you explain the features of Amazon Bedrock?'}] } ] ) print(response)