Pablo Montalvo
1360801a69
Add PaliGemma (#30814)
* add new model like
* add state dict slicing + new model config
* update palma config and weights, passes vision activations
* fix
* update
* reorder loading/unpacking
* clean up
* add debug statements
* change device
* fix
* debugging
* fix noncausal mask
* fixup sdpa + causal mask
* fix activation function
* remove debug before changing modeling file
* add variants
* debug attention mask in generate
* revert to non-debug sdpa
* revert gemma modifications
* add custom language modeling
* use Processor
* add language modeling file to init
* try thin wrapper around generate
* Update
* update mask
* breakpoints galore
* remove conflict
* switch to left-padding
* add incomplete model doc
* add paligemma global files
* batch rename paligemma
* make generation match outputs and captioning
* style
* style
* remove copied from + doc
* remove more copied from
* remove copy from projector
* minor fix
* update config and style
* add readme - dummy
* CORRECT image captioning
* moving to args
* add siglip proper + fix merging image + text features
* take update_causal_mask from upstream
* remove breakpoint
* leverage AutoModel
* fix input_ids slicing
* make siglip head conditional
* remove encoder_decoder value
* remove unneeded modeling file
* add commented 4d attention mask
* FIXED generation with 4D mask
* Update src/transformers/models/siglip/modeling_siglip.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* fix left padding detection
* shuffle order of verifications
* fix missing labels for training
* fix
* vectorize merging of features, improve slicing
* improve testing before conversion
* handle merging in processor
* image token index depends on checkpoint
* add variants, save processor too
* save processors, base tokenizer off spm file
* expand model embeddings due to additional image token
* pass image processing args
* add convert rgb to siglip processor
* add \n token separately
* fix tokenizer and prompts
* fix docstrings
* change to camel
* fix casing
* debug pos_ids and sdpa
* pass and use cache_position
* add flag for newline tokenization
* Update src/transformers/models/paligemma/processing_paligemma.py
Co-authored-by: Merve Noyan <merveenoyan@gmail.com>
* simplify conversion script
* add copied from
* add precision to conversion script
* Update src/transformers/models/paligemma/modeling_paligemma.py
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
* clean up
* Shift attention mask from `1:`
After discussion with @molbap
* add docs, fix quality
* quality, tied weights inheritance, and logits/label alignment
* fix more tests
* pass attn_implementation to language model correctly
* add SiglipVisionTransformer to no split modules
* skip paligemma test for sdpa dispatch to flash
* skip incompatible tests
* quality
* [broken archive maps]
* Apply suggestions
- remove archive lists
- style
- take shape of inputs_embeds for batch
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Update src/transformers/utils/dummy_pt_objects.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* simplify conversion script
* add suggestions
* add suggestions
* add copied from
* fix
* move labels out
* revert
* fix
* remove placeholder labels if None
* use cache_position
* fix quality + docstrings
* fix quality
* fix paligemma 4d gemma mask incompatibility
* fix config docstring
* fix query and attn_mask dtype
---------
Co-authored-by: ArthurZucker <arthur.zucker@gmail.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
Co-authored-by: Merve Noyan <merveenoyan@gmail.com>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
2024-05-14 22:07:15 +02:00
..
2024-05-07 12:59:49 +02:00
2022-02-23 15:46:28 -05:00
2023-10-09 11:04:57 +02:00
2024-04-18 12:49:43 -04:00
2024-05-13 18:14:36 +02:00
2024-03-19 14:43:02 +00:00
2024-04-22 13:15:28 +01:00
2024-05-14 13:31:39 +05:00
2024-05-14 22:07:15 +02:00
2024-04-25 12:07:21 +01:00
2024-02-29 03:56:16 +01:00
2024-05-13 15:00:39 +01:00
2024-05-13 11:41:03 +02:00
2023-12-07 10:00:08 +01:00
2024-02-16 08:16:58 +01:00
2024-03-25 10:33:38 +01:00
2024-05-13 18:14:36 +02:00
2024-04-26 18:21:47 +01:00
2020-01-06 15:11:12 +01:00
2023-12-20 18:33:17 +00:00
2024-03-06 10:57:04 +00:00
2023-11-15 14:10:39 +01:00
2024-03-15 14:18:41 +00:00
2023-06-15 07:30:24 -04:00
2024-03-15 14:18:41 +00:00
2024-02-20 16:20:20 +01:00
2024-03-15 14:18:41 +00:00
2023-11-10 15:35:27 +00:00
2024-05-14 22:07:15 +02:00
2024-04-15 09:36:06 +01:00
2024-01-23 10:28:23 +01:00
2024-05-13 15:59:46 +01:00
2024-03-21 14:04:11 +00:00
2024-05-13 13:46:06 +02:00
2024-02-05 14:50:07 +00:00
2024-01-19 09:59:14 +00:00
2023-09-05 10:12:25 +02:00
2024-04-15 09:36:06 +01:00
2024-03-15 14:18:41 +00:00