Comments (6)
- You can find a similar version of the model trained by other people here. tbh I am not sure how you can this huggingface pretrained model in a downstream task (ie. index marco or doing retrieval) - in other words whether this is compatible with the existing code repo. It is also a question for me whether we can directly use huggingface models instead of the expected colbert checkpoints that this repo expects during inference (either for retrieval or indexing) @okhat could you help us on that? :)
- In this case, you need to train from scratch and make the necessary changes in the code. Briefly, you'd need to go through all of those code matches and change the input of
from_pretrained
to the model string you want. Surely in thetraining.py
script but also possibly in evaluation
from colbert.
@littlewine thanks for the reply
@1 I found this model, however it has slightly different parameters (linear layer output size and from what I remember the lenght of the embeddings being 512 instead of 768). Still, for now I indeed plan to use that one :) And about the usage in the downstream task - I found it slightly difficult to follow the retrieve
script's logic and I guess the smartest choice would be to follow the description of the workflow in the paper.
from colbert.
Hey folks! Happy to send you a checkpoint if you send me an email. A public/official release will take some time.
There are public checkpoints by other people that are compatible with (and produced from) this code, including that by PyTerrier-ColBERT: https://github.com/terrierteam/pyterrier_colbert --- see the Demo section.
from colbert.
We over at vespa.ai have released a ColBERT weights which is based on a 6 layer MiniLM model with just 22.7M parameters which uses 32 dimensions instead of 128. So for question 2 you can replace bert-base-uncased with a different model which also uses BERT tokenization.
You can use https://huggingface.co/vespa-engine/col-minilm and then use the save_checkpoint to get a .dnn checkpoint which can be used with more routines (but with similarity=cosine and dim=32).
(
ColBERT/colbert/utils/utils.py
Line 37 in abb5b68
from colbert.
Thanks all for your activity in the discussion :)
from colbert.
Hi @zyngielg,
Now do you have any idea about how to use huggingface API to create the ColBERT model in the code and load the checkpoints?
from colbert.
Related Issues (20)
- CollectionEncoder blocking on encoder N passages HOT 1
- Focusing retrieval on list of document ids with doc_ids parameter doesn't work
- type object 'ColBERT' has no attribute 'segmented_maxsim' HOT 1
- Where is the qrels.dev.small.tsv?
- How to get rid of the "Duplicate GPU detected : rank 0 and rank 1 both on CUDA device ca000" error while training of the ColBERTv1.9 modell? HOT 1
- Request for AMD gpu support
- 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
- 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
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.