* Initial attempt
* Updates: PR suggestions
* Interpolate the relative position bias when interpolate_pos_encoding is True
* Add slow tag for the added tests
* Add in DATA2VEC_VISION_INPUTS_DOCSTRING
* Fix contrastive_search for new cache structure, and improve performance by removing inneficient torch.stack(torch.split(x, top_k, dim=0))
* Fix _contrastive_search for non-standard cache using ellipsis slicing
* Fix all outputs.logits memory leaks for all decoding strategies!
* Fix small error in _contrastive_search()
* Make all necessary change and revert for the new class
* Apply coding style
* Remove pipes in type hints for compatibility
* correct type hint
* apply style
* Use DynamicCache by default and solve conflicts
* Fix rebase issues
* Add `_supports_dynamic_cache_class` in models for models that support DynamicCache but not other caches to make DynamicCache the default for more models
* Create generation config to return legacy format by default, or to choose not to
* style
* Fix case when use_cache is False
* Remove default DynamicCache in assiste_decoding if assistant_model does not support it + fix _seen_tokens when cropping cache
* Update prepare_inputs_for_generation() for case with empty DynamicCache
* Correct return of args in _assisted_decoding
* Remove EfficientDynamicCache as it is no longer needed
* Correct mistake in generation config
* Move cache logic of assisted decoding to AssistedCandidateGenerator.__init__
* change DynamicCache function names from "split" to "batch_split" for readability + apply coding style
* Remove `_supports_dynamic_cache_class` attribute after rebase
* Correct missing line lost in conflict resolution during rebasing
* Add special case for Jamba
* Fix jamba test
* Coding style
* coding style
* Correct missing import in rebasing
* Simplify _validate_model_kwargs based on removal of _supports_dynamic_cache attribute
* Simplify code paths in _contrastive_search
* coding style
* Update docstrings of cache methods
* Update prepare_inputs_for_generation() -> past_key_values are always Cache objects
The StoppingCriteriaList allocates is_done without specifying dtype=torch.bool. On XLA this allocates a float tensor and causes a failure on the following line:
is_done = is_done | criteria(input_ids, scores, **kwargs)
by attempting to OR float with bool.
* Added interpolate pos encoding feature and test to deit
* Added interpolate pos encoding feature and test for deit TF model
* readded accidentally delted test for multi_gpu
* storing only patch_size instead of entire config and removed commented code
* Update modeling_tf_deit.py to remove extra line
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* add tokenizer_summary to es/_toctree.yml
* add tokenizer_summary to es/
* fix link to Transformes XL in en/
* translate until Subword tokenization section
* fix GPT link in en/
* fix other GPT link in en/
* fix typo in en/
* translate the doc
* run make fixup
* Remove .md in Transformer XL link
* fix some link issues in es/
* fix typo
* fix the get_size_with_aspect_ratio in max_size situation
* make fix-up
* add more general solution
* consider when max_size is not defined
* fix typo
* fix typo
* simple fix
* fix error
* fix if else error
* fix error of size overwrite
* fix yolos image processing
* fix detr image processing
* make
* add longest related test script
* Update src/transformers/models/yolos/image_processing_yolos.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* add more test
* add test script about longest size
* remove deprecated
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>