Comments (5)
That's correct: the assertion was being triggered on every call of _flush_to_cpu; it should be after the last _flush_to_cpu only. (This issue doesn't show when _flush_to_cpu is getting called only once, which happens to be my setup.)
Just pushed a relaxation of the assertion. It should work for you now.
from colbert.
For FAISS indexing, here's a sample command for MS MARCO:
python -m colbert.index_faiss --index_root /root/to/indexes/ --index_name IndexName --root /root/to/experiments --experiment ExperimentName --run OptionalRunName --partitions 65536 --sample 0.3
You can probably remove --sample 0.3
which will use a default (0.05). This will be faster and probably lose no effectiveness (unless you increase the partitions further).
If this run cannot use faiss-gpu for any reason, you can also reduce --partitions
to just 16384. This will be fast to index on CPU. It will make retrieval slightly slower, so it's a tradeoff. (I just realized this is not relevant to you here, since the error above is only for faiss-gpu. In this case, you can use 65536 or even twice or 4x that quickly enough during indexing.)
The original runs in the paper used just 2000 partitions. Using up to 200k can yield much faster retrieval (much faster than the paper's results too) but you pay the cost upfront during faiss indexing. This is not an issue at all when indexing with faiss-gpu, though.
If you use a large number of partitions, I recommend --nprobe 16
or --nprobe 32
during retrieval. Otherwise, --nprobe 10
is more than enough for small partition numbers.
Let me know if any other parameters are unclear. I will eventually move those to their own set of instructions.
from colbert.
Thanks Omar. Looking forward to seeing you tomorrow!
from colbert.
Looking forward to seeing you tomorrow as well!
from colbert.
Seems resolved. Closing but feel free to re-open if needed.
from colbert.
Related Issues (20)
- How to quickly check if installation is working fine?
- ColBert is not failing when Error is encounter during both train and indexing
- How to insert new document into the pre-built index? HOT 1
- Is there a check point of ColBERT that wasn't trained on MSMARCO?
- How to check the centroids and the data in the clusters?
- Extract only embeddings
- Execution fails in colbert.index_objs() with assert classname.endswith('Vector')
- Results on BEIR HOT 1
- unable to open file </root/.cache/huggingface/hub/models--bert-base-uncased/snapshots/86b5e0934494bd15c9632b12f734a8a67f723594/model.safetensors> in read-only mode: No such file or directory (2)
- Add_to_index only work first time
- Tokenization Assumption for Query Marker Replacement is Inconsistent
- GPU crashes when running "D_packed @ Q.to(dtype=D_packed.dtype).T" with no error message HOT 1
- Training script from doc is not working
- ImportError: cannot import name 'packaging' from 'pkg_resources' HOT 1
- Indexing stuck at encoding passages HOT 2
- ImportError: .../torch_extensions/py38_cu117/decompress_residuals_cpp/decompress_residuals_cpp.so: cannot open shared object file: No such file or directory
- How to load the checkpoint of "colbert-ir/colbertv2.0"
- FAISS RuntimError
- pthread.h error
- ValueError: negative shift count
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colbert.