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

Install the Baseten CLI and sign in, then install the OpenAI SDK.
Install and sign in to Baseten
Terminal
For other platforms or a specific version, see the Baseten CLI install reference.
Install the OpenAI SDK
To install without Homebrew, see the Baseten CLI install reference. This preset serves Zembed-1 Embedding 4B on a single H100 through Hugging Face Text Embeddings Inference, optimized for batch embedding throughput with a high concurrency ceiling.

Hardware

H100

Engine

Text Embeddings Inference cuda-1.9

Context

40K

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 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

The start_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:
You should see output similar to:
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:
main.py
Zembed-1 is instruction-aware. Pass 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