本文来源公众号“Coggle数据科学”,仅用于学术分享,侵权删,干货满满。
原文链接:小白学RAG:HuggingFace Text Embeddings Inference
文本嵌入推理 (Text Embeddings Inference, TEI) 是一个用于部署和服务开源文本嵌入及序列分类模型的工具包。TEI 为最流行的模型(如 FlagEmbedding、Ember、GTE 和 E5)提供了高性能的推理能力。
-
小型 Docker 镜像和快速启动时间:适合真正的无服务器部署。
-
基于 token 的动态批处理:提高推理效率。
-
优化的推理代码:使用 Flash Attention、Candle 和 cuBLASLt 进行推理加速。
安装与使用
model=BAAI/bge-large-en-v1.5
volume=$PWD/data # share a volume with the Docker container to avoid downloading weights every run
d