Setup
Sign in to Baseten with Truss, then install the OpenAI SDK.Sign in to Baseten
Install the OpenAI SDK
Hardware
H100
Engine
vLLM 0.23.0
Context
128K
Concurrency
128
Write the config
Create and move into the project directory:config.yaml and paste the following:
config.yaml
vllm/vllm-openai:v0.23.0 image, the release that adds MellumForCausalLM support, and streams weights from JetBrains/Mellum2-12B-A2.5B-Instruct with the Run:ai streamer. The Hermes tool-call parser enables OpenAI-compatible function calling, and a concurrency ceiling of 128 keeps the deployment throughput-friendly for coding assistants.
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-model-len | auto | Maximum context length (tokens) the server accepts per request. |
--enable-prefix-caching | (no value) | Reuse KV cache across requests that share a prefix. |
--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. |
--trust-remote-code | (no value) | Execute model-specific Python from the checkpoint (required for many Qwen, Phi, and custom architectures). |
--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: