This example deploys a text generation API using Phi-4-mini-reasoning and vLLM. It illustrates how VESSL AI facilitates the common logics of model deployment from launching a GPU-accelerated service workload to establishing an API server.Upon deployment, VESSL also offloads the challenges in managing production models while ensuring availability, scalability, and reliability.VESSL guides you to smooth and seamless performance with the following items:
Autoscaling the model to handle peak loads and scale to zero when it’s not being used.
Routing traffic efficiently across different model versions.
Providing a real-time monitoring of predictions and performance metrics through comprehensive dashboards and logs.
We’ll start with the Phi-4-mini-reasoning example, which demonstrates how to deploy an AI service using a single YAML file. Follow these steps to prepare:
# Clone the example repositorygit clone https://github.com/vessl-ai/examples.git## Install and configure vesslpip install vesslvessl configure
For YAML manifest details, refer to the YAML schema reference.Deploy your server easily using the YAML configuration and VESSL CLI with the following command:
cd examples/services/service-quickstartvessl service create -f quickstart.yaml
Upon activation, access your model via the provided endpoint, as depicted below:
Due to compatibility issues between Python and VESSL CLI, executing the command (vessl service create -f quickstart.yaml) may temporarily result in unexpected errors. If this occurs, please use VESSL CLI with Python 3.12 for the time being. We are working on it.
NotFound (404): Requested entity not found error while creating Revisions or Gateways via CLI:
Use the vessl whoami command to confirm if the default organization matches the one where Service exists.
You can use the vessl configure --reset command to change the default organization.
Ensure that Service is properly created within the selected default organization.
What’s the difference between Gateway and Endpoint?
There is no difference between the two terms; they refer to the same concept.
To prevent confusion, these terms will be unified under “Endpoint” in the future.
HPA Scale-in/Scale-out Approach:
Currently, VESSL Service operates based on Kubernetes’ Horizontal Pod Autoscaler (HPA) and uses its algorithms as is. For detailed information, refer to the Kubernetes documentation.
As an example of how it works based on CPU metrics:
Desired replicas = ceil[current replicas * ( current CPU metric value / desired CPU metric value )]
The HPA constantly monitors this metric and adjusts the current replicas within the [min, max] range.