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.25.0
Context
32K
Concurrency
64
Write the config
Create and move into the project directory:config.yaml and paste the following:
config.yaml
zeroentropy/zembed-1-embedding on a single H100 with the stock vllm/vllm-openai:v0.25.0 image running the pooling runner. The weights: block pins the checkpoint to a commit SHA, mirrors it to the Baseten Delivery Network at deploy time, and pre-mounts it at /models/zembed-1, so vLLM loads from local disk and never calls Hugging Face at runtime. The deployment exposes an OpenAI-compatible /v1/embeddings endpoint with 2,560-dimensional output.
Flags
Thestart_command passes these flags to the engine. Each one controls a runtime or serving behavior:
Deploy
Push the config to Baseten:truss push prints your model ID (abc1d2ef in the example). The examples below use it wherever you see {model_id}, and read your API key from the BASETEN_API_KEY environment variable.
Call the model
Your deployment serves an OpenAI-compatible embeddings API at/v1/embeddings.
Now call your deployment to generate embeddings:
- Python
- cURL
main.py
/v1/embeddings endpoint does not
auto-apply sentence-transformers prompts, so prepend the correct
instruction prefix yourself. Pull the exact strings from the model’s
config_sentence_transformers.json or the Hugging Face model card.
For smaller vectors, pass the OpenAI dimensions parameter. Zembed-1 uses
learned projection layers, not Matryoshka truncation, so naive truncation
can degrade quality. Always use the dimensions parameter rather than
truncating the output yourself.
For higher throughput, use the Baseten Performance Client, which batches and pipelines requests automatically.
Next steps
Call your model
Endpoint anatomy, authentication, and sync versus async inference
Autoscaling
Scale replicas with traffic, including scale to zero