About efficiency of the model
See original GitHub issueHi,
Thanks for the great repo, I enjoy a lot exploring it! However, when I tried to run the code in the “Use BLINK in your codebase” chapter in README, I found the speed of running the model relatively slow (in fast=False mode). To be more specific, when I execute “main_dense.run”, the first stage of processing proceeded relatively slow (~2.5 seconds per item) while the later stage (printing “Evaluation”) proceeded ~ 5 items per second. Also, I tried adding indices as below.
config = {
...
"faiss_index": "flat",
"index_path": models_path+"faiss_flat_index.pkl"
}
However, the performance of the first stage became even worse (~20 seconds per item). I’m wondering if I’m setting something wrong (especially for the faiss index) which resulted in the low speed. If there are any corrections/methods to speed up? Thanks for your help! (I’ll post the performance logs below if needed!)
Issue Analytics
- State:
- Created 2 years ago
- Comments:21 (1 by maintainers)
Top GitHub Comments
To wrap up, I conclude that:
Thanks for all the help! I’ll be happy to follow any updates.
Hi,
You may want to make some changes to the codebase and add support for more sparse indexes. Currently, BLINK codebase only supports flat indices.
I am currently using a sparse index
OPQ32_768,IVF4096,PQ32x8
built on candidate encodings and the speed improvement is significant.For e.g., this is what my
faiss_indexer.py
looks like.This is how I load the models.