1. 11 Jan, 2024 3 commits
    • liangxuZhang's avatar
      Fix load balancing loss func for mixtral (#28256) · e768616a
      liangxuZhang authored
      
      
      * Correct the implementation of auxiliary loss of mixtrtal
      
      * correct the implementation of auxiliary loss of mixtrtal
      
      * Implement a simpler calculation method
      
      ---------
      Co-authored-by: default avatarzhangliangxu3 <zhangliangxu3@jd.com>
      e768616a
    • Gustavo de Rosa's avatar
      [Phi] Extend implementation to use GQA/MQA. (#28163) · 55090585
      Gustavo de Rosa authored
      * chore(phi): Updates configuration_phi with missing keys.
      
      * chore(phi): Adds first draft of combined modeling_phi.
      
      * fix(phi): Fixes according to latest review.
      
      * fix(phi): Removes pad_vocab_size_multiple to prevent inconsistencies.
      
      * fix(phi): Fixes unit and integration tests.
      
      * fix(phi): Ensures that everything works with microsoft/phi-1 for first integration.
      
      * fix(phi): Fixes output of docstring generation.
      
      * fix(phi): Fixes according to latest review.
      
      * fix(phi): Fixes according to latest review.
      
      * fix(tests): Re-enables Phi-1.5 test.
      
      * fix(phi): Fixes attention overflow on PhiAttention (for Phi-2).
      
      * fix(phi): Improves how queries and keys are upcast.
      
      * fix(phi): Small updates on latest changes.
      55090585
    • Harisankar Babu's avatar
      Optionally preprocess segmentation maps for MobileViT (#28420) · d5606378
      Harisankar Babu authored
      * optionally preprocess segmentation maps for mobilevit
      
      * changed pretrained model name to that of segmentation model
      
      * removed voc-deeplabv3 from model archive list
      
      * added preprocess_image and preprocess_mask methods for processing images and segmentation masks respectively
      
      * added tests for segmentation masks based on segformer feature extractor
      
      * use crop_size instead of size
      
      * reverting to initial model
      d5606378
  2. 10 Jan, 2024 2 commits
  3. 09 Jan, 2024 1 commit
  4. 08 Jan, 2024 3 commits
    • NielsRogge's avatar
      Add SigLIP (#26522) · 3b742ea8
      NielsRogge authored
      
      
      * Add first draft
      
      * Use appropriate gelu function
      
      * More improvements
      
      * More improvements
      
      * More improvements
      
      * Convert checkpoint
      
      * More improvements
      
      * Improve docs, remove print statements
      
      * More improvements
      
      * Add link
      
      * remove unused masking function
      
      * begin tokenizer
      
      * do_lower_case
      
      * debug
      
      * set split_special_tokens=True
      
      * Remove script
      
      * Fix style
      
      * Fix rebase
      
      * Use same design as CLIP
      
      * Add fast tokenizer
      
      * Add SiglipTokenizer to init, remove extra_ids
      
      * Improve conversion script
      
      * Use smaller inputs in conversion script
      
      * Update conversion script
      
      * More improvements
      
      * Add processor to conversion script
      
      * Add tests
      
      * Remove print statements
      
      * Add tokenizer tests
      
      * Fix more tests
      
      * More improvements related to weight initialization
      
      * More improvements
      
      * Make more tests pass
      
      * More improvements
      
      * More improvements
      
      * Add copied from
      
      * Add canonicalize_text
      
      * Enable fast tokenizer tests
      
      * More improvements
      
      * Fix most slow tokenizer tests
      
      * Address comments
      
      * Fix style
      
      * Remove script
      
      * Address some comments
      
      * Add copied from to tests
      
      * Add more copied from
      
      * Add more copied from
      
      * Add more copied from
      
      * Remove is_flax_available
      
      * More updates
      
      * Address comment
      
      * Remove SiglipTokenizerFast for now
      
      * Add caching
      
      * Remove umt5 test
      
      * Add canonicalize_text inside _tokenize, thanks Arthur
      
      * Fix image processor tests
      
      * Skip tests which are not applicable
      
      * Skip test_initialization
      
      * More improvements
      
      * Compare pixel values
      
      * Fix doc tests, add integration test
      
      * Add do_normalize
      
      * Remove causal mask and leverage ignore copy
      
      * Fix attention_mask
      
      * Fix remaining tests
      
      * Fix dummies
      
      * Rename temperature and bias
      
      * Address comments
      
      * Add copied from to tokenizer tests
      
      * Add SiglipVisionModel to auto mapping
      
      * Add copied from to image processor tests
      
      * Improve doc
      
      * Remove SiglipVisionModel from index
      
      * Address comments
      
      * Improve docs
      
      * Simplify config
      
      * Add first draft
      
      * Make it like mistral
      
      * More improvements
      
      * Fix attention_mask
      
      * Fix output_attentions
      
      * Add note in docs
      
      * Convert multilingual model
      
      * Convert large checkpoint
      
      * Convert more checkpoints
      
      * Add pipeline support, correct image_mean and image_std
      
      * Use padding=max_length by default
      
      * Make processor like llava
      
      * Add code snippet
      
      * Convert more checkpoints
      
      * Set keep_punctuation_string=None as in OpenCLIP
      
      * Set normalized=False for special tokens
      
      * Fix doc test
      
      * Update integration test
      
      * Add figure
      
      * Update organization
      
      * Happy new year
      
      * Use AutoModel everywhere
      
      ---------
      Co-authored-by: default avatarpatil-suraj <surajp815@gmail.com>
      3b742ea8
    • Rosie Wood's avatar
      Add segmentation map processing to SAM Image Processor (#27463) · 73c88012
      Rosie Wood authored
      
      
      * add segmentation map processing to sam image processor
      
      * fixup
      
      * add tests
      
      * reshaped_input_size is shape before padding
      
      * update tests for size/shape outputs
      
      * fixup
      
      * add code snippet to docs
      
      * Update docs/source/en/model_doc/sam.md
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Add missing backticks
      
      * add `segmentation_maps` as arg for SamProcessor.__call__()
      
      ---------
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      73c88012
    • Mohamed Abu El-Nasr's avatar
      Fix building alibi tensor when num_heads is not a power of 2 (#28380) · 0c2121f9
      Mohamed Abu El-Nasr authored
      * Fix building alibi tensor when num_heads is not a power of 2
      
      * Remove print function
      0c2121f9
  5. 07 Jan, 2024 1 commit
  6. 05 Jan, 2024 2 commits
  7. 04 Jan, 2024 2 commits
  8. 03 Jan, 2024 2 commits
    • Apsod's avatar
      Remove token_type_ids from model_input_names (like #24788) (#28325) · 45b1dfa3
      Apsod authored
      * remove token_type_ids from model_input_names (like #24788)
      
      * removed test that assumed token_type_ids should be present and updated a model reference so that it points to an available model)
      45b1dfa3
    • Connor Henderson's avatar
      Add FastSpeech2Conformer (#23439) · d83ff5ee
      Connor Henderson authored
      * start - docs, SpeechT5 copy and rename
      
      * add relevant code from FastSpeech2 draft, have tests pass
      
      * make it an actual conformer, demo ex.
      
      * matching inference with original repo, includes debug code
      
      * refactor nn.Sequentials, start more desc. var names
      
      * more renaming
      
      * more renaming
      
      * vocoder scratchwork
      
      * matching vocoder outputs
      
      * hifigan vocoder conversion script
      
      * convert model script, rename some config vars
      
      * replace postnet with speecht5's implementation
      
      * passing common tests, file cleanup
      
      * expand testing, add output hidden states and attention
      
      * tokenizer + passing tokenizer tests
      
      * variety of updates and tests
      
      * g2p_en pckg setup
      
      * import structure edits
      
      * docstrings and cleanup
      
      * repo consistency
      
      * deps
      
      * small cleanup
      
      * forward signature param order
      
      * address comments except for masks and labels
      
      * address comments on attention_mask and labels
      
      * address second round of comments
      
      * remove old unneeded line
      
      * address comments part 1
      
      * address comments pt 2
      
      * rename auto mapping
      
      * fixes for failing tests
      
      * address comments part 3 (bart-like, train loss)
      
      * make style
      
      * pass config where possible
      
      * add forward method + tests to WithHifiGan model
      
      * make style
      
      * address arg passing and generate_speech comments
      
      * address Arthur comments
      
      * address Arthur comments pt2
      
      * lint  changes
      
      * Sanchit comment
      
      * add g2p-en to doctest deps
      
      * move up self.encoder
      
      * onnx compatible tensor method
      
      * fix is symbolic
      
      * fix paper url
      
      * move models to espnet org
      
      * make style
      
      * make fix-copies
      
      * update docstring
      
      * Arthur comments
      
      * update docstring w/ new updates
      
      * add model architecture images
      
      * header size
      
      * md wording update
      
      * make style
      d83ff5ee
  9. 22 Dec, 2023 4 commits
  10. 21 Dec, 2023 6 commits
  11. 20 Dec, 2023 2 commits
  12. 19 Dec, 2023 1 commit
  13. 18 Dec, 2023 1 commit
    • Matt's avatar
      More TF fixes (#28081) · 71d47f0a
      Matt authored
      * More build_in_name_scope()
      
      * Make sure we set the save spec now we don't do it with dummies anymore
      
      * make fixup
      71d47f0a
  14. 15 Dec, 2023 2 commits
  15. 14 Dec, 2023 4 commits
    • Matt's avatar
      Replace build() with build_in_name_scope() for some TF tests (#28046) · 3060899b
      Matt authored
      Replace build() with build_in_name_scope() for some tests
      3060899b
    • Matt's avatar
      Proper build() methods for TF (#27794) · 050e0b44
      Matt authored
      * Add a convenience method for building in your own name scope
      
      * Second attempt at auto layer building
      
      * Revert "Second attempt at auto layer building"
      
      This reverts commit e03a3aaecf9ec41a805582b83cbdfe3290a631be.
      
      * Attempt #3
      
      * Revert "Attempt #3"
      
      This reverts commit b9df7a0857560d29b5abbed6127d9e9eca77cf47.
      
      * Add missing attributes that we're going to need later
      
      * Add some attributes we're going to need later
      
      * A fourth attempt! Feel the power flow through you!
      
      * Revert "A fourth attempt! Feel the power flow through you!"
      
      This reverts commit 6bf4aaf3875d6f28485f50187617a4c616c8aff7.
      
      * Add more values we'll need later
      
      * TF refactor that we'll need later
      
      * Revert "TF refactor that we'll need later"
      
      This reverts commit ca07202fb5b7b7436b893baa8d688b4f348ea7b9.
      
      * Revert "Revert "TF refactor that we'll need later""
      
      This reverts commit 1beb0f39f293ed9c27594575e1c849aadeb15c13.
      
      * make fixup
      
      * Attempt five!
      
      * Revert "Attempt five!"
      
      This reverts commit 3302207958dfd0374b0447a51c06eea51a506044.
      
      * Attempt six - this time don't add empty methods
      
      * Revert "Attempt six - this time don't add empty methods"
      
      This reverts commit 67d60129be75416b6beb8f47c7d38d77b18d79bb.
      
      * Attempt seven - better base model class detection!
      
      * Revert "Attempt seven - better base model class detection!"
      
      This reverts commit 5f14845e92ea0e87c598da933bfbfee10f553bc9.
      
      * Another attribute we'll need later
      
      * Try again with the missing attribute!
      
      * Revert "Try again with the missing attribute!"
      
      This reverts commit 760c6f30c5dffb3e04b0e73c34a77d1882a0fef7.
      
      * This is the attempt that will pierce the heavens!
      
      * Revert "This is the attempt that will pierce the heavens!"
      
      This reverts commit c868bb657de057aca7a5260350a3f831fc4dfee6.
      
      * Attempt seven - snag list is steadily decreasing
      
      * Revert "Attempt seven - snag list is steadily decreasing"
      
      This reverts commit 46fbd975deda64429bfb3e5fac4fc0370c00d316.
      
      * Attempt eight - will an empty snag list do it?
      
      * Revert "Attempt eight - will an empty snag list do it?"
      
      This reverts commit 7c8a3c2b083253649569e9877e02054ae5cec67b.
      
      * Fixes to Hubert issues that cause problems later
      
      * Trying again with Conv1D/SeparableConv fixes
      
      * Revert "Trying again with Conv1D/SeparableConv fixes"
      
      This reverts commit 55092bca952bc0f750aa1ffe246a640bf1e2036e.
      
      * Apply the build shape fixes to Wav2Vec2 as well
      
      * One more attempt!
      
      * Revert "One more attempt!"
      
      This reverts commit 5ac3e4cb01b9458cc93312873725f9444ae7261c.
      
      * Another attempt!
      
      * Revert "Another attempt!"
      
      This reverts commit ea16d890e019d7de8792a3b8e72f3b1c02adae50.
      
      * Let's see how many failures we get without the internal build method
      
      * Fix OpenAI
      
      * Fix MobileBERT
      
      * (Mostly) fix GroupVIT
      
      * Fix BLIP
      
      * One more BLIP fix
      
      * One more BLIP fix!
      
      * Fix Regnet
      
      * Finally fully fix GroupViT
      
      * Fix Data2Vec and add the new AdaptivePool
      
      * Fix Segformer
      
      * Fix Albert
      
      * Fix Deberta/DebertaV2
      
      * Fix XLM
      
      * Actually fix XLM
      
      * Fix Flaubert
      
      * Fix lxmert
      
      * Fix Resnet
      
      * Fix ConvBERT
      
      * Fix ESM
      
      * Fix Convnext / ConvnextV2
      
      * Fix SAM
      
      * Fix Efficientformer
      
      * Fix LayoutLMv3
      
      * Fix speech_to_text
      
      * Fix mpnet and mobilevit
      
      * Fix Swin
      
      * Fix CTRL
      
      * Fix CVT
      
      * Fix DPR
      
      * Fix Wav2Vec2
      
      * Fix T5
      
      * Fix Hubert
      
      * Fix GPT2
      
      * Fix Whisper
      
      * Fix DeiT
      
      * Fix the encoder-decoder / dual-encoder classes
      
      * make fix-copies
      
      * build in name scope
      
      * Fix summarization test
      
      * Fix tied weight names for BART + Blenderbot
      
      * Fix tied weight name building
      
      * Fix to TFESM weight building
      
      * Update TF SAM
      
      * Expand all the shapes out into Big Boy Shapes
      050e0b44
    • Yoach Lacombe's avatar
      Fix languages covered by M4Tv2 (#28019) · bb1d0d0d
      Yoach Lacombe authored
      
      
      * correct language assessment  + add tests
      
      * Update src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * make style + simplify and enrich test
      
      ---------
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      bb1d0d0d
    • Joao Gante's avatar
  16. 13 Dec, 2023 3 commits
  17. 11 Dec, 2023 1 commit
    • rjenc29's avatar
      Fix a couple of typos and add an illustrative test (#26941) · 7e35f370
      rjenc29 authored
      * fix a typo and add an illustrative test
      
      * appease black
      
      * reduce code duplication and add Annotion type back with a pending deprecation warning
      
      * remove unused code
      
      * change warning type
      
      * black formatting fix
      
      * change enum deprecation approach to support 3.8 and earlier
      
      * add stacklevel
      
      * fix black issue
      
      * fix ruff issues
      
      * fix ruff issues
      
      * move tests to own mixin
      
      * include yolos
      
      * fix black formatting issue
      
      * fix black formatting issue
      
      * use logger instead of warnings and include target version for deprecation
      7e35f370