Instructions to use jinaai/jina-colbert-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use jinaai/jina-colbert-v2 with sentence-transformers:
from sentence_transformers import MultiVectorEncoder model = MultiVectorEncoder("jinaai/jina-colbert-v2", trust_remote_code=True) queries = ["Which planet is known as the Red Planet?"] documents = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", ] query_embeddings = model.encode_query(queries) document_embeddings = model.encode_document(documents) similarities = model.similarity(query_embeddings, document_embeddings) print(similarities) - Notebooks
- Google Colab
- Kaggle
Errors on The state dictionary
When i try:
RAG_used = RAGPretrainedModel.from_pretrained("jinaai/jina-colbert-v2")
I got :
ValueError: The state dictionary of the model you are trying to load is corrupted. Are you sure it was properly saved?
flash_attn has strict cuda, rocm requirement. Would it be possible to use the new model cpu only or even mps?
I got the same error when trying to initialize model with Colbert Checkpoint. flash-attn is installed and its version is 2.6.3. Is there any way to fix this?
Getting the same error during training, but inference works fine with Ragatouille.
Getting the same error during training, but inference works fine with Ragatouille.
could you give an example of how you run inference? I get an error with RAGPretrainedModel.from_pretrained, is there a different way to run inference from a pretrained model?