nsorros .com
online
โ† back to writing

Static embeddings

Do you need faster embeddings? Consider static embeddings ๐ŸŽ๏ธ

Embeddings power many use cases of modern AI since they transform natural language into a numeric representation. The better performing embeddings are calculated during runtime, as their semantic representation depends on the exact wording. However that also means that generating such embeddings is quite slow ๐ŸŒ

One way to speed them up is to precompute a representation on the word level that you can combine into a unified representation at runtime. This is not a new approach - the first embeddings models like word2vec and glove followed that idea. What is new though is that we can now train those representations using the latest techniques available, which boosts their performance significantly - while keeping the speed gains ๐Ÿ”ฅ

That gives a nice middle ground between dynamic and performant embedding models like bge and static keyword based approaches like bm25 that do not carry semantic information.

https://huggingface.co/blog/static-embeddings

image