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

Scann vs faiss #28

Open
afcruzs opened this issue Jun 22, 2022 · 6 comments
Open

Scann vs faiss #28

afcruzs opened this issue Jun 22, 2022 · 6 comments

Comments

@afcruzs
Copy link

afcruzs commented Jun 22, 2022

Could you elaborate on the decision to use faiss instead of scann? In theory scann is open source too, but I'm wondering if you found easier to get the performance needed from faiss instead.

@rom1504
Copy link

rom1504 commented Jul 3, 2022

scann is opensource but not really packaged well + it doesn't quantize

but also it's not really a blocker either way in the current state of this repo
doing more experiments with the LM and the LM+knn integration is

@afcruzs
Copy link
Author

afcruzs commented Jul 4, 2022

I agree is a bit cumbersome to use, but it should have (rather efficient) quantization, no? See last section of https://medium.com/@kumon/similarity-search-scann-and-4-bit-pq-ab98766b32bd

@rom1504
Copy link

rom1504 commented Jul 4, 2022

scann is fast but no it doesn't optimize for memory use, since it uses PQ4 it requires storing the embeddings at full precision for reranking to avoid loss of recall

@marcobellagente93
Copy link

@rom1504 thanks for the answer! So is it correct to say that the open source version of scann does use quantization to compute faster inner products? I mean there's implemented options for using brute force and 2 different quantizers (lut16 and lut256), but I see your point about storing the embeddings. That's also odd since reorder (which I assume is what you mean by reranking) is optional

@rom1504
Copy link

rom1504 commented Jul 5, 2022

Yes it uses quantization to compute faster inner product.
Do they report good results on pq4 and no reordering?

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

4 participants