Google Vertex AI
A step-by-step guide to deploying AI Singapore's SEA-LION models to run as an endpoint on Google's Vertex AI.
Go to Google's Model Garden
Scroll down (in the main page) to the "All Partners" section, and click on "Hugging Face".
Set the “Filter by Name” to “aisingapore”. A list of SEA-LION models will appear.

Click the model you wish to deploy, and a side panel will pop up. Here you can set the name of your endpoint, select the region and machine spec to deploy the model to. Then click on Deploy to complete the deployment.
(Note: make sure you have enough hardware quota in your selected region)

The deployment takes some time (depending on the size of the model). When done, you will see the deployed endpoint in your Endpoints page
Take note of your endpoint ID.

To test your deployed endpoint using a Python program,
a. Get a Vertex AI service key from your administrator, or create one yourself if you have the right permissions on GCP.
b. Install the Google Cloud SDK for your system.
c. Make sure your Google Cloud SDK is properly installed and authenticated by running the following command:
gcloud auth logind. Create a new Python environment and install the following packages:
pip install google-cloud-aiplatform openaiCreate a Python program
vt-test.pycontaining the following code:
Make sure your Vertex AI service key JSON file (named
vt-svc-key.json) is in the same directory as your Python program.Run your program
python vt-test.pyand see the result:
Below is a sample
bashscriptcurl_test.shfor calling the endpoint via CLI usingcurl:
When run,
Last updated