I have a trained index using "OPQ64_128,IVF16384_HNSW32,PQ64". It works great and now I want to separate the pretransform and index, so I can use the OPQ matrix for multi-thread data loading with less memory overhead. Possible to achieve this? I remember I saw related solution somewhere but cannot find it now. Thanks in advance.
The IndexPreTransform wraps the underlying IVF index, which you can obtain simply by index_pre_transform.index, which you may need to downcast to IndexIVF. The OPQMatrix object will be in the index_pre_transform.chain, which is a vector of VectorTransform (see https://github.com/facebookresearch/faiss/blob/master/VectorTransform.h).
Thanks for the information.
For those who are interested. I got it working by
mat = faiss.downcast_VectorTransform(index.chain.at(0))
main_index = faiss.downcast_index(index.index)
for a index OPQ64_128,IVF16384_HNSW32,PQ64
Most helpful comment
For those who are interested. I got it working by
for a index OPQ64_128,IVF16384_HNSW32,PQ64