Update README.md
Browse files
README.md
CHANGED
@@ -15,46 +15,68 @@ should probably proofread and complete it, then remove this comment. -->
|
|
15 |
|
16 |
# finetune_colqwen2-v1.0
|
17 |
|
18 |
-
This model is a fine-tuned version of [vidore/colqwen2-base](https://huggingface.co/vidore/colqwen2-base) on the
|
19 |
|
20 |
## Model description
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
The following hyperparameters were used during training:
|
37 |
- learning_rate: 3e-05
|
38 |
-
- train_batch_size: 2
|
39 |
-
- eval_batch_size: 2
|
40 |
-
- seed: 42
|
41 |
-
- gradient_accumulation_steps: 8
|
42 |
-
- total_train_batch_size: 16
|
43 |
-
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
44 |
-
- lr_scheduler_type: linear
|
45 |
- lr_scheduler_warmup_steps: 100
|
46 |
- num_epochs: 1
|
47 |
|
48 |
-
### Training results
|
49 |
-
|
50 |
-
| Training Loss | Epoch | Step | Validation Loss | Model Preparation Time |
|
51 |
-
|:-------------:|:------:|:----:|:---------------:|:----------------------:|
|
52 |
-
| No log | 0.0150 | 1 | 0.0268 | 0.0318 |
|
53 |
-
|
54 |
-
|
55 |
### Framework versions
|
56 |
|
57 |
-
- Transformers 4.46.3
|
58 |
-
- Pytorch 2.5.1+cu124
|
59 |
-
- Datasets 3.1.0
|
60 |
-
- Tokenizers 0.20.3
|
|
|
15 |
|
16 |
# finetune_colqwen2-v1.0
|
17 |
|
18 |
+
This model is a fine-tuned version of [vidore/colqwen2-base](https://huggingface.co/vidore/colqwen2-base) on the custom dataset.
|
19 |
|
20 |
## Model description
|
21 |
|
22 |
+
ColQwen is a model based on a novel model architecture and training strategy based on Vision Language Models (VLMs) to efficiently index documents from their visual features.
|
23 |
+
It is a [Qwen2-VL-2B](https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct) extension that generates [ColBERT](https://arxiv.org/abs/2004.12832)- style multi-vector representations of text and images.
|
24 |
+
It was introduced in the paper [ColPali: Efficient Document Retrieval with Vision Language Models](https://arxiv.org/abs/2407.01449) and first released in [this repository](https://github.com/ManuelFay/colpali)
|
25 |
+
|
26 |
+
This version is the untrained base version to guarantee deterministic projection layer initialization.
|
27 |
+
<p align="center"><img width=800 src="https://github.com/illuin-tech/colpali/blob/main/assets/colpali_architecture.webp?raw=true"/></p>
|
28 |
+
|
29 |
+
|
30 |
+
## Usage
|
31 |
+
|
32 |
+
```
|
33 |
+
model = ColQwen2.from_pretrained(
|
34 |
+
'toxic-pandas/finetune_colqwen2-v1.0',
|
35 |
+
torch_dtype=torch.bfloat16,
|
36 |
+
device_map=device,
|
37 |
+
)
|
38 |
+
```
|
39 |
+
|
40 |
+
## Limitations
|
41 |
+
|
42 |
+
- 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.
|
43 |
+
- Support: The model relies on multi-vector retreiving derived from the ColBERT late interaction mechanism, which may require engineering efforts to adapt to widely used vector retrieval frameworks that lack native multi-vector support.
|
44 |
+
|
45 |
+
## Dataset
|
46 |
+
|
47 |
+
With the help of the GT4-o mini model, a dataset was formed for the completion of the colqwen2-v1.0 model, containing the following fields:
|
48 |
+
|
49 |
+
- document_filename: Filename of the document.
|
50 |
+
- document_url: Original URL of the document.
|
51 |
+
- search_query: The query used to fetch the document.
|
52 |
+
- search_topic: Topic related to the document.
|
53 |
+
- search_subtopic: Subtopic related to the document.
|
54 |
+
- search_language: Language specified for the search.
|
55 |
+
- search_filetype: Filetype filter applied during the search.
|
56 |
+
- page_number: The page's number within the document.
|
57 |
+
- page_description: A natural language description of the page.
|
58 |
+
- page_language: Language used on the page.
|
59 |
+
- page_contains_table: Boolean indicating the presence of tables.
|
60 |
+
- page_contains_figure: Boolean indicating the presence of figures.
|
61 |
+
- page_contains_paragraph: Boolean indicating the presence of paragraphs.
|
62 |
+
- page_image: The image of the current page.
|
63 |
+
- query_type: Type of query (e.g., Extractive, Open-ended, Boolean, Compare-contrast, Enumerative, Numerical).
|
64 |
+
- query_answerability: Answerability level of the query (Fully answerable, Partially answerable, Unanswerable).
|
65 |
+
- query_modality: Modality used for query generation.
|
66 |
+
- query_language: Language of the query.
|
67 |
+
- query_reasoning: Reasoning traces used in query generation.
|
68 |
+
- query: The actual query text.
|
69 |
+
- query_is_self_contained: Boolean indicating if the query is self-contained.
|
70 |
+
- query_is_self_contained_reasoning: Reasoning traces for determining self-contained nature.
|
71 |
+
- answer: Expected answer to the question from the "query" field.
|
72 |
+
|
73 |
+
## Training hyperparameters
|
74 |
|
75 |
The following hyperparameters were used during training:
|
76 |
- learning_rate: 3e-05
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
- lr_scheduler_warmup_steps: 100
|
78 |
- num_epochs: 1
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
### Framework versions
|
81 |
|
82 |
+
- Transformers 4.46.3
|
|
|
|
|
|