- Tutorials
- 4 min read
How to serve a language model with vLLM on AIUBY Compute

vLLM + Phi-3 mini + NVIDIA L4
On this page
The vllm-openai template starts a vLLM server with Microsoft's Phi-3 mini and responds in the OpenAI API format. There is no image to build: the file uses the official vLLM image and picks the model through arguments. This tutorial goes from the template to a responding endpoint, from the command line.
#Who can follow this to the end
Any organization with AIUBY Compute can copy the template, validate it, register the application and read the plan. Deploying with a GPU is paid, per minute of running instance: it requires a prepaid balance that covers 20 minutes of the GPU, plus the per-application minimum, and a monthly Compute cap on the workspace, as described in GPU on sale in AIUBY Compute, by the minute. Without that, the plan responds with the reasons and the deployment request is rejected. Organizations enabled by the AIUBY team for the runtime preview deploy at no charge, with a time limit.
What you need:
- Node.js 20 or newer and the CLI installed (
npm install -g @aiuby-ia/cli). - AIUBY Compute added under Products.
- An API key with the scopes "Read Compute" and "Manage Compute applications". To deploy, also "Deploy to Compute".
#The template aiuby.toml
This is the file that aiuby init copies, unchanged:
name = "Inferência vLLM"
slug = "inferencia-vllm"
[config]
runtime = "container"
image = "docker.io/vllm/vllm-openai:latest"
args = ["--model", "microsoft/Phi-3-mini-4k-instruct", "--host", "0.0.0.0", "--port", "8080", "--max-model-len", "4096"]
port = 8080
[config.env]
HF_HOME = "/tmp/hf"
[config.hardware]
provider = "gcp"
cpu = 4
memoryMb = 16384
[config.hardware.gpu]
sku = "gcp-cloudrun-l4"
count = 1
[config.scaling]
minReplicas = 0
maxReplicas = 1Three points deserve attention:
argsreplaces the image's default command. It is how the model is chosen, and the server port must matchport.- The hardware block is the exact shape of the GPU: one NVIDIA L4 (24 GB of video memory), 4 vCPU, 16 GB and one replica. On Cloud Run the GPU only starts with its minimum machine. Asking for 2 vCPU, 8 GB or two replicas does not save money: it blocks the plan.
HF_HOMEonly says where the downloaded model is stored. Environment variables here are settings, not a place for passwords, keys or tokens: they are visible to anyone who can see the application.
#Step by step
Log in and copy the template
The CLI asks for the key in the terminal, without echo. Then copy the template into a new directory.
terminal aiuby login aiuby init vllm-openai meu-modelo cd meu-modeloValidate the file
Validation is local and does not use the network. If you want, change the name and identifier first.
terminal aiuby config validateRegister the application
Registering does not deploy or create any cloud resource. It stores the configuration as revision r1.
terminal aiuby apps createRequest the plan
The plan is read-only. It says whether the application can be deployed and, if not, lists the reasons and exits with code 4. If you are not in the preview, you stop here.
terminal aiuby deploy --dry-run inferencia-vllmDeploy
The CLI requests the deployment and follows it for up to 3 minutes. It shows the region, the public URL and the time limit.
terminal aiuby deploy inferencia-vllmFollow the logs
aiuby logsshows the last lines of the most recent deployment (100 by default, up to 200), including one that failed.terminal aiuby apps status inferencia-vllm aiuby logs inferencia-vllmStop when you are done
Stopping deletes the service, and the URL stops responding.
terminal aiuby stop inferencia-vllm
#The first startup
The GPU service is ready quickly: in our tests on November 12, 2026, an L4 in Belgium was ready in about 20 seconds. What takes time is the model. On the first startup vLLM downloads Phi-3 mini and loads it onto the GPU, and that takes close to 10 minutes.
| What | How long |
|---|---|
| First startup of the template, including the model download | Close to 10 minutes |
| Time the platform allows for the port to open, with GPU | Up to 15 minutes |
| Time the CLI follows the deployment | Up to 3 minutes |
| Time limit for a GPU application in the preview | 1 hour by default, 2 at most |
In practice, the CLI returns control with the application still "deploying". That is not a failure: keep going with aiuby apps status and aiuby logs until it shows "running". If the port does not open within 15 minutes, the startup fails: the logs remain available to see what happened.
Warning
#Call the endpoint
vLLM serves the OpenAI API chat route at /v1/chat/completions. Replace ENDERECO with the URL that aiuby deploy showed. The model name is the same one passed in --model. The route and body format are vLLM's: this example follows its documentation.
curl -sS "ENDERECO/v1/chat/completions" \
-H "Content-Type: application/json" \
-d '{
"model": "microsoft/Phi-3-mini-4k-instruct",
"messages": [{ "role": "user", "content": "Explique em uma frase o que é um contêiner." }],
"max_tokens": 120
}'The template limits context to 4,096 tokens (--max-model-len): prompt and response must fit within that. For another model, replace --model with one that fits in the GPU's 24 GB and whose license allows your use, and save it with aiuby apps update, which creates a new revision.
#Limits
Limit
- There is no GPU in Brazil. The L4 is in Belgium: expect the latency and data processed outside the country.
- The URL is public by default: anyone with the URL can call the model. With sensitive data, require an access token on the application screen before deploying.
- One replica, which scales to zero when idle. The next request pays for loading the model again.
- Only a few GPU applications can run at the same time across the whole platform (3 at most). The plan warns you when there is no slot.
- The image uses the
latesttag: the vLLM version changes when the project publishes a new one. To pin it, change the tag. - We have not measured throughput or response time for Phi-3 mini in this template. When we do, we will publish it.
The full limits are in Compute, in the documentation. The GPU test that led to the preview is in Serverless GPU on Cloud Run.


