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
  • НаукаНаука

Комментарии • 22

  • @user-td8vz8cn1h
    @user-td8vz8cn1h 4 месяца назад +2

    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.

  • @wolfisraging
    @wolfisraging 2 года назад +7

    Amazing video, with amazing explanation, thanks a ton for the efforts!

  • @ThanhNguyen-rz4tf
    @ThanhNguyen-rz4tf 10 месяцев назад +1

    Your explanation is simple and easy to follow your code.
    Thanks.

  • @PrafulKava
    @PrafulKava 3 месяца назад +1

    Great video ! Good explanation. Thanks for all your efforts in making detailed video along with code !

  • @Munk-tt6tz
    @Munk-tt6tz 2 месяца назад

    This is the best video on this topic. Thank you!

  • @roomo7time
    @roomo7time 2 года назад +2

    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.

  • @martindevaux2605
    @martindevaux2605 Год назад +2

    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!

    • @mildlyoverfitted
      @mildlyoverfitted  Год назад

      Thank you! I will definitely try to go back to a more regular schedule in the near future.

  • @user-xu5bk5cc7i
    @user-xu5bk5cc7i Год назад

    Thx! Great explanation! This channel deserves more views and subscribers!

  • @nehetnehet8109
    @nehetnehet8109 2 года назад +2

    Very interesting. Good job.🕶

  • @evab.7980
    @evab.7980 2 года назад +1

    Thank you so much for this video! 🙏

  • @user-zz5ee3rx2m
    @user-zz5ee3rx2m 8 месяцев назад +1

    What a video! awesome :)

  • @praveshpraveen1106
    @praveshpraveen1106 Год назад +2

    Hey there, amazing video ! Could you please explain how the entry into the distance table is calculated and what it represents ? Thanks in advance

    • @mildlyoverfitted
      @mildlyoverfitted  Год назад

      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/