Instructions to use vidore/colpali with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ColPali
How to use vidore/colpali 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/colpali with sentence-transformers:
from sentence_transformers import MultiVectorEncoder model = MultiVectorEncoder("vidore/colpali") 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
Commit History
-
Integrate with Sentence Transformers via MultiVectorEncoder
Verified signatureHello! Heads up, this PR was AI-generated and human-reviewed. The `MultiVectorEncoder` class ships in the next Sentence Transformers release, planned for around the 18th, so for now the install below pulls from source. I would love to feature this model in that release's blog post and documentation, especially once it loads without the `revision` pin (that is, once this PR is merged). Here's a summary of the changes as reported by my agent: ## Pull Request overview * Integrate `vidore/colpali` with [Sentence Transformers](https://www.sbert.net/) as a multi-vector (ColBERT-style late interaction) retriever via `MultiVectorEncoder`. ## Details This adds a Sentence Transformers loading path on top of the existing LoRA adapter, exposing the usual `model.encode_query(...)` / `model.encode_document(...)` / `model.similarity(...)` API with MaxSim scoring. The stock `Transformer` module loads the adapter directly onto the PaliGemma backbone through a small `key_mapping` that strips `colpa…d56fc86