1. 15 Jul, 2024 1 commit
  2. 12 Jul, 2024 1 commit
  3. 11 Jul, 2024 1 commit
    • Naman Garg's avatar
      Adding hiera (#30356) · c1e139c2
      Naman Garg authored
      
      
      * initialized Structure
      
      * Updated variable names
      
      * Added Config class, basic HF setup, convert_to_hf
      
      * Fixed Convert function, added hiera to HF files, Initilized test files
      
      * better naming for x in forward pass
      
      * Moved utils to hiera
      
      * Change hiera -> hiera_model
      
      * Fixed integration into tranformers
      
      * Fix: Convert Checkpoint
      
      * added documentation for hiera
      
      * added documentation for hiera
      
      * added Docstings to models, Transformers based changes
      
      * make style and quality
      
      * make style and quality
      
      * Integration & Block tests running
      
      * Fixed bugs
      
      * initialized Structure
      
      * Updated variable names
      
      * Added Config class, basic HF setup, convert_to_hf
      
      * Fixed Convert function, added hiera to HF files, Initilized test files
      
      * better naming for x in forward pass
      
      * Moved utils to hiera
      
      * Change hiera -> hiera_model
      
      * Fixed integration into tranformers
      
      * Fix: Convert Checkpoint
      
      * added documentation for hiera
      
      * added documentation for hiera
      
      * added Docstings to models, Transformers based changes
      
      * make style and quality
      
      * make style and quality
      
      * Integration & Block tests running
      
      * Fixed bugs
      
      * Removed tim dependency
      
      * added HieraBlock
      
      * fixed: Model name
      
      * added tests for HieraModel, HieraBlock
      
      * fixed imports
      
      * fixed quality & copies
      
      * Fixes
      
      * Update docs/source/en/model_doc/hiera.md
      
      Fix name
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update docs/source/en/model_doc/hiera.md
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update docs/source/en/model_doc/hiera.md
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update src/transformers/models/hiera/configuration_hiera.py
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update src/transformers/models/hiera/configuration_hiera.py
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update src/transformers/models/hiera/modeling_hiera.py
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update src/transformers/models/hiera/modeling_hiera.py
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Fixed formatting
      
      * Code quality & Import differences
      
      * quality and repo-consistency fix
      
      * fixed no torch error
      
      * Docstring fix
      
      * Docstring fix
      
      * doc string fix
      
      * fixed example usage
      
      * Resolved issues in modeling_hiera
      
      * Removed Hiera MAE
      
      * Added test and resolved bug
      
      * fixed doc string
      
      * First commit
      
      * Finished conversion script and model forward working
      
      * Resolved all issues
      
      * nits
      
      * Improving tests
      
      * Nits
      
      * More nits
      
      * Improving HieraForMaskedImageModeling
      
      * More improvements and nits
      
      * Fixed docstrings of outputs
      
      * More fixes
      
      * More imrpovments
      
      * Updated conversion script
      
      * Fixed docstrings
      
      * Improved tests
      
      * Fixed attentou outputs test
      
      * All tests green
      
      * Removed unnecessary file
      
      * contribution attribution
      
      * Resolved a few issues
      
      * Resolved Comments
      
      * Updated model repo id and fixed bugs
      
      * Removed loss print
      
      * Make tests green
      
      * Updated docstrings
      
      * Fix style
      
      * Fixed num_heads in config
      
      * Removed unnecessary video checkpoint related code in the conversion script
      
      * Fix style
      
      * Changed atol in conversion script
      
      * HieraConfig
      
      * Fix copies
      
      * Fixed typo
      
      * Resolved few issues
      
      * make
      
      * converted conv_nd -> nn.Module
      
      * Removed video complexities
      
      * Removed video complexities
      
      * fix style
      
      * Addressing comments
      
      * Update src/transformers/models/hiera/modeling_hiera.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/hiera/modeling_hiera.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/hiera/modeling_hiera.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Fix style
      
      * Fixed tests
      
      * Fixed typo
      
      * Fixed interpolate test
      
      * Made torch fx compatible
      
      * Made sure imageprocesor is correct
      
      * Addressed comments
      
      * Noise directly as torch
      
      * Remove unnecesary attr
      
      * Added return_dit
      
      * Update src/transformers/models/hiera/__init__.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Updated checkpoints
      
      * [run_slow] hiera
      
      * Fixed device mismatch
      
      * [run_slow] hiera
      
      * Fixed GPU tests
      
      * [run_slow] hiera
      
      ---------
      Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-29-50.us-east-2.compute.internal>
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      Co-authored-by: default avatarEduardo Pacheco <eduardo.pach@hotmail.com>
      Co-authored-by: default avatarEduardo Pacheco <69953243+EduardoPach@users.noreply.github.com>
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      c1e139c2
  4. 10 Jul, 2024 1 commit
  5. 09 Jul, 2024 1 commit
  6. 08 Jul, 2024 3 commits
    • Yih-Dar's avatar
      Avoid failure `TFBlipModelTest::test_pipeline_image_to_text` (#31827) · 4879ac2b
      Yih-Dar authored
      
      
      * fix
      
      * fix
      
      * fix
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      4879ac2b
    • Pavel Iakubovskii's avatar
      Add FA2 and `sdpa` support for SigLIP (#31499) · a177821b
      Pavel Iakubovskii authored
      * Rebase to main
      
      * Fix attention implementation autoset for tex and vision configs
      
      * Fixup
      
      * Minor fixes
      
      * Fix copies
      
      * Fix attention_mask for FA2
      
      * Add eqvivalence tests for siglip
      
      * Remove right padding test
      
      * Uncomment flaky
      
      * Fix import
      
      * Add to docs
      
      * Fix test message
      
      * Add sdpa
      
      * Add sdpa equivalence test
      
      * Add siglip sdpa to docs
      
      * Fix typing for attention output
      
      * Add sdpa tests
      
      * Fix signature of FA2
      
      * Autoset attn_implementation in config
      
      * Rename bsz -> batch_size
      
      * Move back autoset attn method
      
      * Mark as flaky
      
      * Correct attention mask padding
      
      * [run-slow] siglip
      
      * Add FA2 and sdpa docs
      
      * Style fix
      
      * Remove flaky for FA2 test
      
      * Change attention implementation set
      
      * Change attn_implementaiton propogation
      
      * Fix typos
      
      * Add modality to assert message
      
      * Add more sdpa backends in test
      
      * [run slow] siglip
      
      * Add math sdpa backend for all options
      
      * [run slow] siglip
      a177821b
    • NielsRogge's avatar
      Add ZoeDepth (#30136) · 06fd7972
      NielsRogge authored
      
      
      * First draft
      
      * Add docs
      
      * Clean up code
      
      * Convert model
      
      * Add image processor
      
      * Convert Zoe_K
      
      * More improvements
      
      * Improve variable names and docstrings
      
      * Improve variable names
      
      * Improve variable names
      
      * Replace nn.sequential
      
      * More improvements
      
      * Convert ZoeD_NK
      
      * Fix most tests
      
      * Verify pixel values
      
      * Verify pixel values
      
      * Add squeeze
      
      * Update beit to support arbitrary window sizes
      
      * Improve image processor
      
      * Improve docstring
      
      * Improve beit
      
      * Improve model outputs
      
      * Add figure
      
      * Fix beit
      
      * Update checkpoint
      
      * Fix repo id
      
      * Add _keys_to_ignore_on_load_unexpected
      
      * More improvements
      
      * Address comments
      
      * Address comments
      
      * Address comments
      
      * Address comments
      
      * Rename variable name
      
      * Add backbone_hidden_size
      
      * Vectorize
      
      * Vectorize more
      
      * Address comments
      
      * Clarify docstring
      
      * Remove backbone_hidden_size
      
      * Fix image processor
      
      * Remove print statements
      
      * Remove print statement
      
      * Add integration test
      
      * Address comments
      
      * Address comments
      
      * Address comments
      
      * Address comments
      
      * Add requires_backends
      
      * Clean up
      
      * Simplify conversion script
      
      * Simplify more
      
      * Simplify more
      
      * Simplify more
      
      * Clean up
      
      * Make sure beit is loaded correctly
      
      * Address comment
      
      * Address bin_configurations
      
      * Use bin_configurations
      
      * Convert models, add integration tests
      
      * Fix doc test
      
      * Address comments
      
      * Unify regressor classes
      
      * Clarify arguments
      
      * Improve resize_image
      
      * Add num_relative_features
      
      * Address comment
      
      * [run-slow]beit,data2vec,zoedepth
      
      * [run-slow]beit,data2vec,zoedepth
      
      * Address comments
      
      * Address comment
      
      * Address comment
      
      * Replace nn.TransformerEncoderLayer and nn.TransformerEncoder
      
      * Replace nn.MultiheadAttention
      
      * Add attributes for patch transformer to config
      
      * Add tests for ensure_multiple_of
      
      * Update organization
      
      * Add tests
      
      * [run-slow] beit data2vec
      
      * Update ruff
      
      * [run-slow] beit data2vec
      
      * Add comment
      
      * Improve docstrings, add test
      
      * Fix interpolate_pos_encoding
      
      * Fix slow tests
      
      * Add docstring
      
      * Update src/transformers/models/zoedepth/image_processing_zoedepth.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/zoedepth/image_processing_zoedepth.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Improve tests and docstrings
      
      * Use run_common_tests
      
      * Improve docstrings
      
      * Improve docstrings
      
      * Improve tests
      
      * Improve tests
      
      * Remove print statements
      
      ---------
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      06fd7972
  7. 05 Jul, 2024 2 commits
    • Billy Cao's avatar
      Add training support for SigLIP (#31495) · 1d3eaa6f
      Billy Cao authored
      * Add siglip loss function
      
      * Update docs
      
      * Enable training tests
      [experimental] enable GC training tests as it has worked for my own data
      
      * Remove test_training* overrides to enable training tests
      [run_slow] siglip
      
      * Skip training tests for Siglip text model and ImageClassificationModel
      [run_slow] siglip
      
      * Skip GC training tests for SiglipForImageClassification
      
      * Explicitly skip training tests for SiglipVisionModel
      Add skip reason for training tests for SiglipTextModel
      
      * Remove copied from to fix CI
      1d3eaa6f
    • Yih-Dar's avatar
      Fix gemma tests (#31794) · eef0507f
      Yih-Dar authored
      
      
      * skip 3 7b tests
      
      * fix
      
      * fix
      
      * fix
      
      * [run-slow] gemma
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      eef0507f
  8. 03 Jul, 2024 3 commits
  9. 02 Jul, 2024 1 commit
    • Sanchit Gandhi's avatar
      [whisper] static kv cache (#31166) · a9701953
      Sanchit Gandhi authored
      
      
      * make work with cache abstraction
      
      * correct for static cache
      
      * hacks for compile
      
      * make fast
      
      * fix
      
      * fix pos ids
      
      * generate
      
      * fix sdpa
      
      * fix sdpa cache pos
      
      * fix fa2
      
      * clean fa2
      
      * integrate cache into generate
      
      * make style
      
      * copies
      
      * more copies
      
      * update eager
      
      * update sdpa
      
      * update fa2
      
      * simplify
      
      * use cache pos
      
      * always compute cross-cache for debug
      
      * avoid recompiles
      Co-authored-by: default avatarArthur Zucker <arthur@huggingface.co>
      
      * fix fix
      
      * fix fix fix
      
      * more fix
      
      * try encoder-decoder cache (too messy)
      
      * revert encoder-decoder cache
      
      * check cross-attn cache
      
      * use enc-dec dataclass
      
      * use richer enc-dec dataclass
      
      * clean-up
      
      * revert static cache changes
      
      * small fixes
      
      * revert to cpu flag
      
      * fix copies
      
      * add static slow test
      
      * past k/v docstring
      
      * more docstrings
      
      * cache_position docstrings
      
      * add to docs
      
      * add enc-dec cache to docs
      
      * make style
      
      * fix after rebase
      
      * fix beam
      
      * style
      
      * fix generation strategies
      
      * fix most decoder-only tests
      
      * style
      
      * skip test
      
      * more clean up
      
      * small docstrings
      
      * Apply suggestions from code review
      Co-authored-by: default avatarJoao Gante <joaofranciscocardosogante@gmail.com>
      
      * add todo
      
      * only crop self-attn
      
      * check cache in mixin
      
      * style
      
      * fix re-compile after rebase
      
      * move `is_updated` logic to enc-dec wrapper
      
      * revert back
      
      * revert cache back
      
      * finalise design
      
      * fix
      
      * fix fix
      
      * style
      
      * Update src/transformers/cache_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * deprecate
      
      * updates
      
      * final updates
      
      * style
      
      * style
      
      ---------
      Co-authored-by: default avatarJoao Gante <joaofranciscocardosogante@gmail.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      a9701953
  10. 28 Jun, 2024 1 commit
  11. 27 Jun, 2024 3 commits
  12. 26 Jun, 2024 6 commits
  13. 25 Jun, 2024 3 commits
  14. 24 Jun, 2024 1 commit
  15. 21 Jun, 2024 2 commits
  16. 20 Jun, 2024 2 commits
  17. 19 Jun, 2024 3 commits
    • Joao Gante's avatar
      Mamba: add generative tests (#31478) · 83259e40
      Joao Gante authored
      83259e40
    • amyeroberts's avatar
      Use self.config_tester.run_common_tests() (#31431) · 609e6622
      amyeroberts authored
      * First testing updating config tests
      
      * Use run_common_tests
      609e6622
    • Anton Vlasjuk's avatar
      [`GPT2`] Add SDPA support (#31172) · b275a410
      Anton Vlasjuk authored
      * `gpt2` sdpa support
      
      * fix (at least) one test, style, repo consistency
      
      * fix sdpa mask in forward --> fixes generation
      
      * test
      
      * test2
      
      * test3
      
      * test4
      
      * simplify shapes for attn mask creation and small comments
      
      * hub fail test
      
      * benchmarks
      
      * flash attn 2 mask should not be inverted on enc-dec setup
      
      * fix comment
      
      * apply some suggestion from code review
      
      - only save _attn_implentation once
      - remove unnecessary comment
      
      * change elif logic
      
      * [run-slow] gpt2
      
      * modify `test_gpt2_sample_max_time` to follow previous assertion patterns
      b275a410
  18. 17 Jun, 2024 2 commits
    • Albert Villanova del Moral's avatar
      Pass datasets trust_remote_code (#31406) · a14b055b
      Albert Villanova del Moral authored
      * Pass datasets trust_remote_code
      
      * Pass trust_remote_code in more tests
      
      * Add trust_remote_dataset_code arg to some tests
      
      * Revert "Temporarily pin datasets upper version to fix CI"
      
      This reverts commit b7672826.
      
      * Pass trust_remote_code in librispeech_asr_dummy docstrings
      
      * Revert "Pin datasets<2.20.0 for examples"
      
      This reverts commit 833fc17a.
      
      * Pass trust_remote_code to all examples
      
      * Revert "Add trust_remote_dataset_code arg to some tests" to research_projects
      
      * Pass trust_remote_code to tests
      
      * Pass trust_remote_code to docstrings
      
      * Fix flax examples tests requirements
      
      * Pass trust_remote_dataset_code arg to tests
      
      * Replace trust_remote_dataset_code with trust_remote_code in one example
      
      * Fix duplicate trust_remote_code
      
      * Replace args.trust_remote_dataset_code with args.trust_remote_code
      
      * Replace trust_remote_dataset_code with trust_remote_code in parser
      
      * Replace trust_remote_dataset_code with trust_remote_code in dataclasses
      
      * Replace trust_remote_dataset_code with trust_remote_code arg
      a14b055b
    • amyeroberts's avatar
      02c525d2
  19. 14 Jun, 2024 3 commits