- Lowest-latency inference across any embedding solution (vLLM, SGlang, Infinity, TEI, Ollama)1
- Highest-throughput inference across any embedding solution (vLLM, SGlang, Infinity, TEI, Ollama) - thanks to XQA kernels, FP8 and dynamic batching.2
- High parallelism: up to 1400 client embeddings per second
- Cached model weights for fast vertical scaling and high availability - no Hugging Face hub dependency at runtime
- Ahead-of-time compilation, memory allocation and fp8 post-training quantization
Get started with embedding models:
Embedding models are LLMs without a lm_head for language generation. Typical architectures that are supported for embeddings areLlamaModel, BertModel, RobertaModel or Gemma2Model, and contain the safetensors, config, tokenizer and sentence-transformer config files.
A good example is the repo BAAI/bge-multilingual-gemma2.
To deploy a model for embeddings, set the following config in your local directory.
config.yaml
RTX_PRO_6000 for 1 GPU. Leave tensor_parallel_count unset.
With config.yaml in your local directory, deploy the model to Baseten and promote it to the production environment:
Example deployment of classification, reranking, and classification models
Besides embedding models, BEI deploys high-throughput rerank and classification models. You can identify suitable architectures by theirForSequenceClassification suffix in the Hugging Face repo.
The use-case for these models is either Reward Modeling, Reranking documents in RAG or tasks like content moderation.
Benchmarks and performance optimizations
Embedding models on BEI are fast, and offer currently the fastest implementation for embeddings across all open-source and closed-source providers. The team behind the implementation is the authors of infinity. We recommend using fp8 quantization for Llama, Mistral, and Qwen2 models on L4 or newer (L4, H100, H200, and B200). Quality difference between fp8 and bfloat16 is often negligible: embedding models often retain >99% cosine similarity between both precisions, and reranking models retain the ranking order despite a difference in the retained output. For more details, check out the technical launch post.
Deploy custom or fine-tuned models on BEI
We support the deployment of the below models, as well as all finetuned variants of these models (same architecture & customized weights). The following repositories are supported - this list is not exhaustive.
1 measured on H100-HBM3 (bert-large-335M, for BAAI/bge-en-icl: 9ms)
2 measured on H100-HBM3 (leading model architecture on MTEB, MistralModel-7B)
Deploy a reranker on two L4s
Createconfig.yaml to deploy the ModernBERT reranker with BEI-Bert:
config.yaml
baseten model push from this directory. Set accelerator: L4:4 for four GPUs. Each GPU loads a complete model and consumes batches from a shared queue. Set checkpoint_repository.revision to the commit you validated for reproducible deployments.
For small embedding, reranking, and decision models, start with two or four L4s or RTX 6000 Ada GPUs where available. Select RTX resources with your Baseten representative. Measure throughput and p95 latency with concurrent traffic. See multi-GPU sizing for per-GPU memory requirements.
Text model request examples
Each example requires a deployment of its named checkpoint. Set the model’s production URL and your API key:Qwen3 embeddings
WithQwen/Qwen3-Embedding-0.6B deployed, include the retrieval instruction in queries. Embed documents without the query instruction.
Query and document prompts
Withmichaelfeil/embeddinggemma-300m deployed, use its query and document prompts:
nomic-ai/modernbert-embed-base, use the same request shape with search_query: and search_document: prefixes. For BAAI/bge-m3, send text without a prefix. Change the model value to match your deployment.
Rank documents
WithAlibaba-NLP/gte-reranker-modernbert-base deployed:
Sequence classification
WithSamLowe/roberta-base-go_emotions deployed through encoder_bert and webserver_default_route: /predict:
Typed decisions
Deploymichaelfeil/laya-typed-decisions with BEI-Bert by setting base_model: encoder_bert in the trt_llm configuration. The checkpoint uses BF16 and its custom decision head; set quantization_type: no_quant and call the explicit /sync/v1/systemone route.
Create config.yaml:
config.yaml
L4 for one GPU or L4:4 for four. Baseten manages startup, ports, and health checks through the BEI-Bert deployment. Use the explicit sync URL below for decisions; leave webserver_default_route unset.
Deploy and promote it:
state. Serialize structured records into text before sending them. Answers include the selected choice, a boolean probability, or an expected zero-based score, plus confidence and action probability fields.