chore(deps): update dependency colbert-ai to v0.2.22 #14

Open
renovatebot wants to merge 1 commit from renovate/colbert-ai-0.x into main
Collaborator

This PR contains the following updates:

Package Type Update Change
colbert-ai patch ==0.2.21 -> ==0.2.22
colbert-ai project.dependencies patch ==0.2.21 -> ==0.2.22

Release Notes

stanford-futuredata/ColBERT (colbert-ai)

v0.2.22: ColBERT 0.2.22

Overview

The main fix is #​390 which fixes the AdamW import error (transformers.AdamW is deprecated). This allows you to use the latest version of transformers. However the latest transformers depends on torch>=2.1 but ColBERT currently depends on torch==1.13.1. As shown in the sections below, using the latest version of torch (2.8.0) and transformers (4.55.0) does not break core functionality but does result in different indexing, retrieval and training results than using torch==1.13.1 and transformers==4.38.2 (the last version that had AdamW).

ColBERT 0.2.21 and 0.2.22 Comparison

In this section, I'm going to compare the index artifacts, retrieval artifacts, and training logs between two different colbert-ai installations:

  • The previous release on PyPI (0.2.21; August 20, 2024) with torch==1.13.1 and transformers==4.38.2 (the last version with AdamW) referred to as "0.2.21" below.
  • The latest release (0.2.22; August 10, 2025) with torch==2.8.0 and transformers==4.55.0 (the latest versions of both), referred to as "0.2.22" below.

My indexing, retrieval, training and comparison scripts can be found in my colbert-maintenance repo

ConditionalQA Index Artifacts

I compared the shapes and values (torch.allclose) of the .pt files in both indexes (of the UKPLab/DAPR/ConditionalQA document collection). All but one pair of tensors have the same shapes (it's an important one: ivf.pid.pt which maps document token embedding IDs to centroid IDs) and none of the tensors' values pass torch.allclose:

File Shapes match Values match
0.codes.pt Yes No
0.residuals.pt Yes No
1.codes.pt Yes No
1.residuals.pt Yes No
2.codes.pt Yes No
2.residuals.pt Yes No
avg_residual.pt Yes No
buckets.pt Yes No
centroids.pt Yes No
ivf.pid.pt No No

The changes in from 0.2.21 to 0.2.22 result in nearly wholesale index artifact changes.

ConditionalQA Retrieval Metrics

I compared aggregate and query-level metrics as well as raw retrieved passage IDs between the two colbert-ai installations.

PyTorch version Transformers version Mean Recall@10 Mean MRR@10
1.13.1 4.38.2 0.1309418985666801 0.1769138405669771
2.8.0 4.55.0 0.12709371722772383 0.17931236455221697

The changes in PyTorch (1.13.1 --> 2.8.0) and Transformers (4.38.2 --> 4.55.0) result in a decrease in Mean Recall@10 and increase in Mean MRR@10. On average there is 1 different passage retrieved per query between the two versions.

Here are the query-level differences in metrics, where "Increase" means the metric increased in the 0.2.22 install (relative to 0.2.21).

Recall@10 Difference Count
Equal 264
Decrease 4
Increase 3
MRR@10 Difference Count
Equal 256
Decrease 8
Increase 7

In most cases the query-level metrics are equal for 0.2.21 and 0.2.22. There are 4 queries for which Recall@10 decreases and 8 queries for which MRR@10 decreases for 0.2.22.

Training Dynamics (MS MARCO)

I trained the default bert-base-uncased model for 1000 batches with collection.tsv, queries.train.tsv and triples.train.small.json (JSON file created from the available tsv).

0.2.22 results in a higher training loss, higher mean positive document score and higher mean negative document score.

image
Multi-GPU Setting

I also ran indexing, search and training for the two colbert-ai installs on 4 x L4 GPUs. For indexing, the results are similar---all but one index tensor's shapes match, none of the index tensor values match.

In the case of multi-GPU search, the Mean Recall@10 and Mean MRR@10 both decrease for 0.2.22:

PyTorch version Transformers version Mean Recall@10 Mean MRR@10
1.13.1 4.38.2 0.1290968801164956 0.17891261055467697
2.8.0 4.55.0 0.12869273321788374 0.17573361447900193

At the query-level, multi-GPU search results in a net of 2 lower MRR@10 values for 0.2.22.

Recall@10 Difference Count
Equal 267
Decrease 2
Increase 2
MRR@10 Difference Count
Equal 253
Decrease 10
Increase 8

For multi-GPU training, 0.2.22 results in a lower training loss, and similar mean positive and negative scores.

image
Backwards Compatibility

Installing colbert-ai[torch]==0.2.22 with transformers==4.38.2 yields identical index, search and training artifacts as colbert-ai[torch]==0.2.21 with transformers==4.38.2.


In conclusion, while using the latest PyTorch and Transformers versions yields different index artifacts and thus different retrieval results as well as different training logs, the core functionality is not broken in 0.2.22. With this deprecated AdamW fix, users can now install pip install colbert-ai without error, install the latest transformers and torch version, and use the core functionality. The differences between index, search and training across different PyTorch versions will be investigated and documented before colbert-ai's torch dependency is changed to 2.x.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [colbert-ai](https://github.com/stanford-futuredata/ColBERT) | | patch | `==0.2.21` -> `==0.2.22` | | [colbert-ai](https://github.com/stanford-futuredata/ColBERT) | project.dependencies | patch | `==0.2.21` -> `==0.2.22` | --- ### Release Notes <details> <summary>stanford-futuredata/ColBERT (colbert-ai)</summary> ### [`v0.2.22`](https://github.com/stanford-futuredata/ColBERT/releases/tag/v0.2.22): ColBERT 0.2.22 ##### Overview - Bug Fixes - fix: AdamW import error [#&#8203;390](https://github.com/stanford-futuredata/ColBERT/pull/390) in [training.py](https://github.com/dipta007/ColBERT/blob/2b14566f8120ba57c47e879150ec73eca0286b2c/colbert/training/training.py#L7-L8) - Update [loaders.py ](https://github.com/stanford-futuredata/ColBERT/blob/9b11d5cf9788c8d32206f6e9f7474c156c8403bc/colbert/indexing/loaders.py#L25)to use `r` flag for regex [#&#8203;368](https://github.com/stanford-futuredata/ColBERT/pull/368). - use correct GitPython [#&#8203;388](https://github.com/stanford-futuredata/ColBERT/pull/388) in [setup.py](https://github.com/moritzwilksch/ColBERT/blob/736f88b981078a2c8687c8ee33c0f390e01284cd/setup.py#L25). - Improvements - omit tqdm [when pooling embeddings](https://github.com/stanford-futuredata/ColBERT/blob/bc7610a7372e8bb1df2efa3b7b91b23369a45050/colbert/modeling/checkpoint.py#L24) for a single document [#&#8203;367](https://github.com/stanford-futuredata/ColBERT/pull/367). - Do not do initial retrieval [if pids are passed in](https://github.com/stanford-futuredata/ColBERT/blob/7067ef598b5011edaa1f4a731a2c269dbac864e4/colbert/search/index_storage.py#L92) [#&#8203;352](https://github.com/stanford-futuredata/ColBERT/pull/352) The main fix is [#&#8203;390](https://github.com/stanford-futuredata/ColBERT/pull/390) which fixes the AdamW import error (`transformers.AdamW` is deprecated). This allows you to use the latest version of transformers. However the latest transformers [depends on `torch>=2.1`](https://github.com/huggingface/transformers/blob/6dfd561d9cd722dfc09f702355518c6d09b9b4e3/setup.py#L193C6-L193C16) but ColBERT currently [depends on `torch==1.13.1`](https://github.com/stanford-futuredata/ColBERT/blob/0c743705135932daf911487bd36e1588c2ffc604/setup.py#L36). As shown in the sections below, using the latest version of torch (`2.8.0`) and transformers (`4.55.0`) does not break core functionality but does result in different indexing, retrieval and training results than using `torch==1.13.1` and `transformers==4.38.2` (the last version that had `AdamW`). ##### ColBERT 0.2.21 and 0.2.22 Comparison In this section, I'm going to compare the index artifacts, retrieval artifacts, and training logs between two different `colbert-ai` installations: - The previous release on PyPI (0.2.21; August 20, 2024) with `torch==1.13.1` and `transformers==4.38.2` (the last version with `AdamW`) referred to as "0.2.21" below. - The latest release (0.2.22; August 10, 2025) with `torch==2.8.0` and `transformers==4.55.0` (the latest versions of both), referred to as "0.2.22" below. My indexing, retrieval, training and comparison scripts can be found in my [colbert-maintenance repo](https://github.com/vishalbakshi/colbert-maintenance/tree/main/0.2.22) ##### ConditionalQA Index Artifacts I compared the shapes and values (`torch.allclose`) of the `.pt` files in both indexes (of the [UKPLab/DAPR/ConditionalQA document collection](https://huggingface.co/datasets/UKPLab/dapr)). All but one pair of tensors have the same shapes (it's an important one: `ivf.pid.pt` which maps document token embedding IDs to centroid IDs) and none of the tensors' values pass `torch.allclose`: |File|Shapes match|Values match| |:-:|:-:|:-:| |0.codes.pt|Yes|<mark>No</mark> |0.residuals.pt|Yes|<mark>No</mark> |1.codes.pt|Yes|<mark>No</mark> |1.residuals.pt|Yes|<mark>No</mark> |2.codes.pt|Yes|<mark>No</mark> |2.residuals.pt|Yes|<mark>No</mark> |avg\_residual.pt|Yes|<mark>No</mark> |buckets.pt|Yes|<mark>No</mark> |centroids.pt|Yes|<mark>No</mark> |ivf.pid.pt|<mark>No</mark>|<mark>No</mark> The changes in from 0.2.21 to 0.2.22 result in nearly wholesale index artifact changes. ##### ConditionalQA Retrieval Metrics I compared aggregate and query-level metrics as well as raw retrieved passage IDs between the two `colbert-ai` installations. |PyTorch version|Transformers version|Mean Recall@10|Mean MRR@10| |:-:|:-:|:-:|:-:| |1.13.1|4.38.2|0.1309418985666801|0.1769138405669771 |2.8.0|4.55.0|0.12709371722772383|0.17931236455221697 The changes in PyTorch (`1.13.1` --> `2.8.0`) and Transformers (`4.38.2` --> `4.55.0`) result in a decrease in Mean Recall@10 and increase in Mean MRR@10. On average there is <mark>1</mark> different passage retrieved per query between the two versions. Here are the query-level differences in metrics, where "Increase" means the metric increased in the 0.2.22 install (relative to 0.2.21). |Recall@10 Difference|Count| |:-:|:-:| |Equal|264 |Decrease|4 |Increase|3 |MRR@10 Difference|Count| |:-:|:-:| |Equal|256 |Decrease|8 |Increase|7 In most cases the query-level metrics are equal for 0.2.21 and 0.2.22. There are 4 queries for which Recall@10 decreases and 8 queries for which MRR@10 decreases for 0.2.22. ##### Training Dynamics ([MS MARCO](https://microsoft.github.io/msmarco/Datasets.html)) I trained the default `bert-base-uncased` model for 1000 batches with `collection.tsv`, `queries.train.tsv` and `triples.train.small.json` (JSON file created from the available tsv). 0.2.22 results in a higher training loss, higher mean positive document score and higher mean negative document score. <img width="3372" height="2240" alt="image" src="https://github.com/user-attachments/assets/843debdd-d976-48d7-9ea8-c55de7d0fc96" /> ##### Multi-GPU Setting I also ran indexing, search and training for the two `colbert-ai` installs on 4 x L4 GPUs. For indexing, the results are similar---all but one index tensor's shapes match, none of the index tensor values match. In the case of multi-GPU search, the Mean Recall@10 and Mean MRR@10 both decrease for 0.2.22: |PyTorch version|Transformers version|Mean Recall@10|Mean MRR@10| |:-:|:-:|:-:|:-:| |1.13.1|4.38.2|0.1290968801164956|0.17891261055467697 |2.8.0|4.55.0|0.12869273321788374|0.17573361447900193 At the query-level, multi-GPU search results in a net of 2 lower MRR@10 values for 0.2.22. |Recall@10 Difference|Count| |:-:|:-:| |Equal|267 |Decrease|2 |Increase|2 |MRR@10 Difference|Count| |:-:|:-:| |Equal|253 |Decrease|10 |Increase|8 For multi-GPU training, 0.2.22 results in a lower training loss, and similar mean positive and negative scores. <img width="3372" height="2240" alt="image" src="https://github.com/user-attachments/assets/81cd644c-d842-425c-973a-dd2042b5bd7c" /> ##### Backwards Compatibility Installing `colbert-ai[torch]==0.2.22` with `transformers==4.38.2` yields identical index, search and training artifacts as `colbert-ai[torch]==0.2.21` with `transformers==4.38.2`. *** In conclusion, while using the latest PyTorch and Transformers versions yields different index artifacts and thus different retrieval results as well as different training logs, the core functionality is not broken in 0.2.22. With this deprecated AdamW fix, users can now install `pip install colbert-ai` without error, install the latest transformers and torch version, and use the core functionality. The differences between index, search and training across different PyTorch versions will be investigated and documented before `colbert-ai`'s torch dependency is changed to 2.x. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xLjMiLCJ1cGRhdGVkSW5WZXIiOiI0MS4xLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/colbert-ai-0.x:renovate/colbert-ai-0.x
git switch renovate/colbert-ai-0.x
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bannert/foss-webui!14
No description provided.