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

Add no_avx2 to FAISS vector store #4890

Closed
wants to merge 3 commits into from

Conversation

AliMirlou
Copy link
Contributor

Add no_avx2 to FAISS vector store

This PR adds the no_avx2 argument and FAISS_NO_AVX2 environment variable to dependable_faiss_import function to not load FAISS vector store with AVX2 optimization.

This option comes in handy when the developer wants to save the vector store to a file and load it on somewhere else. Most modern CPUs have AVX2 optimization but there are situations where the hardware is old, the faiss-cpu pypi package is not compiled with AVX2 flag or this feature is disabled for some reason.

I encountered this issue on a PaaS where FAISS pickle and database files created by save_index in Colab could not be loaded inside the Docker containers due to the platform not supporting AVX2.

@dev2049

@dev2049
Copy link
Contributor

dev2049 commented May 18, 2023

lgtm, thanks @AliMirlou!

@dev2049
Copy link
Contributor

dev2049 commented May 18, 2023

fixed lint and merged in #4895!

@dev2049 dev2049 closed this May 18, 2023
@AliMirlou
Copy link
Contributor Author

@dev2049 Too bad though that my name didn't make it to the releases 😅

@AliMirlou
Copy link
Contributor Author

AliMirlou commented May 18, 2023

Can I ask to become a collaborator? I'm deeply involved with LangChain now and I like to contribute more.

@dev2049
Copy link
Contributor

dev2049 commented May 18, 2023

We're really trying to keep the collaborator team small and tight-knit at the moment, so we're only considering folks who have made a good number of contributions. Definitely open to it as time goes on, but want to work with you some more first.

But we really do appreciate contributions from anyone and everyone and will do our best to review asap!

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

Successfully merging this pull request may close these issues.

2 participants