Setup
Install the Baseten CLI and sign in, then install the OpenAI SDK.Install and sign in to BasetenFor other platforms or a specific version, see the Baseten CLI install reference.
- macOS or Linux
- Windows
Terminal
Install the OpenAI SDK
Hardware
H100
Engine
Text Embeddings Inference cuda-1.9
Context
40K
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 ghcr.io/huggingface/text-embeddings-inference:cuda-1.9 running the text-embeddings-router in FP16. The weights: block pins the checkpoint to the Apache-2.0 relicense revision, mirrors it to the Baseten Delivery Network at deploy time, and mounts it at /data/zembed-1-embedding, so the router loads from local disk and never calls Hugging Face at runtime. The router accepts batches of up to 8192 tokens and returns 2,560-dimensional embeddings.
Flags
Thestart_command passes these flags to the engine. Each one controls a runtime or serving behavior:
Deploy
Push the config to Baseten with the Baseten CLI, or with the Truss CLI if you prefer it:baseten model 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 embeddings API at/embed.
Now call your deployment to generate embeddings:
- Python
- cURL
main.py
prompt_name: query for search queries and
prompt_name: document for indexed text. The router falls back to the document
prompt when the field is absent, so set prompt_name: query on the query side.
For smaller vectors, pass the dimensions parameter instead of truncating the
output yourself. Zembed-1 uses learned projection layers, not Matryoshka
truncation, so naive truncation degrades quality.
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