Embedding and Reranker Server: Do Not Spend Your LLM GPU on Every RAG Embedding Request
Embedding and reranking have different inference profiles from LLM generation. A separate TEI service lets you scale embedding batches and cross-encoder reranking independently, keeping expensive generative GPUs focused on generation.
Can one inference stack serve embeddings and reranking?
Hugging Face Text Embeddings Inference supports embedding models plus reranker/sequence-classification models. TEI exposes an OpenAI-compatible `/v1/embeddings` endpoint; separate deployments for rerankers simplify capacity and model lifecycle management.
On this pageEmbedding and Reranker Server: Do Not Spend Your LLM GPU on Every RAG Embedding Request
01
RAG retrieval flow
Where embedding and reranking sit in a RAG pipeline
The query becomes an embedding, the vector DB returns candidates, the reranker re-scores query-document pairs and the best context is sent to the LLM.
Separate indexing batch throughput from online query latency
Large batches can be efficient for indexing millions of documents, while online queries may need smaller batches and separate replicas for low latency.
Protect embedding services like any other model API
Embedding endpoints process user text, so sensitive document/query content can leak through logs and telemetry. Use private networking, authentication and log redaction.
Private endpointAuthenticationRedact input logsPin model versionHealth checksAutoscale online pool