Use custom centroids in IVFFlat #4007
Unanswered
JingyuanHe1222
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I am not sure if this is the correct way of doing this, but I have been adding the custom centroids into the quantizer, and then initialize the IVF index with this "trained" quantizer, as in the following:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I wonder if there's any interface we can use to construct IVF clusters with custom centroids vectors?
So instead of initialize the IVF index and add corpus vectors for train (which construct corpus centroids), can we manually designate some vectors as the centroids and update the clustering accordingly?
Seemingly this could be achieved by constructing a IndexFlat clusters on the custom centroids as quantizer, and manually construct
nlist
IndexFlat for each of these clusters after calculating the vector assignments using KNN.But I wonder if there's a prebuild interface, which might be faster?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions