Skip to main content
ZeroEntropy’s Zembed-1 is a 4B-parameter text embedding model built for high-quality semantic search and retrieval. It produces native 2,560-dimensional embeddings and supports smaller dimensions through learned projection layers rather than standard Matryoshka truncation.

Setup

Sign in to Baseten with Truss, then install the OpenAI SDK.
Sign in to Baseten
Install the OpenAI SDK
This preset serves Zembed-1 Embedding 4B on a single H100 through vLLM’s OpenAI-compatible server, optimized for batch embedding throughput with a concurrency of 64.

Hardware

H100

Engine

vLLM 0.25.0

Context

32K

Concurrency

64

Write the config

Create and move into the project directory:
Then create a file named config.yaml and paste the following:
config.yaml
This config tells Baseten to serve 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

The start_command passes these flags to the engine. Each one controls a runtime or serving behavior:

Deploy

Push the config to Baseten:
You should see output similar to:
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:
main.py
Zembed-1 is instruction-aware. The /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