Product quantization in Faiss and from scratch
HTML-код
- Опубликовано: 25 июл 2024
- In this video, we talk about a vector compression technique called Product quantization. We first explain conceptually, what the main ideas are and then show how one can use an existing implementation of it from Faiss (IndexPQ). Finally, we also implement the algorithm from scratch. Last but not least, we run some experiments and compare different methods.
Paper: lear.inrialpes.fr/pubs/2011/J...
Code: github.com/jankrepl/mildlyove...
Faiss: github.com/facebookresearch/f...
Nanopq: github.com/matsui528/nanopq
00:00 Intro
00:45 Overview: Similarity search [slides]
01:50 Overview: Main idea [slides]
02:18 Overview: How exactly codes created [slides]
03:25 Overview: Similarity search with PQ [slides]
04:24 PQ in Faiss [code]
09:40 Custom PQ - Constructor [code]
12:25 Custom PQ - Training [code]
13:49 Custom PQ - Encoding and add method [code]
15:11 Custom PQ - Computing distance [code]
17:36 Custom PQ - Search [code]
18:56 Making sure things work [code]
20:48 Results: CustomPQ vs Faiss? [demo]
22:59 Results: Number of segments tradeoff [demo]
24:17 Outro
If you have any video suggestions or you just wanna chat feel free to join the discord server: / discord
Twitter: / moverfitted
Credits logo animation
Title: Conjungation · Author: Uncle Milk · Source: / unclemilk · License: creativecommons.org/licenses/... · Download (9MB): auboutdufil.com/?id=600 Наука
I'm a huge fan of implementing algorithms from scratch by myself and watched this video with a great pleasure. Thanks for your work, it deserves more attention.
Thank you for the message!
Amazing video, with amazing explanation, thanks a ton for the efforts!
Glad you liked it!
Your explanation is simple and easy to follow your code.
Thanks.
Happy to hear that!
Great video ! Good explanation. Thanks for all your efforts in making detailed video along with code !
You are welcome!
This is the best video on this topic. Thank you!
Appreciate your comment!
I am doing phd in AI but not so good at coding as my background is math. I learn a lot for coding from your videos. Immense thanks to you for your contribution.
I am happy to hear that! Thanks!
Hey there, amazing effort and work! I understand it takes a lot of work and, if possible, would be hugely beneficial if you can upload them more regularly! Again, thanks so much for your coding work!
Thank you! I will definitely try to go back to a more regular schedule in the near future.
Thx! Great explanation! This channel deserves more views and subscribers!
I appreciate that!
Very interesting. Good job.🕶
Thank you so much for this video! 🙏
What a video! awesome :)
Thanks! 😃
Hey there, amazing video ! Could you please explain how the entry into the distance table is calculated and what it represents ? Thanks in advance
Thank you! Sorry if the video was not clear on how the distance table is created. See this blog post for an explenation: mccormickml.com/2017/10/13/product-quantizer-tutorial-part-1/