Git Product home page Git Product logo

Comments (3)

mdouze avatar mdouze commented on June 26, 2024

It's just a warning that you can choose to ignore, see justification here
https://github.com/facebookresearch/faiss/wiki/FAQ#questions-about-training

from faiss.

jeyendranbalakrishnan avatar jeyendranbalakrishnan commented on June 26, 2024

@mdouze thanks for the explanation and link.
After reading the link, I'm still a bit confused :-)
For both IndexPQ and IndexIVFPQ, I am explicitly setting nlist to 32, ie., number of clusters/centroids = 32 .
However, the warning says that number of centroids = 256.
This is why I'm beginning to think that the implementation is somehow ignoring my user-provided nlist value of 32, and using some internal hard coded value of 256.

from faiss.

jeyendranbalakrishnan avatar jeyendranbalakrishnan commented on June 26, 2024

@mdouze After some more reading of the link you shared, I understand what's happening and why. There's no issue with the implementation.
So both IndexPQ and IndexIVFPQ do k-means clustering with 2^nbits_per_idx clusters, to cluster each of the blocks that partition the vectors.
In my code, I'm using k = nbits_per_idx = 8, so FAISS is clustering with 2^8 = 256 clusters.
Internally, FAISS uses min_points_per_centroid=39 as default, so it is expecting the number of points to be n >= 39 * 256 = 9984, whereas my dataset only has n=5183 points. So the implementation is throwing the warning.

The nlist parameter is only used for IndexIVFPQ, for IVF clustering for the base quantizer.

Thanks for the link. All is well.

from faiss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.