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

Index does not fit to RAM #64

Closed
littlewine opened this issue Aug 18, 2021 · 5 comments
Closed

Index does not fit to RAM #64

littlewine opened this issue Aug 18, 2021 · 5 comments

Comments

@littlewine
Copy link

littlewine commented Aug 18, 2021

image
Hi,
I am trying to run inference (retrieve.py)in a quite big collection and I get the following error :

RuntimeError: [enforce fail at CPUAllocator.cpp:64]. DefaultCPUAllocator: can't allocate memory:you tried to allocate 664833940224 bytes. Error code 12 (Cannot allocate memory) 

To my understanding, that means that colbert requires 600+ gb of memory, which the machine does not have. Is there any way to bypass this issue?

Can I read the file from an SSD and how much slower would the process be?

Some colleagues also suggested using huggingface.co datasets for that but I'm unsure whether this is feasible or where to start!

@okhat
Copy link
Collaborator

okhat commented Aug 18, 2021

Might want to use batch retrieval and batch re-ranking? Brief instructions are in the README.

It does search in two steps, but doesn't have to load the full index into memory.

@okhat
Copy link
Collaborator

okhat commented Aug 18, 2021

Alternatively, you might be interested in our binarization branch. It makes the index much smaller. It's still a work in progress; we'll improve its quality in the next 2-3 weeks. (Until then, you might lose a couple of points of quality if you use the binarization branch.)

@okhat
Copy link
Collaborator

okhat commented Aug 20, 2021

@littlewine Is this resolved?

@littlewine
Copy link
Author

Yes indeed! Thanks for your help!

@Lim-Sung-Jun
Copy link

Might want to use batch retrieval and batch re-ranking? Brief instructions are in the README.

It does search in two steps, but doesn't have to load the full index into memory.

Can you explain why you didn't add 512 in batch_retrieval?

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

3 participants