Visual Document Retrieval
sentence-transformers
Safetensors
ColPali
ultravbert
vision-language
multimodal
document-retrieval
late-interaction
multi-vector
colbert
vidore
custom_code
Instructions to use vllm/ColUltraVBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use vllm/ColUltraVBERT with sentence-transformers:
from sentence_transformers import MultiVectorEncoder model = MultiVectorEncoder("vllm/ColUltraVBERT", 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) - ColPali
How to use vllm/ColUltraVBERT 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
- Notebooks
- Google Colab
- Kaggle
Restore athrael-soju/ColUltraVBERT@486d2f2 now that vLLM supports UltraVBertModel
Browse files- README.md +4 -4
- config.json +1 -1
- config_sentence_transformers.json +1 -1
README.md
CHANGED
|
@@ -29,7 +29,7 @@ library_name: sentence-transformers
|
|
| 29 |
|
| 30 |
<!-- vllm-ci-copy -->
|
| 31 |
> [!NOTE]
|
| 32 |
-
> This is a copy of [athrael-soju/ColUltraVBERT](https://huggingface.co/athrael-soju/ColUltraVBERT) at commit `
|
| 33 |
|
| 34 |
|
| 35 |
<img src="colultravbert-hero.png" width="100%" alt="ColUltraVBERT">
|
|
@@ -67,14 +67,14 @@ index.
|
|
| 67 |
|
| 68 |
## Usage
|
| 69 |
|
| 70 |
-
Requires `sentence-transformers>=6.1` and `transformers>=5.
|
| 71 |
-
|
| 72 |
|
| 73 |
```python
|
| 74 |
from PIL import Image
|
| 75 |
from sentence_transformers import MultiVectorEncoder
|
| 76 |
|
| 77 |
-
model = MultiVectorEncoder("athrael-soju/ColUltraVBERT"
|
| 78 |
|
| 79 |
pages = [Image.open("page1.png"), Image.open("page2.png")]
|
| 80 |
queries = ["What was the 2023 revenue?", "Which table lists regional margins?"]
|
|
|
|
| 29 |
|
| 30 |
<!-- vllm-ci-copy -->
|
| 31 |
> [!NOTE]
|
| 32 |
+
> This is a copy of [athrael-soju/ColUltraVBERT](https://huggingface.co/athrael-soju/ColUltraVBERT) at commit `486d2f2`, made on 2026-10-30. vLLM CI uses this checkpoint and the original is on a personal account, so we keep a copy here to reduce supply-chain risk.
|
| 33 |
|
| 34 |
|
| 35 |
<img src="colultravbert-hero.png" width="100%" alt="ColUltraVBERT">
|
|
|
|
| 67 |
|
| 68 |
## Usage
|
| 69 |
|
| 70 |
+
Requires `sentence-transformers>=6.1` and `transformers>=5.21`, which supports UltraVBERT natively
|
| 71 |
+
([docs](https://huggingface.co/docs/transformers/model_doc/ultravbert)). On 5.20.x, pass `trust_remote_code=True` to load the code in this repository.
|
| 72 |
|
| 73 |
```python
|
| 74 |
from PIL import Image
|
| 75 |
from sentence_transformers import MultiVectorEncoder
|
| 76 |
|
| 77 |
+
model = MultiVectorEncoder("athrael-soju/ColUltraVBERT")
|
| 78 |
|
| 79 |
pages = [Image.open("page1.png"), Image.open("page2.png")]
|
| 80 |
queries = ["What was the 2023 revenue?", "Which table lists regional margins?"]
|
config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
-
"
|
| 4 |
],
|
| 5 |
"auto_map": {
|
| 6 |
"AutoConfig": "configuration_ultravbert.UltraVBertConfig",
|
|
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
+
"UltraVBertModel"
|
| 4 |
],
|
| 5 |
"auto_map": {
|
| 6 |
"AutoConfig": "configuration_ultravbert.UltraVBertConfig",
|
config_sentence_transformers.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
| 14 |
"requirements": {
|
| 15 |
"transformers": {
|
| 16 |
"specifier": ">=5.20",
|
| 17 |
-
"reason": "
|
| 18 |
},
|
| 19 |
"sentence-transformers": ">=6.1"
|
| 20 |
}
|
|
|
|
| 14 |
"requirements": {
|
| 15 |
"transformers": {
|
| 16 |
"specifier": ">=5.20",
|
| 17 |
+
"reason": "Native `ultravbert` support ships from 5.21; on 5.20.x, load with `trust_remote_code=True` to use the remote code in this repository."
|
| 18 |
},
|
| 19 |
"sentence-transformers": ">=6.1"
|
| 20 |
}
|