Model Garden 提供多種選項,可供您快速查看及測試模型功能。對於支援的模型,您可以試用展示遊樂場,或啟動名為「模型園地空間」的展示應用程式,並與他人分享,展示模型的功能。
Playground 採用預先部署的 Vertex AI 線上預測端點,不會產生費用。開啟支援模型的模型資訊卡後,即可使用「試用」面板傳送文字提示,快速測試模型功能。您也可以設定一些最常見的參數,例如 temperature 和輸出詞元數量。Playground 僅支援輸入和輸出文字。
啟動 Spaces 後,您會獲得可運作的網路應用程式,與部署模型及建構應用程式來使用模型端點相比,手動作業量大幅減少。Model Garden 會在 Vertex AI 中部署所選模型,並在 Cloud Run 執行個體上部署範例應用程式,該執行個體會使用已部署模型的端點。應用程式也可以使用現有端點或 MaaS 端點。
如要啟動模型,請開啟支援模型的模型資訊卡,然後在「試用 Spaces」面板中,按一下要啟動的 Space。您需要為部署作業使用的機器,以及代管應用程式的 Cloud Run 執行個體付費。
事前準備
本教學課程需要設定 Google Cloud 專案,並啟用 Vertex AI API。
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Try it: Test model capabilities using demo playgrounds in Model Garden\n\nModel Garden hosts public demo playgrounds for\n[supported models](#supported_models). The playgrounds are powered by predeployed\nVertex AI [online prediction endpoints](/vertex-ai/docs/predictions/overview).\n\nWhen you open the model card for a supported model, a **Try out** panel is\nembedded in the card. You can quickly test the model's capabilities by sending a\ntext prompt in the **Try out** panel. The **Try out** panel also lets you set\nsome of the most common parameters such as temperature and number of output\ntokens.\n\nSupported models\n----------------\n\nThe following models have demo playgrounds available.\n\nBefore you begin\n----------------\n\nThis tutorial requires you to set up a Google Cloud project and enable the\nVertex AI API.\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Vertex AI API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Vertex AI API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com)\n\n\u003cbr /\u003e\n\nTry out Gemma 2\n---------------\n\nIn this quickstart, you try out the `Gemma-2b-it` model. Note that\n`-it` stands for [instruction-tuned](/vertex-ai/generative-ai/docs/open-models/use-gemma#gem-model-sizes).\n\n1. In the Google Cloud console, go to the **Gemma 2** model card.\n\n [Go to Gemma 2](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemma2)\n2. In the **Try out** panel:\n\n 1. For **Region**, accept the default or choose your region.\n 2. For **Endpoint** , select **Demo playground (Free)2b-it**.\n 3. In the **Prompt** box, enter `Why is the sky blue?`.\n 4. Expand the **Advanced options** section and view the default parameters.\n\n3. Click **Submit**. The output appears below the Submit button.\n\nClean up\n--------\n\nTo avoid incurring charges to your Google Cloud account for the resources used\non this page, follow these steps.\n\n### Delete the project\n\n\nThe easiest way to eliminate billing is to delete the project that you\ncreated for the tutorial.\n\nTo delete the project:\n\n| **Caution** : Deleting a project has the following effects:\n|\n| - **Everything in the project is deleted.** If you used an existing project for the tasks in this document, when you delete it, you also delete any other work you've done in the project.\n| - **Custom project IDs are lost.** When you created this project, you might have created a custom project ID that you want to use in the future. To preserve the URLs that use the project ID, such as an `appspot.com` URL, delete selected resources inside the project instead of deleting the whole project.\n|\n|\n| If you plan to explore multiple architectures, tutorials, or quickstarts, reusing projects\n| can help you avoid exceeding project quota limits.\n1. In the Google Cloud console, go to the **Manage resources** page.\n\n [Go to Manage resources](https://console.cloud.google.com/iam-admin/projects)\n2. In the project list, select the project that you want to delete, and then click **Delete**.\n3. In the dialog, type the project ID, and then click **Shut down** to delete the project.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nWhat's next\n-----------\n\nSee an [overview of Model Garden](/vertex-ai/generative-ai/docs/model-garden/explore-models)."]]