ColPali
English
File size: 940 Bytes
d6814a5
 
2dc53b9
 
 
 
 
 
 
 
d6814a5
2dc53b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---

license: gemma
library_name: colpali
base_model: vidore/colpaligemma-3b-pt-448-base
language:
- en
tags:
- colpali
datasets:
- vidore/colpali_train_set
---


# ColPali: Visual Retriever based on PaliGemma-3B with ColBERT strategy (merged, `state_dict` only)

> [!WARNING]
> WARNING: This repository should only be used to convert the original ColPali weights to the Hf version of Colpali.

State dict was exported from [`vidore/colpali-v1.2-merged`](https://huggingface.co/vidore/colpali-v1.2-merged). The model was loaded using the following code:

```python
# Get the device
device = "mps"

# Define dtype
dtype_precision = torch.bfloat16

# Load the original model and state_dict
model = (
    cast(
        ColPali,
        ColPali.from_pretrained(
            "vidore/colpali-v1.2-merged",
            torch_dtype=dtype_precision,
            device_map=device,
        ),
    )
    .to(dtype_precision)
    .eval()
)
```