Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,40 @@
|
|
| 1 |
---
|
| 2 |
license: gemma
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: gemma
|
| 3 |
+
library_name: colpali
|
| 4 |
+
base_model: vidore/colpaligemma-3b-pt-448-base
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- colpali
|
| 9 |
+
datasets:
|
| 10 |
+
- vidore/colpali_train_set
|
| 11 |
---
|
| 12 |
+
|
| 13 |
+
# ColPali: Visual Retriever based on PaliGemma-3B with ColBERT strategy (merged, `state_dict` only)
|
| 14 |
+
|
| 15 |
+
> [!WARNING]
|
| 16 |
+
> WARNING: This repository should only be used to convert the original ColPali weights to the Hf version of Colpali.
|
| 17 |
+
|
| 18 |
+
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:
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
# Get the device
|
| 22 |
+
device = "mps"
|
| 23 |
+
|
| 24 |
+
# Define dtype
|
| 25 |
+
dtype_precision = torch.bfloat16
|
| 26 |
+
|
| 27 |
+
# Load the original model and state_dict
|
| 28 |
+
model = (
|
| 29 |
+
cast(
|
| 30 |
+
ColPali,
|
| 31 |
+
ColPali.from_pretrained(
|
| 32 |
+
"vidore/colpali-v1.2-merged",
|
| 33 |
+
torch_dtype=dtype_precision,
|
| 34 |
+
device_map=device,
|
| 35 |
+
),
|
| 36 |
+
)
|
| 37 |
+
.to(dtype_precision)
|
| 38 |
+
.eval()
|
| 39 |
+
)
|
| 40 |
+
```
|