Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading passage binary codes from BinaryHash Faiss Index stored on disk #3

Closed
thakur-nandan opened this issue Jun 29, 2021 · 2 comments

Comments

@thakur-nandan
Copy link

Hi @ikuyamada,

Thanks for the awesome repository and clean code for BPR!

When we have stored the passage embeddings (binary codes) as a faiss BinaryHash Index and saved it to the disk. Can we get the passage embeddings back given only loading back the faiss BinaryHash index? Or would we need to also separately save the passage embeddings (This would take more memory)?

Kind Regards,
Nandan Thakur

@ikuyamada
Copy link
Member

Hi @NThakur20,

As far as I know, the raw passage embeddings cannot be reconstructed from the Binary Hash index in Faiss. If you use this type of index, you need to store the index separately in memory or a fast storage device with caching such as memory mapped file.

@thakur-nandan
Copy link
Author

HI @ikuyamada, Thanks for your prompt reply.

Indeed this was not possible with BinaryHash Index, went ahead with BinaryFlat instead which allows reconstruction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants