How we built BEI: high-throughput embedding, reranker, and classifier inference
Mar 27, 2025

Summary
This post details the development of Baseten Embedding Inference (BEI), an optimized inference runtime built on TensorRT-LLM. It addresses the challenges of high-throughput corpus processing and low-latency real-time querying for modern, larger embedding models. Key technical contributions include leveraging TensorRT-LLM for performance, implementing sequence packing for efficient batching without OOM errors, and optimizing for both high throughput (up to 2.05x improvement with FP8 quantization) and low latency for individual requests. The post also discusses infrastructure considerations like queueing, backpressure, and network overhead.
More from the Baseten AI Model Deployment and Serving Platform trail
- LangChain trains custom models for LangSmith Engine with Baseten Loops
- DeepSeek-V4.1-Flash: more efficient prefill for coding agents
- Blaxel is joining Baseten to build the future of agentic infrastructure
- How Baseten makes pyannote’s diarization models 9.6x faster
- Optimizing delta weight syncs for managed rollouts