Model Garden 可讓您自行部署特定合作夥伴模型 (預先發布版)。自行部署的模型並非無伺服器。您必須先在 Gemini Enterprise Agent Platform 部署,才能使用。這些模型會安全地部署在Google Cloud 專案和虛擬私有雲網路中。如要進一步瞭解自行部署的模型,請參閱自行部署模型的說明文件。
購買可自行部署的合作夥伴模型
如要在 Gemini Enterprise Agent Platform 部署可自行部署的合作夥伴模型,必須先透過 Google Cloud Marketplace 購買。如要購買自行部署的合作夥伴模型,請按照下列步驟操作:
前往 Model Garden。
在「Model collections」(模型集合) 中,按一下「Self-deployable partner models」(可自行部署的合作夥伴模型),篩選模型清單。
按一下要購買的合作夥伴模型資訊卡。
按一下「與銷售人員聯絡」。
填妥表單並提交要求。
完成這些步驟後, Google Cloud 業務代表會與您聯絡,協助完成購買程序。
可部署模型
購買可自行部署的合作夥伴模型後,您可以使用一鍵部署功能,將模型部署至 Gemini Enterprise Agent Platform 端點。這項程序會預先完成必要設定,簡化部署作業。
您可以使用 Google Cloud 控制台或 Python 適用的 Agent Platform SDK,一鍵部署。
控制台
如要在 Google Cloud 控制台部署合作夥伴模型,請按照下列步驟操作:
前往 Model Garden。
找出並點選要使用的合作夥伴模型資訊卡。
按一下 [Deploy model] (部署模型)。
按照提示調整部署設定。
點選「Deploy」(部署)。
Python
下列範例說明如何使用 Agent Platform SDK for Python 部署合作夥伴模型。將預留位置值替換為您的特定資訊。
import agentplatform
from agentplatform import types
client = agentplatform.Client(project="PROJECT_ID", location="LOCATION")
response = client.model_garden.deploy_publisher_model(
# Replace with the actual partner model ID from Model Garden
model="PARTNER_MODEL_ID",
config=types.DeployPublisherModelConfig(
accept_eula=True,
machine_type="MACHINE_TYPE", # e.g., "a3-ultragpu-8g"
accelerator_type="ACCELERATOR_TYPE", # e.g., "NVIDIA_H200_141GB"
accelerator_count=ACCELERATOR_COUNT, # e.g., 8
endpoint_display_name="ENDPOINT_DISPLAY_NAME",
model_display_name="MODEL_DISPLAY_NAME",
),
)
print(f"Model deployed to endpoint: {response.endpoint}")
請從模型的驗證部署選項中,選取機型和加速器。如要列出這些項目,請呼叫 client.model_garden.list_publisher_model_deploy_options(model="PARTNER_MODEL_ID")。合作夥伴模型會使用發布者的服務容器,因此您無法覆寫容器映像檔。