Add note about training from adapter
Browse files
README.md
CHANGED
@@ -118,6 +118,18 @@ if __name__ == "__main__":
|
|
118 |
|
119 |
```
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
## Limitations
|
122 |
|
123 |
- **Focus**: The model primarily focuses on PDF-type documents and high-ressources languages, potentially limiting its generalization to other document types or less represented languages.
|
|
|
118 |
|
119 |
```
|
120 |
|
121 |
+
**Note:** If you need to further train ColPali from this adapter, you should run:
|
122 |
+
|
123 |
+
```python
|
124 |
+
lora_config = LoraConfig.from_pretrained("vidore/colpali-v1.1")
|
125 |
+
lora_config.inference_mode = False # force training mode for fine-tuning
|
126 |
+
|
127 |
+
model = get_peft_model(model, lora_config)
|
128 |
+
|
129 |
+
print("after")
|
130 |
+
model.print_trainable_parameters()
|
131 |
+
```
|
132 |
+
|
133 |
## Limitations
|
134 |
|
135 |
- **Focus**: The model primarily focuses on PDF-type documents and high-ressources languages, potentially limiting its generalization to other document types or less represented languages.
|