2 ms·
Trust me it is not that complicated, if you spend 1-2 hours on this you will walk away with a good grasp. But if you try the same for neural nets, it's impossib
by visarga 4y ago
Trust me it is not that complicated, if you spend 1-2 hours on this you will walk away with a good grasp. But if you try the same for neural nets, it's impossible.
Once you understand the dot product operation, which is high-school level math, can be written as a for loop with a multiply and add, it all falls from it. How do you speed up millions of dot products? Try a tree, clusters, hashing, inverted indices, GPUs...
For a few million vectors it's a solved problem since 5 years ago. I was using annoy in 2017, the library is 10 years old, first commit on Feb 20, 2013. It's as old as the deep learning age.
That's why I was curious why all this recent discussion about it, it's certainly a discovery phase for many people when they realise such a tool exists, made possible by the availability of efficient embedding models and needed by LLMs for retrieval.