1. 06 Jul, 2023 1 commit
  2. 05 Jul, 2023 3 commits
  3. 04 Jul, 2023 1 commit
  4. 03 Jul, 2023 1 commit
    • Arthur's avatar
      [`Umt5`] Add google's umt5 to `transformers` (#24477) · 799df10a
      Arthur authored
      
      
      * add tokenization template
      
      * update conversion script
      
      * update modeling code
      
      * update
      
      * update convert checkpoint
      
      * update modeling
      
      * revert changes on convert script
      
      * new conversion script for new format
      
      * correct position bias
      
      * cleaning a bit
      
      * Credit co authors
      Co-authored-by: default avataragemagician <ahmed.elnaggar@tum.de>
      
      Co-authored-by: stefan-it
      <>
      
      * styling
      
      * Add docq
      
      * fix copies
      
      * add co author
      
      * Other Author
      
      * Merge branch 'main' of https://github.com/huggingface/transformers
      
       into add-umt5
      
      * add testing
      
      * nit
      
      * Update docs/source/en/model_doc/umt5.mdx
      Co-authored-by: default avatarStefan Schweter <stefan@schweter.it>
      
      * fix t5
      
      * actual fix?
      
      * revert wrong changes
      
      * remove
      
      * update test
      
      * more fixes
      
      * revert some changes
      
      * add SPIECE_UNDERLINE
      
      * add a commone xample
      
      * upfate
      
      * fix copies
      
      * revert changes on t5 conversion script
      
      * revert bytefallback changes since there was no addition yet
      
      * fixup
      
      * fixup
      
      * ingore umt5 cutom testing folder
      
      * fix readmes
      
      * revertT5 changes
      
      * same outputs
      
      * fixup
      
      * update example
      
      * Apply suggestions from code review
      
      * style
      
      * draft addition of all new files
      
      * current update
      
      * fix attention and stuff
      
      * finish refactoring
      
      * auto config
      
      * fixup
      
      * more nits
      
      * add umt5 to init
      
      * use md format
      
      * Update README.md
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * revert changes on mt5
      
      * revert mt4 changes
      
      * update test
      
      * more fixes
      
      * add to mapping
      
      * fix-copies
      
      * fix copies
      
      * foix retain grad
      
      * fix some tests
      
      * nits
      
      * done
      
      * Update src/transformers/models/umt5/modeling_umt5.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update docs/source/en/model_doc/umt5.md
      
      * Update src/transformers/models/umt5/__init__.py
      
      * Update docs/source/en/model_doc/umt5.md
      Co-authored-by: default avatarStefan Schweter <stefan@schweter.it>
      
      * Update src/transformers/models/umt5/modeling_umt5.py
      
      * update conversion script + use google checkpoints
      
      * nits
      
      * update test and modelling
      
      * stash slow convert
      
      * update fixupd
      
      * don't change slow
      
      ---------
      
      Co-authored-by: stefan-it <>
      Co-authored-by: default avatarStefan Schweter <stefan@schweter.it>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      799df10a
  5. 30 Jun, 2023 3 commits
    • Matt's avatar
      Speed up TF tests by reducing hidden layer counts (#24595) · 134caef3
      Matt authored
      * hidden layers, huh, what are they good for (absolutely nothing)
      
      * Some tests break with 1 hidden layer, use 2
      
      * Use 1 hidden layer in a few slow models
      
      * Use num_hidden_layers=2 everywhere
      
      * Slightly higher tol for groupvit
      
      * Slightly higher tol for groupvit
      134caef3
    • JB (Don)'s avatar
      Show a warning for missing attention masks when pad_token_id is not None (#24510) · 78a2b19f
      JB (Don) authored
      
      
      * Adding warning messages to BERT for missing attention masks
      
      These warning messages when there are pad tokens within the input ids and
      no attention masks are given. The warning message should only show up once.
      
      * Adding warning messages to BERT for missing attention masks
      
      These warning messages are shown when the pad_token_id is not None
      and no attention masks are given. The warning message should only
      show up once.
      
      * Ran fix copies to copy over the changes to some of the other models
      
      * Add logger.warning_once.cache_clear() to the test
      
      * Shows warning when there are no attention masks and input_ids start/end with pad tokens
      
      * Using warning_once() instead and fix indexing in input_ids check
      
      ---------
      Co-authored-by: default avatarJB Lau <hckyn@voyager2.local>
      78a2b19f
    • Arthur's avatar
      ️[`T5Tokenize`] Fix T5 family tokenizers️ (#24565) · b52a03cd
      Arthur authored
      
      
      * don't add space before single letter chars that don't have a merge
      
      * fix the fix
      
      * fixup
      
      * add a test
      
      * more testing
      
      * fixup
      
      * hack to make sure fast is also fixed
      
      * update switch transformers test
      
      * revert convert slow
      
      * Update src/transformers/models/t5/tokenization_t5.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * add typechecking
      
      * quality
      
      ---------
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      b52a03cd
  6. 29 Jun, 2023 4 commits
    • amyeroberts's avatar
      Removal of deprecated vision methods and specify deprecation versions (#24570) · b324557a
      amyeroberts authored
      * Removal of deprecated methods and specify versions
      
      * Fix tests
      b324557a
    • Yih-Dar's avatar
      Update some torchscript tests after #24505 (#24566) · 77db28dc
      Yih-Dar authored
      
      
      * fix
      
      * fix
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      77db28dc
    • Sanchit Gandhi's avatar
      Add Musicgen (#24109) · 1c1c9075
      Sanchit Gandhi authored
      
      
      * Add Audiocraft
      
      * add cross attention
      
      * style
      
      * add for lm
      
      * convert and verify
      
      * introduce t5
      
      * split configs
      
      * load t5 + lm
      
      * clean conversion
      
      * copy from t5
      
      * style
      
      * start pattern provider
      
      * make generation work
      
      * style
      
      * fix pos embs
      
      * propagate shape changes
      
      * propagate shape changes
      
      * style
      
      * delay pattern: pad tokens at end
      
      * audiocraft -> musicgen
      
      * fix inits
      
      * add mdx
      
      * style
      
      * fix pad token in processor
      
      * override generate and add todos
      
      * add init to test
      
      * undo pattern delay mask after gen
      
      * remove cfg logits processor
      
      * remove cfg logits processor
      
      * remove logits processor in favour of mask
      
      * clean pos embs
      
      * make fix copies
      
      * update readmes
      
      * clean pos emb
      
      * refactor encoder/decoder
      
      * make fix copies
      
      * update conversion
      
      * fix config imports
      
      * update config docs
      
      * make style
      
      * send pattern mask to device
      
      * pattern mask with delay
      
      * recover prompted audio tokens
      
      * fix docstrings
      
      * laydown test file
      
      * pattern edge case
      
      * remove t5 ref
      
      * add processing class
      
      * config refactor
      
      * better pattern comment
      
      * check if mask is not present
      
      * check if mask is not present
      
      * refactor to auto class
      
      * remove encoder configs
      
      * fix processor
      
      * processor import
      
      * start updating conversion
      
      * start updating tests
      
      * make style
      
      * convert t5, encodec, lm
      
      * convert as composite
      
      * also convert processor
      
      * run generate
      
      * classifier free gen
      
      * comments and clean up
      
      * make style
      
      * docs for logit proc
      
      * docstring for uncond gen
      
      * start lm tests
      
      * work tests
      
      * let the lm generate
      
      * refactor: reshape inside forward
      
      * undo greedy loop changes
      
      * from_enc_dec -> from_sub_model
      
      * fix input id shapes in docstrings
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * undo generate changes
      
      * from sub model config
      
      * Update src/transformers/models/musicgen/modeling_musicgen.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * make generate work again
      
      * generate uncond -> get uncond inputs
      
      * remove prefix allowed tokens fn
      
      * better error message
      
      * logit proc checks
      
      * Apply suggestions from code review
      Co-authored-by: default avatarJoao Gante <joaofranciscocardosogante@gmail.com>
      
      * make decoder only tests work
      
      * composite fast tests
      
      * make style
      
      * uncond generation
      
      * feat extr padding
      
      * make audio prompt work
      
      * fix inputs docstrings
      
      * unconditional inputs: dict -> model output
      
      * clean up tests
      
      * more clean up tests
      
      * make style
      
      * t5 encoder -> auto text encoder
      
      * remove comments
      
      * deal with frames
      
      * fix auto text
      
      * slow tests
      
      * nice mdx
      
      * remove can generate
      
      * todo - hub id
      
      * convert m/l
      
      * make fix copies
      
      * only import generation with torch
      
      * ignore decoder from tests
      
      * don't wrap uncond inputs
      
      * make style
      
      * cleaner uncond inputs
      
      * add example to musicgen forward
      
      * fix docs
      
      * ignore MusicGen Model/ForConditionalGeneration in auto mapping
      
      * add doc section to toctree
      
      * add to doc tests
      
      * add processor tests
      
      * fix push to hub in conversion
      
      * tips for decoder only loading
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * fix conversion for s / m / l checkpoints
      
      * import stopping criteria from module
      
      * remove from pipeline tests
      
      * fix uncond docstring
      
      * decode audio method
      
      * fix docs
      
      * org: sanchit-gandhi -> facebook
      
      * fix max pos embeddings
      
      * remove auto doc (not compatible with shapes)
      
      * bump max pos emb
      
      * make style
      
      * fix doc
      
      * fix config doc
      
      * fix config doc
      
      * ignore musicgen config from docstring
      
      * make style
      
      * fix config
      
      * fix config for doctest
      
      * consistent from_sub_models
      
      * don't automap decoder
      
      * fix mdx save audio file
      
      * fix mdx save audio file
      
      * processor batch decode for audio
      
      * remove keys to ignore
      
      * update doc md
      
      * update generation config
      
      * allow changes for default generation config
      
      * update tests
      
      * make style
      
      * fix docstring for uncond
      
      * fix processor test
      
      * fix processor test
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarJoao Gante <joaofranciscocardosogante@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      1c1c9075
    • amyeroberts's avatar
      Update old existing feature extractor references (#24552) · ae454f41
      amyeroberts authored
      * Update old existing feature extractor references
      
      * Typo
      
      * Apply suggestions from code review
      
      * Apply suggestions from code review
      
      * Apply suggestions from code review
      
      * Address comments from review - update 'feature extractor'
      Co-authored by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
      ae454f41
  7. 28 Jun, 2023 4 commits
  8. 27 Jun, 2023 3 commits
  9. 26 Jun, 2023 4 commits
  10. 23 Jun, 2023 1 commit
  11. 22 Jun, 2023 1 commit
  12. 21 Jun, 2023 2 commits
    • Matthijs Hollemans's avatar
      add word-level timestamps to Whisper (#23205) · cd927a47
      Matthijs Hollemans authored
      * let's go!
      
      * initial implementation of token-level timestamps
      
      * only return a single timestamp per token
      
      * remove token probabilities
      
      * fix return type
      
      * fix doc comment
      
      * strip special tokens
      
      * rename
      
      * revert to not stripping special tokens
      
      * only support models that have alignment_heads
      
      * add integration test
      
      * consistently name it token-level timestamps
      
      * small DTW tweak
      
      * initial support for ASR pipeline
      
      * fix pipeline doc comments
      
      * resolve token timestamps in pipeline with chunking
      
      * change warning when no final timestamp is found
      
      * return word-level timestamps
      
      * fixup
      
      * fix bug that skipped final word in each chunk
      
      * fix failing unit tests
      
      * merge punctuations into the words
      
      * also return word tokens
      
      * also return token indices
      
      * add (failing) unit test for combine_tokens_into_words
      
      * make combine_tokens_into_words private
      
      * restore OpenAI's punctuation rules
      
      * add pipeline tests
      
      * make requested changes
      
      * PR review changes
      
      * fix failing pipeline test
      
      * small stuff from PR
      
      * only return words and their timestamps, not segments
      
      * move alignment_heads into generation config
      
      * forgot to set alignment_heads in pipeline tests
      
      * tiny comment fix
      
      * grr
      cd927a47
    • Younes Belkada's avatar
      Fix gradient checkpointing + fp16 autocast for most models (#24247) · 285a4801
      Younes Belkada authored
      
      
      * fix gc bug
      
      * continue PoC on OPT
      
      * fixes
      
      * :exploding_head:
      
      * fix tests
      
      * remove pytest.mark
      
      * fixup
      
      * forward contrib credits from discussions
      
      * forward contrib credits from discussions
      
      * reverting changes on untouched files.
      
      ---------
      Co-authored-by: default avatarzhaoqf123 <zhaoqf123@users.noreply.github.com>
      Co-authored-by: default avatar7eu7d7 <7eu7d7@users.noreply.github.com>
      285a4801
  13. 20 Jun, 2023 9 commits
  14. 16 Jun, 2023 3 commits
    • Matt's avatar
      Big TF test cleanup (#24282) · 34037129
      Matt authored
      * Fix one BLIP arg not being optional, remove misspelled arg
      
      * Remove the lxmert test overrides and just use the base test_saved_model_creation
      
      * saved_model_creation fixes and re-enabling tests across the board
      
      * Remove unnecessary skip
      
      * Stop caching sinusoidal embeddings in speech_to_text
      
      * Fix transfo_xl compilation
      
      * Fix transfo_xl compilation
      
      * Fix the conditionals in xglm
      
      * Set the save spec only when building
      
      * Clarify comment
      
      * Move comment correctly
      
      * Correct embeddings generation for speech2text
      
      * Mark RAG generation tests as @slow
      
      * Remove redundant else:
      
      * Add comment to clarify the save_spec line in build()
      
      * Fix size tests for XGLM at last!
      
      * make fixup
      
      * Remove one band_part operation
      
      * Mark test_keras_fit as @slow
      34037129
    • Yih-Dar's avatar
      Byebye pytorch 1.9 (#24080) · 896a58de
      Yih-Dar authored
      
      
      byebye
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      896a58de
    • Matt's avatar
      Fix functional TF Whisper and modernize tests (#24301) · 62d71f40
      Matt authored
      * Revert whisper change and modify the test_compile_tf_model test
      
      * make fixup
      
      * Tweak test slightly
      
      * Add functional model saving to test
      
      * Ensure TF can infer shapes for data2vec
      
      * Add override for efficientformer
      
      * Mark test as slow
      62d71f40