Omundu-Riad commited on
Commit
88bb736
·
verified ·
1 Parent(s): e4d32d0

Add README describing every checkpoint

Browse files
Files changed (1) hide show
  1. README.md +170 -0
README.md ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: ColMinistral3 training checkpoints
3
+ tags:
4
+ - colpali
5
+ - visual-document-retrieval
6
+ - late-interaction
7
+ - multi-vector
8
+ - peft
9
+ - dora
10
+ ---
11
+
12
+ # ColMinistral3 training checkpoints (`checkpoints_diverse`)
13
+
14
+ Training checkpoints of **ColMinistral3**: a ColPali-style multi-vector (late-interaction) visual document retriever
15
+ built on [`mistralai/Ministral-3-3B-Instruct-2512`](https://huggingface.co/mistralai/Ministral-3-3B-Instruct-2512).
16
+ A page image and a text query are both encoded by the vision-language model into one 320-d vector per token, and a
17
+ query-page score is the ColBERT MaxSim (sum over query tokens of the best-matching page token).
18
+
19
+ This repository is a **storage of experiment checkpoints** (it uses the dataset repo type only as a file store; it is
20
+ not a dataset). Every checkpoint is a [PEFT](https://github.com/huggingface/peft) adapter (LoRA / DoRA / DeLoRA) for the
21
+ base model, plus — depending on the run — the fully trained vision tower, projector and retrieval head.
22
+
23
+ **Which checkpoint to use:** `colministral_siglip_vision_weighted16/best_vidore_v1_step5200` — the best model measured
24
+ on the full ViDoRe v1 and v2 benchmarks (see below).
25
+
26
+ ## Folder layout
27
+
28
+ `<run name>/<checkpoint>/`. Files you will find in a checkpoint folder:
29
+
30
+ | File | Content |
31
+ |---|---|
32
+ | `adapter_model.safetensors` | trained weights: PEFT adapter of the language model, plus every module listed in `modules_to_save` of `adapter_config.json` (fully trained copies) |
33
+ | `adapter_config.json` | PEFT config: adapter type, rank `r`, `lora_alpha`, `target_modules`, `modules_to_save`, base model path |
34
+ | `optimizer.pt`, `scheduler.pt`, `rng_state*.pth` | optimizer / LR-scheduler / RNG state: present only in raw `checkpoint-N` folders, needed to **resume** training |
35
+ | `trainer_state.json` | Hugging Face Trainer state: global step, full per-step training log (`log_history`) |
36
+ | `training_args.bin` | Hugging Face `TrainingArguments` (pickle) |
37
+ | `processor_config.json`, `colministral3_processor_config.json`, `tokenizer*.json`, `chat_template.jinja` | processor: image budget (`max_num_visual_tokens`), tokenizer, chat template |
38
+ | `eval_vidore.json` | (best-adapter folders) the in-training ViDoRe *lite* scores that selected this adapter |
39
+ | `vidore_results/` | mteb result JSONs of the full ViDoRe benchmarks for this checkpoint |
40
+
41
+ ## Latest run: `colministral_siglip_vision_weighted16`
42
+
43
+ Continued training of ColMinistral3 on **16 document domains with manual sampling weights**, one domain per batch.
44
+
45
+ - **Initialisation:** end of the previous phase (`siglip_vision_phase2/checkpoint-5400`, itself continued from
46
+ `siglip_vision_500steps/checkpoint-500`; not in this repo).
47
+ - **Data:** [`Omundu-Riad/vqa_train_clean`](https://huggingface.co/datasets/Omundu-Riad/vqa_train_clean) — 737,626
48
+ query-page pairs in 16 domains (ArxivQA, DocVQA, InfoVQA, MLPapers, TatDQA, WebPDF, PlotQA, ChartQA, SlideVQA,
49
+ Manuals, Textbooks, VDR-en/fr/de/es/it), deduplicated and filtered against the ViDoRe benchmarks (no benchmark page or
50
+ query is used for training). Domain weights: TatDQA 3.0, SlideVQA 3.0, WebPDF 2.0, ChartQA 2.0, VDR-en 1.8,
51
+ DocVQA / InfoVQA / Textbooks 1.5, ArxivQA and VDR-fr/de/es/it 1.0, MLPapers 0.8, Manuals 0.75, PlotQA 0.7.
52
+ - **Trained parameters:** DoRA (r = 32, alpha = 32, dropout 0.1) on all attention and MLP projections of the 26
53
+ language-model layers; vision tower, multimodal projector, retrieval head (`custom_text_proj`, 320-d) and SigLIP
54
+ logit scale/bias fully trained (`modules_to_save`).
55
+ - **Loss:** pairwise SigLIP (sigmoid) loss on MaxSim scores with in-batch negatives; two pairs that share the same page
56
+ are both positives.
57
+ - **Schedule:** 1 epoch = 6,798 steps, global batch 128 (2 × A100 40 GB, mini-batches of 8), learning rates
58
+ 2e-5 (DoRA + head) / 5e-6 (vision tower + projector) / 1e-3 (SigLIP logit), 100 warm-up steps, gradient clipping 1.0,
59
+ bf16 autocast. No query augmentation tokens. Images: up to 1,572 visual tokens per page.
60
+ - **Selection:** a ViDoRe v1 + v2 *lite* evaluation (subsampled corpora) every 400 steps; the best adapter per
61
+ benchmark is kept (`best_vidore_v1_*`, `best_vidore_v2_*`). The lite history is `eval_vidore.jsonl` in the run folder,
62
+ the full training log is `training.log`.
63
+
64
+ ### Checkpoints and full ViDoRe scores
65
+
66
+ Official mteb main scores (mteb 2.3.2): nDCG@5 × 100 for ViDoRe v1 (10 tasks) and v2 (4 tasks, averaged over query
67
+ languages), nDCG@10 × 100 for ViDoRe v3 (the 8 public tasks).
68
+
69
+ | Folder | Step | ViDoRe v1 | ViDoRe v2 | ViDoRe v3 | Can resume training |
70
+ |---|---|---|---|---|---|
71
+ | *(start of the run, not in this repo)* | 0 | 88.42 | 56.77 | — | — |
72
+ | `best_vidore_v2_step3600` | 3600 | 89.77 | 60.37 | — | no (adapter only) |
73
+ | **`best_vidore_v1_step5200`** | 5200 | **90.39** | **60.43** | 58.49 | no (adapter only) |
74
+ | `checkpoint-6798` (end of the run) | 6798 | 90.24 | 57.83 | — | yes (optimizer, scheduler, RNG) |
75
+
76
+ - `best_vidore_v1_step5200` is the best checkpoint on both full v1 and v2. After step 5200, v1 stays flat and v2 drops
77
+ (−2.6 at the end of the run), mostly on long financial / ESG reports (the right page is still in the top 10, but less
78
+ often ranked first).
79
+ - `best_vidore_v2_step3600` was selected by the *lite* v2 score; on the full benchmark it ties step 5200 on v2.
80
+ - The optimizer state of steps 3600 and 5200 was not kept (only the 2 latest raw checkpoints are kept during
81
+ training), so these two folders are inference-ready adapters, not resumable checkpoints.
82
+
83
+ ### Query augmentation tokens (evaluation-only probe)
84
+
85
+ The model was trained **without** query augmentation tokens. Appending N `</s>` tokens to every query at evaluation
86
+ time only, on `best_vidore_v1_step5200` (result JSONs in `vidore_results_query_aug<N>/`):
87
+
88
+ | `</s>` tokens appended to the query | ViDoRe v1 | ViDoRe v2 |
89
+ |---|---|---|
90
+ | 0 (as trained) | 90.39 | 60.43 |
91
+ | 5 | 90.56 | 61.21 |
92
+ | 10 | 90.75 | 61.36 |
93
+ | 20 | 90.54 | 63.38 |
94
+
95
+ ### Loading
96
+
97
+ The adapters target the ColMinistral3 architecture of the training code (a `colpali_engine` fork with `ColMinistral`
98
+ and `ColMinistral3Processor`). `adapter_config.json` points to the local path of the base model used in training
99
+ (`ColMinistral` built from `mistralai/Ministral-3-3B-Instruct-2512`); set `base_model_name_or_path` to your copy.
100
+ Evaluation reproduces training exactly: frozen base in bf16, unmerged DoRA adapter, trained modules in fp32, forward
101
+ under bf16 autocast, every non-padding token is a vector, MaxSim summed over query tokens. Raw `checkpoint-N` folders of
102
+ this run have no processor files; `checkpoint-6798` here includes them (copied from the run's final output, whose
103
+ adapter is identical to `checkpoint-6798`). Image budget: `max_num_visual_tokens=1572`.
104
+
105
+ ## Older runs
106
+
107
+ Earlier experiments, all adapters of `mistralai/Ministral-3-3B-Instruct-2512`. The description below is read from each
108
+ folder's own `adapter_config.json` and `trainer_state.json`:
109
+
110
+ - **Adapter:** PEFT type, rank `r` / `lora_alpha`. *LLM* = attention and MLP projections of the language model +
111
+ retrieval head (`custom_text_proj`); *LLM + vision q,v* also adapts the q/v projections of the vision tower.
112
+ - **Step:** global step / planned total steps of the run; **batch** = training batch size recorded by the Trainer.
113
+ - **Train loss:** mean of the last 50 logged training losses. **Eval loss:** the run's own in-training validation loss
114
+ at that step. Losses depend on the run's loss function and batch size: compare them within a run, not across runs.
115
+ - **Resume:** whether the folder has everything the Trainer needs to resume (`optimizer.pt`, `scheduler.pt`, `trainer_state.json`).
116
+
117
+ | Folder | Adapter | Target | Step | Epoch | Batch | Peak LR | Train loss | Eval loss | Resume | Size |
118
+ |---|---|---|---|---|---|---|---|---|---|---|
119
+ | `colministral_DORA/checkpoint-1500` | DoRA r=64/α=64 | LLM | 1500 / 3694 | 0.406 | 32 | 5.0e-05 | 0.1618 | 0.1946 | yes | 1.2 GB |
120
+ | `colministral_DORA/checkpoint-2000` | DoRA r=64/α=64 | LLM | 2000 / 3694 | 0.541 | 32 | 5.0e-05 | 0.1519 | 0.2003 | yes | 1.2 GB |
121
+ | `colministral_DORA_128b_lr35/checkpoint-1100` | DoRA r=64/α=64 | LLM | 1100 / 4620 | 1.19 | 128 | 3.0e-05 | 0.2574 | 0.3026 | yes | 1.2 GB |
122
+ | `colministral_DORA_128b_lr35/checkpoint-600` | DoRA r=64/α=64 | LLM | 600 / 4620 | 0.649 | 128 | 3.0e-05 | 0.3043 | 0.2914 | yes | 1.2 GB |
123
+ | `colministral_DORA_128b_lr55/checkpoint-1000` | DoRA r=64/α=64 | LLM | 1000 / 4620 | 1.082 | 128 | 5.0e-05 | 0.2639 | 0.2892 | yes | 1.2 GB |
124
+ | `colministral_DORA_128b_lr55/checkpoint-1100` | DoRA r=64/α=64 | LLM | 1100 / 4620 | 1.19 | 128 | 5.0e-05 | 0.2553 | 0.2931 | yes | 1.2 GB |
125
+ | `colministral_DORA_128b_lr75/checkpoint-1000` | DoRA r=64/α=64 | LLM | 1000 / 4620 | 1.082 | 128 | 7.0e-05 | 0.2669 | 0.2838 | yes | 1.2 GB |
126
+ | `colministral_DORA_128b_lr75/checkpoint-1100` | DoRA r=64/α=64 | LLM | 1100 / 4620 | 1.19 | 128 | 7.0e-05 | 0.2598 | 0.2801 | yes | 1.2 GB |
127
+ | `colministral_DORA_128b_lr95/checkpoint-1000` | DoRA r=64/α=64 | LLM | 1000 / 4620 | 1.082 | 128 | 9.0e-05 | 0.2748 | 0.2936 | yes | 1.2 GB |
128
+ | `colministral_DORA_128b_lr95/checkpoint-1100` | DoRA r=64/α=64 | LLM | 1100 / 4620 | 1.19 | 128 | 9.0e-05 | 0.2661 | 0.3045 | yes | 1.2 GB |
129
+ | `colministral_DORA_32b_lr56_hardDs_vision_r32/checkpoint-3800` | DoRA r=32/α=32 | LLM + vision q,v | 3800 / 9770 | 1.945 | 32 | 5.0e-06 | 0.2612 | 0.1711 | yes | 0.64 GB |
130
+ | `colministral_DORA_32b_lr56_hardDs_vision_r32/checkpoint-4000` | DoRA r=32/α=32 | LLM + vision q,v | 4000 / 9770 | 2.047 | 32 | 5.0e-06 | 0.2584 | 0.1915 | yes | 0.64 GB |
131
+ | `colministral_DORA_32b_lr75_hardDs/checkpoint-2300` | DoRA r=64/α=64 | LLM | 2300 / 9770 | 1.177 | 32 | 7.0e-05 | 0.2881 | 0.2069 | yes | 1.2 GB |
132
+ | `colministral_DORA_32b_lr75_hardDs/checkpoint-3000` | DoRA r=64/α=64 | LLM | 3000 / 9770 | 1.535 | 32 | 7.0e-05 | 0.2724 | 0.2101 | yes | 1.2 GB |
133
+ | `colministral_DORA_32b_lr75_hardDs_vision/checkpoint-3800` | DoRA r=32/α=32 | LLM + vision q,v | 3800 / 9770 | 1.945 | 32 | 7.0e-05 | 0.2518 | 0.1747 | yes | 0.64 GB |
134
+ | `colministral_DORA_32b_lr75_hardDs_vision/checkpoint-4900` | DoRA r=32/α=32 | LLM + vision q,v | 4900 / 9770 | 2.508 | 32 | 7.0e-05 | 0.2082 | 0.2217 | yes | 0.64 GB |
135
+ | `colministral_DORA_32b_lr75_hardDs_vision_r16/checkpoint-3100` | DoRA r=16/α=16 | LLM + vision q,v | 3100 / 9770 | 1.586 | 32 | 7.0e-05 | 0.2733 | 0.1701 | yes | 0.33 GB |
136
+ | `colministral_DORA_32b_lr75_hardDs_vision_r16/checkpoint-5500` | DoRA r=16/α=16 | LLM + vision q,v | 5500 / 9770 | 2.815 | 32 | 7.0e-05 | 0.212 | 0.1833 | yes | 0.33 GB |
137
+ | `colministral_DORA_complete_wrapper_fix_64b/checkpoint-1500` | DoRA r=64/α=64 | LLM | 1500 / 5541 | 0.812 | 64 | 2.0e-05 | 0.1884 | 0.2280 | yes | 1.2 GB |
138
+ | `colministral_DORA_complete_wrapper_fix_64b/checkpoint-2000` | DoRA r=64/α=64 | LLM | 2000 / 5541 | 1.083 | 64 | 2.0e-05 | 0.1865 | 0.2033 | yes | 1.2 GB |
139
+ | `colministral_DORA_complete_wrapper_fix_64b_lr5/checkpoint-1500` | DoRA r=64/α=64 | LLM | 1500 / 5541 | 0.812 | 64 | 5.0e-05 | 0.192 | 0.2251 | yes | 1.2 GB |
140
+ | `colministral_DORA_complete_wrapper_fix_64b_lr5/checkpoint-2000` | DoRA r=64/α=64 | LLM | 2000 / 5541 | 1.083 | 64 | 5.0e-05 | 0.1828 | 0.2262 | yes | 1.2 GB |
141
+ | `colministral_DORA_complete_wrapper_fix_pad/checkpoint-3500` | DoRA r=64/α=64 | LLM | 3500 / 11082 | 0.947 | 32 | 2.0e-05 | 0.1324 | 0.1669 | yes | 1.2 GB |
142
+ | `colministral_DORA_complete_wrapper_fix_pad/checkpoint-5500` | DoRA r=64/α=64 | LLM | 5500 / 11082 | 1.489 | 32 | 2.0e-05 | 0.1027 | 0.1756 | yes | 1.2 GB |
143
+ | `colministral_DORA_offical_wrraper_run2/checkpoint-1500` | DoRA r=64/α=64 | LLM | 1500 / 11082 | 0.406 | 32 | 2.0e-05 | 0.1528 | 0.1632 | yes | 1.2 GB |
144
+ | `colministral_DORA_offical_wrraper_run2/checkpoint-4000` | DoRA r=64/α=64 | LLM | 4000 / 11082 | 1.083 | 32 | 2.0e-05 | 0.12 | 0.1712 | yes | 1.2 GB |
145
+ | `colministral_DORA_offical_wrraper_run2/checkpoint-4500` | DoRA r=64/α=64 | LLM | n/a | — | — | — | — | — | no | 0.67 GB |
146
+ | `colministral_delora_resize` | DeLoRA r=64 | LLM | final adapter | — | — | — | — | — | no | 0.42 GB |
147
+ | `colministral_delora_resize/checkpoint-1000` | DeLoRA r=64 | LLM | 1000 / 1847 | 0.541 | 64 | 2.0e-05 | 0.2324 | 0.2532 | yes | 1.19 GB |
148
+ | `colministral_delora_resize/checkpoint-1847` | DeLoRA r=64 | LLM | 1847 / 1847 | 1.0 | 64 | 2.0e-05 | 0.2028 | — | yes | 1.19 GB |
149
+ | `colministral_instruct` | DeLoRA r=64 | LLM | final adapter | — | — | — | — | — | no | 0.42 GB |
150
+ | `colministral_instruct/checkpoint-1000` | DeLoRA r=64 | LLM | 1000 / 1847 | 0.541 | 64 | 2.0e-05 | 0.2313 | 0.2610 | yes | 1.19 GB |
151
+ | `colministral_instruct/checkpoint-1847` | DeLoRA r=64 | LLM | 1847 / 1847 | 1.0 | 64 | 2.0e-05 | 0.2038 | — | yes | 1.19 GB |
152
+ | `colministral_left_lora/checkpoint-1000` | LoRA r=32/α=32 | LLM | 1000 / 3694 | 0.271 | 32 | 5.0e-04 | 0.6161 | 0.5700 | yes | 0.59 GB |
153
+ | `colministral_left_lora/checkpoint-1500` | LoRA r=32/α=32 | LLM | 1500 / 3694 | 0.406 | 32 | 5.0e-04 | 0.5926 | 0.6067 | yes | 0.59 GB |
154
+ | `colministral_lora/checkpoint-1000` | LoRA r=32/α=32 | LLM | 1000 / 3694 | 0.271 | 32 | 5.0e-04 | 0.8159 | 0.6725 | yes | 0.59 GB |
155
+ | `colministral_lora/checkpoint-1500` | LoRA r=32/α=32 | LLM | 1500 / 3694 | 0.406 | 32 | 5.0e-04 | 1.1435 | 1.7930 | yes | 0.59 GB |
156
+ | `colministral_resize_lora` | LoRA r=32/α=32 | LLM | final adapter | — | — | — | — | — | no | 0.22 GB |
157
+
158
+ Notes on the older runs:
159
+
160
+ - Folders without a `checkpoint-N` suffix (`colministral_delora_resize`, `colministral_instruct`,
161
+ `colministral_resize_lora`) are the final adapter of the run, with processor files (`max_num_visual_tokens` = 1572).
162
+ - `colministral_DORA_offical_wrraper_run2/checkpoint-4500` is incomplete: no `trainer_state.json`, `scheduler.pt` or RNG
163
+ state, and its `optimizer.pt` is smaller than in the other checkpoints of the run (partial upload); `.swp` files are
164
+ editor leftovers.
165
+ - `.ipynb_checkpoints/` sub-folders are notebook autosave leftovers, not checkpoints.
166
+
167
+ ## Provenance
168
+
169
+ Trained on 2 × A100 40 GB. None of the ViDoRe benchmark data was used for training the latest run; the benchmarks are
170
+ only used for evaluation, with mteb 2.3.2.