Deploy a model service on an AI node

更新时间:
复制 MD 格式

This topic describes how to use an AI node to deploy, test, and undeploy a model service to help you quickly set up and manage your model services.

Prerequisites

You have added an AI node to your AnalyticDB for PostgreSQL instance. You can add an AI node either when you create an instance or enable the AI node feature and add an AI node for an existing instance.

Deploy a model service

  1. Log on to the AnalyticDB for PostgreSQL console. Find the instance that you want to manage and click the instance ID.

  2. In the navigation pane on the left, click AI Nodes > Model Deployment.

  3. In the upper-left corner of the page, click Model Deployment. In the dialog box that appears, click OK.

  4. Configure the model deployment parameters and click OK to start the deployment.

  5. After the deployment is complete, find the model deployment and click Connection Information in the Actions column to view the Internal Endpoint, Public Endpoint, and API_KEY.

Test the model service

Use the following command to test the model service.

Important

To access the model service, you must add the source IP address to the ip address whitelist. You can configure this whitelist during deployment or modify it later by clicking Whitelist Settings in the Actions column.

curl -k 'your-api-url-here/v1/rerank' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer your-api-key-here' \
-d '{
  "model": "Qwen3-Reranker-8B",
  "query": "How do I learn machine learning?",
  "documents": ["Text 1", "Text 2", "Text 3"],
  "top_k": 5
}'

Undeploy a model service

Important

Before you delete an AI node, you must undeploy the model service. You cannot delete an AI node that is in the Bound state.

Find the model deployment and click Undeploy model in the Actions column to delete the model service. After the service is deleted, the status of the corresponding AI node changes to Unbound.