transformers
Add ColPali to 🤗 transformers
#33736
Merged

Add ColPali to 🤗 transformers #33736

ArthurZucker merged 137 commits into huggingface:main from tonywu71:add-colpali
tonywu71
yonigozlan
yonigozlan commented on 2024-09-26
tonywu71 tonywu71 force pushed from 901cc8d4 1 year ago
tonywu71 tonywu71 force pushed 1 year ago
tonywu71 tonywu71 force pushed 1 year ago
yonigozlan
yonigozlan commented on 2024-10-01
tonywu71 tonywu71 force pushed 1 year ago
tonywu71 tonywu71 force pushed 1 year ago
tonywu71 tonywu71 force pushed 1 year ago
tonywu71 tonywu71 force pushed 1 year ago
tonywu71 tonywu71 force pushed 1 year ago
tonywu71 tonywu71 force pushed 1 year ago
tonywu71 tonywu71 force pushed 1 year ago
tonywu71
tonywu71 commented on 2024-10-19
tonywu71 tonywu71 requested a review from yonigozlan yonigozlan 1 year ago
tonywu71 tonywu71 force pushed 1 year ago
yonigozlan
yonigozlan commented on 2024-10-14
tonywu71
tonywu71
tonywu71 tonywu71 force pushed 1 year ago
qubvel qubvel added New model
qubvel qubvel added Vision
qubvel qubvel added Multimodal
yonigozlan yonigozlan requested a review from ArthurZucker ArthurZucker 1 year ago
tonywu71 tonywu71 force pushed 1 year ago
tonywu71
ArthurZucker
HuggingFaceDocBuilderDev
tonywu71
yonigozlan
tonywu71 tonywu71 force pushed 1 year ago
tonywu71
ArthurZucker
ArthurZucker commented on 2024-11-20
tonywu71
tonywu71 tonywu71 force pushed 1 year ago
yonigozlan
yonigozlan yonigozlan requested a review from ArthurZucker ArthurZucker 1 year ago
ArthurZucker
ArthurZucker commented on 2024-11-28
tonywu71 feat: run `add-new-model-like`
0f5c6a78
tonywu71 feat: add paligemma code with "copied from"
726f1569
tonywu71 feat: add ColPaliProcessor
9a88bf19
tonywu71 feat: add ColPaliModel
fab4e462
tonywu71 feat: add ColPaliConfig
66656f6e
tonywu71 feat: rename `ColPaliForConditionalGeneration` to `ColPaliModel`
a377d60e
tonywu71 fixup modeling colpali
0addcabf
tonywu71 fix: fix root import shortcuts
e8979b98
tonywu71 fix: fix `modeling_auto` dict
49fb8ba5
tonywu71 feat: comment out ColPali test file
88b02126
tonywu71 fix: fix typos from `add-new-model-like`
cbd781b2
tonywu71 feat: explicit the forward input args
44fcd04c
tonywu71 feat: move everything to `modular_colpali.py`
a6ca45ad
tonywu71 fix: put back ColPaliProcesor
af9ca36e
tonywu71 feat: add auto-generated files
087870bc
tonywu71 fix: run `fix-copies`
cc11ef8c
tonywu71 fix: remove DOCStRING constants to make modular converter work
f69ee9bd
tonywu71 fix: fix typo + modular converter
fbe56650
tonywu71 fix: add missing imports
e58794c2
tonywu71 feat: no more errors when loading ColPaliModel
2dd52183
tonywu71 fix: remove unused args in forward + tweak doc
e05ea433
tonywu71 feat: rename `ColPaliModel` to `ColPaliForRetrieval`
bda69168
tonywu71 fix: apply `fix-copies`
bfff5642
tonywu71 feat: add ColPaliProcessor to `modular_colpali`
da4c5663
tonywu71 fix: run make quality + make style
ae37f186
tonywu71 fix: remove duplicate line in configuration_auto
38f0d8cd
tonywu71 feat: make ColPaliModel inehrit from PaliGemmaForConditionalGeneration
c63a3023
tonywu71 fix: tweak and use ColPaliConfig
d66606e1
tonywu71 feat: rename `score` to `post_process_retrieval`
7f750d3f
tonywu71 build: run modular formatter + make style
41dbbb83
tonywu71 feat: convert colpali weights + fixes
28592c9a
tonywu71 feat: remove old weight converter file
84763a3d
tonywu71 feat: add and validate tests
672bdb24
tonywu71 feat: replace harcoded path to "vidore/colpali-v1.2-hf" in tests
f7ce9b13
tonywu71 fix: add bfloat16 conversion in weight converter
3789a6ec
tonywu71 feat: replace pytest with unittest in modeling colpali test
5e09645d
tonywu71 feat: add sanity check for weight conversion (doesn't work yet)
8ea82734
tonywu71 feat: add shape sanity check in weigth converter
d1007794
tonywu71 feat: make ColPaliProcessor args explicit
e6bdf406
tonywu71 doc: add doc for ColPali
abe32322
tonywu71 fix: trying to fix output mismatch
6ae178cc
tonywu71 feat: tweaks
6d35b27f
tonywu71 fix: ColPaliModelOutput inherits from ModelOutput instead of PaliGemm…
06533400
tonywu71 fix: address comments on PR
97a6468e
tonywu71 fix: adapt tests to the Hf norm
8212717d
tonywu71 wip: try things
a7b297a7
tonywu71 feat: add `__call__` method to `ColPaliProcessor`
592e7162
tonywu71 feat: remove need for dummy image in `process_queries`
f50a9793
tonywu71 build: run new modular converter
25eb21b7
tonywu71 fix: fix incorrect method override
3ed76273
yonigozlan Fix tests, processing, modular, convert
9038eada
yonigozlan fix tokenization auto
cb7e301a
tonywu71 hotfix: manually fix processor -> fixme once convert modular is fixed
3f118cae
tonywu71 fix: convert weights working
3aa11a65
tonywu71 feat: rename and improve convert weight script
8ff89626
tonywu71 feat: tweaks
7a54fec3
tonywu71 fest: remove `device` input for `post_process_retrieval`
2c94eaac
tonywu71 refactor: remove unused `get_torch_device`
2d7e96f7
yonigozlan Fix all tests
11893408
tonywu71 docs: update ColPali model doc
246b67e5
tonywu71 wip: fix convert weights to hf
4a5bc0ca
yonigozlan fix logging modular
afbbc98d
tonywu71 docs: add acknowledgements in model doc
9db013d2
yonigozlan fix logging modular
afbbc98d
tonywu71 docs: add missing docstring to ColPaliProcessor
c4e156cb
tonywu71 docs: add doc for `ColPaliForRetrievalOutput.forward`
d6a0bde3
tonywu71 test: add integration test for ColPali
ffe894a3
tonywu71 chore: rerun convert modular
b0e33be8
tonywu71 build: fix root imports
f052927a
tonywu71 Update docs/source/en/index.md
ad09d672
tonywu71 wip: reduce the prediction gap in weight conversion
b6477881
tonywu71 tests: change dataset path to the new one in hf-internal
a711fa7d
tonywu71 fix: colpali weight conversion works
e9035d9a
tonywu71 test: add fine-grained check for ColPali integration test
9f7299b2
tonywu71 docs: move input docstring in a variable
f6e3155b
tonywu71 fix: remove hardcoded torch device in test
da03264c
tonywu71 docs: fix python example for ColPali
db373449
tonywu71 feat: add option to choose `score_retrieval`'s output dtype and device
e72c379a
tonywu71 feat: add `patch_size` property in ColPali model
c53ffcb5
tonywu71 docs: update description for ColPali cookbooks
b1027389
tonywu71 fix: fix root imports in transformers
da05b700
yonigozlan Fix CI issues
f1008886
tonywu71 feat: remove ColPali config and model from `modular_colpali.py`
aee8d7c6
tonywu71 feat: add `ColPaliPreTrainedModel` and update modeling and configurat…
f53ae20d
tonywu71 fix: fix auto-removed imports in root `__init__.py`
b93c76b0
tonywu71 fix: fix `_init_weight`
fba3b775
tonywu71 fix: fix `resize_token_embeddings`
be6a0bdc
tonywu71 fix: make `input_ids` optional in forward
ecc7982b
tonywu71 feat: rename `projection_layer` to `embedding_proj_layer`
b1a25ce5
yonigozlan fix unprotected torch import
f187bc00
yonigozlan change vlm_backbone_config to vlm_config
c8efb8a5
yonigozlan fix unprotected import in modular this time
a30a74de
tonywu71 fix: load config from Hub + tweaks in convert weight script
c42c61bf
tonywu71 docs: move example usage from model docstring to model markdown
e981b716
tonywu71 docs: fix input docstring for ColPali's forward method
2ce28f5f
tonywu71 fix: use `sub_configs` for ColPaliConfig
a582f484
tonywu71 fix: remove non-needed sanity checks in weight conversion script + tw…
9f34d806
tonywu71 tonywu71 force pushed to 9f34d806 1 year ago
tonywu71 fix: fix issue with `replace_return_docstrings` in ColPali's `forward`
05c29da3
tonywu71 docs: update docstring for `ColPaliConfig`
f67e217e
tonywu71 test: change model path in ColPali test
2ed868c3
tonywu71 fix: fix ColPaliConfig
2aa5e9d4
tonywu71 fix: fix weight conversion script
e6944ad5
tonywu71 test: fix expected weights for ColPali model
337a0a0b
tonywu71 docs: update ColPali markdown
c10e7608
tonywu71 docs: fix minor typo in ColPaliProcessor
69d01fc2
yonigozlan Fix tests and add _no_split_modules
8061469d
yonigozlan
yonigozlan commented on 2024-11-29
yonigozlan yonigozlan requested a review from ArthurZucker ArthurZucker 1 year ago
ArthurZucker
ArthurZucker commented on 2024-12-02
ArthurZucker
ArthurZucker
yonigozlan add text_config to colpali config
7dce43fa
yonigozlan yonigozlan added run-slow
yonigozlan [run slow] colpali
855f1399
yonigozlan Merge branch 'main' into add-colpali
603e9e48
yonigozlan move inputs to torch_device in integration test
c41bad4e
yonigozlan skip test_model_parallelism
21c13096
yonigozlan
tonywu71 docs: clarify quickstart snippet in ColPali's model card
505ad9ed
tonywu71 docs: update ColPali's model card
655bac71
yonigozlan yonigozlan requested a review from ArthurZucker ArthurZucker 1 year ago
yonigozlan Merge remote-tracking branch 'upstream/main' into add-colpali
e9af3a52
ArthurZucker
ArthurZucker approved these changes on 2024-12-17
ArthurZucker ArthurZucker merged f33a0ceb into main 1 year ago

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone