Setup
To get started, sign into Baseten with Truss and then install the OpenAI SDK.Sign in to Baseten
Install the OpenAI SDK
Hardware
RTX_PRO_6000
Engine
vLLM (0.22.0-cu129 build)
Concurrency
8
Write the config
Create and move into the project directory:config.yaml and paste the following:
config.yaml
Flags
Thestart_command passes these flags to the engine. Each one controls a runtime or serving behavior:
| Flag | Value | What it does |
|---|---|---|
--tensor-parallel-size | $GPU_COUNT | Number of GPUs to shard the model across. |
--max-num-seqs | 16 | Maximum number of concurrent sequences in the batch. |
--max-model-len | auto | Maximum context length (tokens) the server accepts per request. |
--limit-mm-per-prompt.image | 2 | Maximum number of image inputs per prompt. |
--gpu-memory-utilization | 0.9 | Fraction of GPU memory vLLM may use for weights and KV cache. |
--enable-prefix-caching | (no value) | Reuse KV cache across requests that share a prefix. |
--trust-remote-code | (no value) | Execute model-specific Python from the checkpoint (required for many Qwen, Phi, and custom architectures). |
--enable-auto-tool-choice | (no value) | Let the model choose when to call tools without requiring tool_choice: "required". |
--tool-call-parser | hermes | Server-side parser that emits structured tool_calls on the response. hermes: Hermes-style function calls. |
--load-format | runai_streamer | Weight loading backend. runai_streamer: Stream weights from object storage without materializing to disk. |
Deploy
Push the config to Baseten:truss push output (abcd1234 in the example). Use it wherever you see {model_id} in the next section.
Call the model
Your deployment serves an OpenAI-compatible API. Replace{model_id} with your model ID and make sure BASETEN_API_KEY is set.
Now call your deployment to run inference:
- Python
- cURL
main.py
tools array. The server returns structured tool_calls on the response: