* tvp model for video grounding
add tokenizer auto
fix param in TVPProcessor
add docs
clear comments and enable different torch dtype
add image processor test and model test and fix code style
* fix conflict
* fix model doc
* fix image processing tests
* fix tvp tests
* remove torch in processor
* fix grammar error
* add more details on tvp.md
* fix model arch for loss, grammar, and processor
* add docstring and do not regard TvpTransformer, TvpVisionModel as individual model
* use pad_image
* update copyright
* control first downsample stride
* reduce first only works for ResNetBottleNeckLayer
* fix param name
* fix style
* add testing
* fix style
* rm init_weight
* fix style
* add post init
* fix comments
* do not test TvpTransformer
* fix warning
* fix style
* fix example
* fix config map
* add link in config
* fix comments
* fix style
* rm useless param
* change attention
* change test
* add notes
* fix comments
* fix tvp
* import checkpointing
* fix gradient checkpointing
* Use a more accurate example in readme
* update
* fix copy
* fix style
* update readme
* delete print
* remove tvp test_forward_signature
* remove TvpTransformer
* fix test init model
* merge main and make style
* fix tests and others
* fix image processor
* fix style and model_input_names
* fix tests
* fix image_attention gate in idefics modeling
* update comment
* cleaner gating
* fix gate condition
* create attention gate once
* update comment
* update doc of cross-attention forward
* improve comment
* bring back no_images
* pass cross_attention_gate similarly to no_images gate
* add information on gate shape
* fix no_images placement
* make tests for gate
* take off no_images logic
* update test based on comments
* raise value error if cross_attention_gate is None
* send cross_attention_gate to device
* Revert "send cross_attention_gate to device"
This reverts commit 054f842284.
* send cross_attention_gate to device
* fix device in test + nit
* fill hidden_states with zeros instead of multiplying with the gate
* style
* Update src/transformers/models/idefics/modeling_idefics.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Update src/transformers/models/idefics/modeling_idefics.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
---------
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Enable large-v3 downloading and update language list
* Fix type annotation
* make fixup
* Export Whisper feature extractor
* Fix error after extractor loading
* Do not use pre-computed mel filters
* Save the full preprocessor properly
* Update docs
* Remove comment
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Add alignment heads consistent with each Whisper version
* Remove alignment heads calculation
* Save fast tokenizer format as well
* Fix slow to fast conversion
* Fix bos/eos/pad token IDs in the model config
* Add decoder_start_token_id to config
---------
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* timm to pytorch conversion for vit model fix
* remove unecessary print statments
* Detect non-supported ViTs in transformers & better handle id2label mapping
* detect non supported hybrid resnet-vit models in conversion script
* remove check for overlap between cls token and pos embed
* Renamed variable extension to builder_name
* If builder name is jsonl change to json to align with load_datasets
* Apply suggestions from code review
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
---------
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
* Load idx2sym from pretrained vocab file in Transformer XL
When loading vocab file from a pretrained tokenizer for Transformer XL,
although the pickled vocabulary file contains a idx2sym key, it isn't
loaded, because it is discarded as the empty list already exists as
an attribute.
Solution is to explicitly take it into account, just like for sym2idx.
* ran make style
* Updated albert.md doc for ALBERT model
* Update docs/source/en/model_doc/albert.md
Fixed Resources heading
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* Update the ALBERT model doc resources
Fixed resource example for fine-tuning the ALBERT sentence-pair classification.
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* Update docs/source/en/model_doc/albert.md
Removed resource duplicate
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* Updated albert.md doc with reviewed changes
* Updated albert.md doc for ALBERT
* Update docs/source/en/model_doc/albert.md
Removed duplicates from updated docs/source/en/model_doc/albert.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* Update docs/source/en/model_doc/albert.md
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* try to stylify using ruff
* might need to remove these changes?
* use ruf format andruff check
* use isinstance instead of type comparision
* use # fmt: skip
* use # fmt: skip
* nits
* soem styling changes
* update ci job
* nits isinstance
* more files update
* nits
* more nits
* small nits
* check and format
* revert wrong changes
* actually use formatter instead of checker
* nits
* well docbuilder is overwriting this commit
* revert notebook changes
* try to nuke docbuilder
* style
* fix feature exrtaction test
* remve `indent-width = 4`
* fixup
* more nits
* update the ruff version that we use
* style
* nuke docbuilder styling
* leve the print for detected changes
* nits
* Remove file I/O
Co-authored-by: charliermarsh
<charlie.r.marsh@gmail.com>
* style
* nits
* revert notebook changes
* Add # fmt skip when possible
* Add # fmt skip when possible
* Fix
* More ` # fmt: skip` usage
* More ` # fmt: skip` usage
* More ` # fmt: skip` usage
* NIts
* more fixes
* fix tapas
* Another way to skip
* Recommended way
* Fix two more fiels
* Remove asynch
Remove asynch
---------
Co-authored-by: charliermarsh <charlie.r.marsh@gmail.com>
* translate model.md to chinese
* apply review suggestion
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* Fix bug in handling varying encoder and decoder layers
This commit resolves an issue where the script failed to convert T5x models to PyTorch models when the number of decoder layers differed from the number of encoder layers. I've addressed this issue by passing an additional 'num_decoder_layers' parameter to the relevant function.
* Fix bug in handling varying encoder and decoder layers
* Remove the torch main_process_first context manager from TF examples
* Correctly set num_beams=1 in our examples, and add a guard in GenerationConfig.validate()
* Update src/transformers/generation/configuration_utils.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* import hf error
* nits
* fixup
* catch the error at the correct place
* style
* improve message a tiny bit
* Update src/transformers/utils/hub.py
Co-authored-by: Lucain <lucainp@gmail.com>
* add a test
---------
Co-authored-by: Lucain <lucainp@gmail.com>