Skip to main content
Hugging Face Text Embeddings Inference (TEI) is a toolkit for deploying and serving open-source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5.
To use it within langchain, first install huggingface-hub.
Then expose an embedding model using TEI. For instance, using Docker, you can serve BAAI/bge-large-en-v1.5 as follows:
Specifics on Docker usage might vary with the underlying hardware. For example, to serve the model on Intel Gaudi/Gaudi2 hardware, refer to the tei-gaudi repository for the relevant docker run command. Finally, instantiate the client and embed your texts.