注册并分享邀请链接,可获得视频播放与邀请奖励。

Niels Rogge
@NielsRogge
ML Engineer @huggingface. Building @KU_Leuven grad. General interest in machine & deep learning. Making AI more accessible for everyone!
加入 April 2010
745 正在关注    24.1K 粉丝
Sentence Transformers v6 has been released, and it is centered around Multi-Vector Embedding Models, what does that mean? Usually, when you build a semantic search or RAG-based system, you've probably used the @OpenAI embedding API or similar, as it allows to quickly index and search through a set of documents. Such embedding models are called "bi-encoders", as they typically encode 2 things ("bi"): encode each document or chunk, encode the query, and then compute pairwise cosine similarity between each (document, query) pair to retrieve the top-k ones. This is known as vector search or semantic search, and typically achieves better results compared to traditional keyword search, which relies on the classic BM25 algorithm. In 2020, researchers at @Stanford came up with something better than bi-encoders, called ColBERT. The idea is to create many vectors for each document, and many vectors for each query. One creates a vector for each token (a word or part of a word) of the query, and a vector for each token of each document. Next, to find the best matches, one computes the so-called MaxSim similarity. This is illustrated in the animation below. Unlike traditional vector similarity metrics that operate on pairs of single vectors, MaxSim computes similarity between sequences of vectors. The key insight here: each query token finds its best match in the document, then we sum. This enables fine-grained semantic matching and avoids averaging. These "multi-vector" embedding models are also called "late-interaction" models, as they keep multiple vectors for each document and query, delaying the matching step until the very end. Over the last year, researchers at @LightOnIO trained some very impressive late interaction models, which they openly released on @huggingface. Today, the Sentence Transformers library, which is the go-to library for open-source embedding models, added first-class support for them, as well as for a variety of SOTA late interaction models trained by @mixedbreadai, @liquidai and more. This means that you can now also train or fine-tune your own late interaction models very easily. Various vector databases like @elastic and @qdrant_engine already include support for multi-vector embedding models. This integration will definitely boost adoption of multi-vector embedding models by the industry. Read more here: - ColBERT paper: - Blog:
显示更多
0
5
146
17
转发到社区