Visual Document Retrieval
ColPali
Safetensors
sentence-transformers
English
colsmolvlm
vidore-experimental
vidore
multi-vector
Instructions to use vidore/colSmol-500M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ColPali
How to use vidore/colSmol-500M with ColPali:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- sentence-transformers
How to use vidore/colSmol-500M with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("vidore/colSmol-500M") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Remove convert_to_tensor=True in MultiVectorEncoder, this parameter was removed
#3
by tomaarsen HF Staff - opened
README.md
CHANGED
|
@@ -71,8 +71,8 @@ images = [
|
|
| 71 |
"https://huggingface.co/datasets/sentence-transformers/example-documents/resolve/main/doc4.jpg",
|
| 72 |
]
|
| 73 |
|
| 74 |
-
query_embeddings = model.encode_query(queries
|
| 75 |
-
document_embeddings = model.encode_document(images
|
| 76 |
print(f"Query 0 shape: {tuple(query_embeddings[0].shape)}")
|
| 77 |
print(f"Document 0 shape: {tuple(document_embeddings[0].shape)}")
|
| 78 |
# Query 0 shape: (27, 128)
|
|
|
|
| 71 |
"https://huggingface.co/datasets/sentence-transformers/example-documents/resolve/main/doc4.jpg",
|
| 72 |
]
|
| 73 |
|
| 74 |
+
query_embeddings = model.encode_query(queries)
|
| 75 |
+
document_embeddings = model.encode_document(images)
|
| 76 |
print(f"Query 0 shape: {tuple(query_embeddings[0].shape)}")
|
| 77 |
print(f"Document 0 shape: {tuple(document_embeddings[0].shape)}")
|
| 78 |
# Query 0 shape: (27, 128)
|