Tony Wu
f33a0cebb3
Add ColPali to 🤗 transformers (#33736)
* feat: run `add-new-model-like`
* feat: add paligemma code with "copied from"
* feat: add ColPaliProcessor
* feat: add ColPaliModel
* feat: add ColPaliConfig
* feat: rename `ColPaliForConditionalGeneration` to `ColPaliModel`
* fixup modeling colpali
* fix: fix root import shortcuts
* fix: fix `modeling_auto` dict
* feat: comment out ColPali test file
* fix: fix typos from `add-new-model-like`
* feat: explicit the forward input args
* feat: move everything to `modular_colpali.py`
* fix: put back ColPaliProcesor
* feat: add auto-generated files
* fix: run `fix-copies`
* fix: remove DOCStRING constants to make modular converter work
* fix: fix typo + modular converter
* fix: add missing imports
* feat: no more errors when loading ColPaliModel
* fix: remove unused args in forward + tweak doc
* feat: rename `ColPaliModel` to `ColPaliForRetrieval`
* fix: apply `fix-copies`
* feat: add ColPaliProcessor to `modular_colpali`
* fix: run make quality + make style
* fix: remove duplicate line in configuration_auto
* feat: make ColPaliModel inehrit from PaliGemmaForConditionalGeneration
* fix: tweak and use ColPaliConfig
* feat: rename `score` to `post_process_retrieval`
* build: run modular formatter + make style
* feat: convert colpali weights + fixes
* feat: remove old weight converter file
* feat: add and validate tests
* feat: replace harcoded path to "vidore/colpali-v1.2-hf" in tests
* fix: add bfloat16 conversion in weight converter
* feat: replace pytest with unittest in modeling colpali test
* feat: add sanity check for weight conversion (doesn't work yet)
* feat: add shape sanity check in weigth converter
* feat: make ColPaliProcessor args explicit
* doc: add doc for ColPali
* fix: trying to fix output mismatch
* feat: tweaks
* fix: ColPaliModelOutput inherits from ModelOutput instead of PaliGemmaCausalLMOutputWithPast
* fix: address comments on PR
* fix: adapt tests to the Hf norm
* wip: try things
* feat: add `__call__` method to `ColPaliProcessor`
* feat: remove need for dummy image in `process_queries`
* build: run new modular converter
* fix: fix incorrect method override
* Fix tests, processing, modular, convert
* fix tokenization auto
* hotfix: manually fix processor -> fixme once convert modular is fixed
* fix: convert weights working
* feat: rename and improve convert weight script
* feat: tweaks
* fest: remove `device` input for `post_process_retrieval`
* refactor: remove unused `get_torch_device`
* Fix all tests
* docs: update ColPali model doc
* wip: fix convert weights to hf
* fix logging modular
* docs: add acknowledgements in model doc
* docs: add missing docstring to ColPaliProcessor
* docs: tweak
* docs: add doc for `ColPaliForRetrievalOutput.forward`
* feat: add modifications from colpali-engine v0.3.2 in ColPaliProcessor
* fix: fix and upload colapli hf weights
* refactor: rename `post_process_retrieval` to `score_retrieval`
* fix: fix wrong typing for `score_retrieval`
* test: add integration test for ColPali
* chore: rerun convert modular
* build: fix root imports
* Update docs/source/en/index.md
Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>
* fix: address PR comments
* wip: reduce the prediction gap in weight conversion
* docs: add comment in weight conversion script
* docs: add example for `ColPaliForRetrieval.forward`
* tests: change dataset path to the new one in hf-internal
* fix: colpali weight conversion works
* test: add fine-grained check for ColPali integration test
* fix: fix typos in convert weight script
* docs: move input docstring in a variable
* fix: remove hardcoded torch device in test
* fix: run the new modular refactor
* docs: fix python example for ColPali
* feat: add option to choose `score_retrieval`'s output dtype and device
* docs: update doc for `score_retrieval`
* feat: add `patch_size` property in ColPali model
* chore: run `make fix-copies`
* docs: update description for ColPali cookbooks
* fix: remove `ignore_index` methods
* feat: remove non-transformers specific methods
* feat: update `__init__.py` to new hf format
* fix: fix root imports in transformers
* feat: remove ColPali's inheritance from PaliGemma
* Fix CI issues
* nit remove prints
* feat: remove ColPali config and model from `modular_colpali.py`
* feat: add `ColPaliPreTrainedModel` and update modeling and configuration code
* fix: fix auto-removed imports in root `__init__.py`
* fix: various fixes
* fix: fix `_init_weight`
* temp: comment `AutoModel.from_config` for experiments
* fix: add missing `output_attentions` arg in ColPali's forward
* fix: fix `resize_token_embeddings`
* fix: make `input_ids` optional in forward
* feat: rename `projection_layer` to `embedding_proj_layer`
* wip: fix convert colpali weight script
* fix tests and convert weights from original repo
* fix unprotected import
* fix unprotected torch import
* fix style
* change vlm_backbone_config to vlm_config
* fix unprotected import in modular this time
* fix: load config from Hub + tweaks in convert weight script
* docs: move example usage from model docstring to model markdown
* docs: fix input docstring for ColPali's forward method
* fix: use `sub_configs` for ColPaliConfig
* fix: remove non-needed sanity checks in weight conversion script + tweaks
* fix: fix issue with `replace_return_docstrings` in ColPali's `forward`
* docs: update docstring for `ColPaliConfig`
* test: change model path in ColPali test
* fix: fix ColPaliConfig
* fix: fix weight conversion script
* test: fix expected weights for ColPali model
* docs: update ColPali markdown
* docs: fix minor typo in ColPaliProcessor
* Fix tests and add _no_split_modules
* add text_config to colpali config
* [run slow] colpali
* move inputs to torch_device in integration test
* skip test_model_parallelism
* docs: clarify quickstart snippet in ColPali's model card
* docs: update ColPali's model card
---------
Co-authored-by: yonigozlan <yoni.gozlan@huggingface.co>
Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>
2024-12-17 11:26:43 +01:00
..
2024-09-03 14:01:00 +01:00
2024-09-24 21:28:19 -04:00
2023-11-03 10:57:03 -04:00
2024-12-06 12:17:34 +01:00
2024-05-16 10:56:11 +01:00
2024-10-08 14:26:43 +02:00
2023-11-03 10:57:03 -04:00
2023-12-09 05:38:14 +09:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-02-16 08:16:58 +01:00
2023-11-03 10:57:03 -04:00
2024-04-26 16:23:44 +01:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-09-20 14:27:32 +01:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-11-18 13:21:07 +01:00
2024-06-04 18:29:45 +02:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-09-09 10:47:24 +02:00
2023-11-03 10:57:03 -04:00
2024-09-26 10:18:07 -04:00
2023-11-03 10:57:03 -04:00
2023-11-06 19:45:03 +00:00
2024-07-18 10:30:37 +05:30
2024-09-09 10:47:24 +02:00
2023-11-10 13:49:10 +00:00
2024-09-09 10:47:24 +02:00
2024-04-17 12:19:18 +02:00
2024-12-13 09:35:50 +01:00
2024-03-15 14:29:11 +01:00
2024-12-17 11:26:43 +01:00
2024-05-08 11:42:07 +01:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-08-19 10:21:51 +01:00
2023-11-03 10:57:03 -04:00
2024-05-27 14:57:43 +02:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-11-19 11:18:58 -05:00
2024-05-16 10:56:11 +01:00
2023-11-03 10:57:03 -04:00
2024-10-22 15:50:54 +02:00
2024-10-22 15:50:54 +02:00
2024-05-28 18:07:07 +01:00
2024-10-21 09:05:05 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-08-19 09:28:13 +01:00
2024-10-02 13:55:19 +01:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-23 17:44:08 +00:00
2024-05-28 18:07:07 +01:00
2023-06-20 18:07:47 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-02-16 08:16:58 +01:00
2024-05-28 18:07:07 +01:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-09-09 10:47:24 +02:00
2023-09-04 17:18:34 +01:00
2024-03-29 14:31:31 +00:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-09-24 21:28:19 -04:00
2024-08-07 10:03:05 +05:00
2024-05-20 10:06:57 +02:00
2023-11-03 10:57:03 -04:00
2024-10-18 17:41:12 +02:00
2023-11-03 10:57:03 -04:00
2024-06-19 09:40:57 +02:00
2024-02-16 08:16:58 +01:00
2023-12-09 05:38:14 +09:00
2023-11-03 10:57:03 -04:00
2024-06-26 13:56:36 +01:00
2024-01-15 09:09:22 +01:00
2023-11-03 10:57:03 -04:00
2024-05-28 18:07:07 +01:00
2024-08-27 21:27:21 +02:00
2024-09-21 01:43:50 +02:00
2024-05-28 18:07:07 +01:00
2024-07-25 19:20:47 +01:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-09-09 10:47:24 +02:00
2024-04-22 18:30:38 +01:00
2023-11-03 10:57:03 -04:00
2024-12-10 11:36:25 -08:00
2024-12-06 12:17:34 +01:00
2024-05-13 15:59:46 +01:00
2024-12-09 10:01:31 +01:00
2023-11-03 10:57:03 -04:00
2024-02-02 08:45:00 +01:00
2024-11-18 13:21:07 +01:00
2024-11-18 13:21:07 +01:00
2024-09-09 10:47:24 +02:00
2024-05-14 16:32:01 +02:00
2024-05-28 18:07:07 +01:00
2023-10-30 21:42:19 +01:00
2023-11-03 10:57:03 -04:00
2024-02-12 10:48:31 -08:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-02-12 10:48:31 -08:00
2023-12-20 14:25:07 +05:30
2024-09-12 11:24:56 +02:00
2024-05-20 10:06:57 +02:00
2024-12-10 11:36:25 -08:00
2024-11-18 13:21:07 +01:00
2024-10-07 09:54:07 +02:00
2024-11-18 13:21:07 +01:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-09-25 18:04:42 +01:00
2023-11-28 13:19:50 +00:00
2024-08-26 17:49:44 +02:00
2024-10-02 14:08:46 +01:00
2024-07-22 14:14:47 +01:00
2024-02-02 08:45:00 +01:00
2024-05-31 16:56:17 +01:00
2024-05-31 16:56:17 +01:00
2024-09-09 10:47:24 +02:00
2024-09-09 10:47:24 +02:00
2023-11-03 10:57:03 -04:00
2024-05-28 18:07:07 +01:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-02-08 14:13:35 -08:00
2024-10-16 11:21:49 +02:00
2024-12-10 11:36:25 -08:00
2024-12-10 11:36:25 -08:00
2024-10-30 10:11:50 +01:00
2023-11-03 10:57:03 -04:00
2024-09-09 10:47:24 +02:00
2023-11-06 19:45:03 +00:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-10-16 11:21:49 +02:00
2023-11-03 10:57:03 -04:00
2024-09-09 10:47:24 +02:00
2023-11-03 10:57:03 -04:00
2024-02-01 03:53:49 +01:00
2024-03-18 13:06:12 +00:00
2024-02-12 10:48:31 -08:00
2023-11-03 10:57:03 -04:00
2024-10-06 10:33:16 +02:00
2024-05-28 18:07:07 +01:00
2024-08-06 15:42:05 +02:00
2024-05-28 18:07:07 +01:00
2023-11-06 19:45:03 +00:00
2024-09-25 18:04:42 +01:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-11-25 16:31:22 +01:00
2024-04-17 17:59:07 +02:00
2024-09-05 15:49:28 +02:00
2024-09-26 12:18:23 -04:00
2024-09-09 10:47:24 +02:00
2023-11-03 10:57:03 -04:00
2024-09-09 10:47:24 +02:00
2024-10-10 11:49:34 +02:00
2024-05-14 08:36:11 +02:00
2023-12-11 18:03:42 +00:00
2024-09-27 11:23:14 +02:00
2024-02-19 15:22:29 +01:00
2024-02-19 15:22:29 +01:00
2024-02-08 14:13:35 -08:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-05-20 10:06:57 +02:00
2024-05-02 15:30:21 +02:00
2024-04-15 14:10:59 +02:00
2024-10-04 21:39:45 +02:00
2024-09-09 10:47:24 +02:00
2024-02-26 08:42:24 -08:00
2024-11-28 16:04:05 +01:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-02-12 10:48:31 -08:00
2024-07-09 10:38:29 +01:00
2024-03-13 19:05:20 +00:00
2024-02-08 14:13:35 -08:00
2024-05-28 18:07:07 +01:00
2024-08-08 15:47:24 +02:00
2024-10-14 08:53:32 +02:00
2024-10-07 09:54:07 +02:00
2024-10-14 08:53:32 +02:00
2023-11-03 10:57:03 -04:00
2024-05-28 18:07:07 +01:00
2024-04-15 18:30:59 +02:00
2024-02-02 08:45:00 +01:00
2023-11-06 19:45:03 +00:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-07-13 11:46:54 -04:00
2023-11-06 19:45:03 +00:00
2024-07-22 10:08:27 -07:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-11-19 16:49:25 +01:00
2024-02-02 08:45:00 +01:00
2024-10-07 10:08:20 +02:00
2023-12-14 15:14:13 +00:00
2023-12-14 15:14:13 +00:00
2024-06-10 12:35:10 +01:00
2024-09-09 10:47:24 +02:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-09-27 10:33:55 +02:00
2024-05-28 18:07:07 +01:00
2023-11-03 10:57:03 -04:00
2024-02-16 08:16:58 +01:00
2023-08-03 14:12:07 +01:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-05-20 10:06:57 +02:00
2024-05-20 10:06:57 +02:00
2024-10-29 09:36:03 +00:00
2024-04-19 18:31:43 +01:00
2024-09-09 10:47:24 +02:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-06 19:45:03 +00:00
2024-04-15 14:10:59 +02:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-06 19:45:03 +00:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-12-11 12:40:30 +00:00
2023-11-03 10:57:03 -04:00
2024-02-16 08:16:58 +01:00
2023-11-03 10:57:03 -04:00
2024-05-28 18:07:07 +01:00
2023-11-23 17:02:16 +00:00
2024-04-10 16:02:50 +02:00
2023-11-03 10:57:03 -04:00
2024-02-02 08:45:00 +01:00
2024-02-02 08:45:00 +01:00
2023-11-03 10:57:03 -04:00
2023-11-22 17:21:36 +01:00
2023-11-03 10:57:03 -04:00
2024-02-02 08:45:00 +01:00
2024-12-10 11:36:25 -08:00
2024-05-16 10:56:11 +01:00
2023-11-03 10:57:03 -04:00
2024-11-27 08:19:34 -08:00
2024-02-16 08:16:58 +01:00
2023-11-03 10:57:03 -04:00
2024-02-16 08:16:58 +01:00
2024-05-28 18:07:07 +01:00
2024-05-16 10:56:11 +01:00
2024-05-16 10:56:11 +01:00
2024-06-11 15:47:38 +01:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-09-09 10:47:24 +02:00
2024-10-15 11:27:54 +02:00
2023-11-03 10:57:03 -04:00
2024-01-18 13:37:34 +00:00
2024-06-05 11:56:11 +01:00
2024-06-05 11:56:11 +01:00
2024-02-02 08:45:00 +01:00
2024-08-27 14:11:52 +02:00
2024-05-28 18:07:07 +01:00
2023-11-03 10:57:03 -04:00
2024-05-28 18:07:07 +01:00
2023-11-03 10:57:03 -04:00
2024-09-09 10:47:24 +02:00
2023-11-03 10:57:03 -04:00
2023-11-03 10:57:03 -04:00
2024-09-09 10:47:24 +02:00
2023-11-03 10:57:03 -04:00
2024-06-05 11:56:11 +01:00
2023-11-03 10:57:03 -04:00
2024-05-16 10:56:11 +01:00
2023-11-03 10:57:03 -04:00
2024-10-04 22:28:05 +02:00
2024-10-22 15:50:54 +02:00