1. 22 Feb, 2023 7 commits
  2. 21 Feb, 2023 8 commits
  3. 20 Feb, 2023 9 commits
    • Sylvain Gugger's avatar
      8b3db33a
    • Arthur's avatar
      Fix-rag-finetune-project-requirement (#21697) · 4194e5f4
      Arthur authored
      pin pytorch lightning requirement
      4194e5f4
    • Alara Dirik's avatar
      Add EfficientNet (#21563) · 49ab1623
      Alara Dirik authored
      * Add EfficientNet to transformers
      49ab1623
    • Younes Belkada's avatar
      [`bnb`] fix `bnb` decoders bug (#21688) · c9a06714
      Younes Belkada authored
      * fix `bnb` decoders bug
      
      * make fixup
      c9a06714
    • tanreinama's avatar
      add GPTSAN model (reopen) (#21291) · f56174ac
      tanreinama authored
      * add GPTSAN-Japanese
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN (update for review)
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * fix typo in comment text
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * fix document and comments
      
      * fix class name GPTSAN->GPTSan
      
      * fix import and test for tokenizer
      f56174ac
    • Sylvain Gugger's avatar
      Fix quality · c87bbe1f
      Sylvain Gugger authored
      c87bbe1f
    • Morgan McGuire's avatar
      Fix for non-contiguous label tensors in VisonEncoderDecoder (#21582) · 011cc17a
      Morgan McGuire authored
      * add prints
      
      * add shape
      
      * add reshape
      
      * clean up
      011cc17a
    • Andy Ehrenberg's avatar
      add flax whisper implementation (#20479) · 2840272c
      Andy Ehrenberg authored
      
      
      * add flax whisper implementation
      
      * rever change to setup
      
      * remove unused imports
      
      * revert generation changes
      
      * flax whisper docs
      
      * docs
      
      * import order
      
      * import sorting
      
      * isort
      
      * add dummy objects
      
      * doc formatting
      
      * formatting
      
      * remove trailing whitespaces
      
      * fix flax whisper docs
      
      * add generation logic to unlock flax whisper
      
      * remove scans
      
      * give credits to Flax Bart implementation
      
      * remove unused imports
      
      * add license
      
      * remove assert
      
      * more credits to Bart
      
      * fix style
      
      * formatting
      
      * support left padding
      
      * add flax whisper generation test
      
      * remove copied from comments whenever not a full copy
      
      * fix docstrings for logits processors
      
      * revert change to FlaxForceTokensLogitsProcessor
      
      * revert doc changes
      
      * improve generation docs
      
      * reorganize
      
      * formatting
      
      * cleanup docs
      
      * add tests
      
      * handle empty list case
      
      * fix forced decoder ids in flax tests
      
      * add flax whisper to inits
      
      * upate dummy objects
      
      * docs for FlaxAutoModelForSpeechSeq2Seq
      
      * fix decoder_position_ids computation in pretrained model decode/__call__ fns
      
      * add Copied from statements as necessary
      
      * compute position_ids only in __call__ and decode methods of pretrained model subclasses
      
      * improve readabilityof compute positional embeddings
      
      * check dimensionality of input_features instead of hidden_states
      
      * copied from statement for init_cache
      
      * formatting
      
      * fix copies
      
      * fix copies
      
      * pass attention mask to encoder layers
      
      * fix decoder module outputs
      
      * set dtype
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * smaller flax model for whisper test
      
      * Update src/transformers/generation/flax_utils.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/whisper/modeling_flax_whisper.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update tests/models/whisper/test_modeling_flax_whisper.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * cleanup
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/whisper/modeling_flax_whisper.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * bias cleanup
      
      * doc fix
      
      * align style for force tokens processor
      
      * readability
      
      * fix input shape in tests
      
      * revert FlaxGenerationMixin docstring
      
      * formatting
      
      * fix tests
      
      * fix imports
      
      * consistent encoder hidden states
      
      * consistent hidden states
      
      * input shapes
      
      * typo
      
      * partial class trick
      
      * partial class for input shape
      
      * base_class with correct input shape
      
      * partial base classes
      
      * match by name
      
      * set main_input_name
      
      * compare on names
      
      * formatting
      
      * remove unused import
      
      * safer position ids computation
      
      * safer position id computation
      
      * Update src/transformers/models/whisper/modeling_flax_whisper.py
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * Update src/transformers/models/whisper/modeling_flax_whisper.py
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * remove identical inherited tests
      
      * fix prompt ids in tests
      
      * use generation config
      
      * use jnp array
      
      * better var names
      
      * more explicit bias use
      
      * import transformers
      
      * formatting
      
      * test formatting
      
      * remove unused imports
      
      * remove unused imports
      
      * formatting
      
      * isort
      
      * docs
      
      * fix ln orders for encoder hidden states
      
      * whisper unique generation stuff
      
      * flake
      
      * use finfo for attention bias
      
      * docs
      
      * Update src/transformers/generation/flax_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * docs
      
      * add timestamp flax test
      
      * jit for timestamps
      
      * formatting
      
      * clean up timestamps processor
      
      * formatting
      
      * remove if_true
      
      * cleanup
      
      ---------
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      2840272c
    • AlexWertheim's avatar
      Enable PyTorch/XLA Fully Sharded Data Parallel (FSDP) (#21406) · 7735e040
      AlexWertheim authored
      
      
      * Reinserted import statement accidentally removed during rebasing.
      
      * Added auto_wrap functionality, restructured XLA FSDP logic to more closely match PyTorch FSDP logic.
      
      * Fixed flag descriptions; changed several instances of fsdp_ to xla_fsdp_; pass in auto_wrap_policy and auto_wrapper_callable directly to avoid lambda saving.
      
      * Moved XLA FSDP logic to be adjacent to Fairscale FSDP logic in trainer.
      
      * Formatted changes in accordance with HF style requirements.
      
      * Added back in warning which was accidentally removed.
      
      * - Merged XLA FSDP training arguments into `fsdp_config`
      - Added `xla` boolean flag to `fsdp_config` to specify XLA FSDP wrapping
      - Merged XLA FSDP wrapping logic into FSDP wrapping logic within trainer
        class
      
      * Cleaned up errors, moved argument to fsdp_config
      
      - Set `xla` and `xla_fsdp_grad_ckpt` flags by default in fsdp_config
      - Added missing colons following conditionals
      - Moved `fsdp_transformer_layer_cls_to_wrap` to `fsdp_config`
      - Modified `fsdp_transformer_layer_cls_to_wrap` to be list of strings,
        not just one string
      - Changed Fairscale FSDP logic to allow for set of layer classes to wrap
      - Removed unnecessary checks for `xla_fsdp`
      
      * Corrected small errors, improved layer class flag
      
      - Correctly set default values for `xla` and `xla_fsdp_grad_ckpt`
        arguments
      - Made `fsdp_transformer_layer_cls_to_wrap` a list of strings instead of
        a single string
      - Added processing to ensure that `fsdp_transformer_layer_cls_to_wrap`
        works as expected if passed as a single string
      - Updated PyTorch FSDP logic to accept a list of layers to wrap, as done
        with XLA FSDP
      - Replaced instances of `getattr()` with `.get()` for dictionary
        retrievals with default values, including when setting
        `fsdp_min_num_params`
      - Corrected `self.fsdp is not None` to `len(self.fsdp) > 0`
      - Removed extraneous `xla_fsdp` argument descriptions from outside
        `fsdp_config`
      
      * Changed xla-fsdp-settings to be dictionary
      
      - Modified xla-fsdp-settings to be entered directly as dictionary
        instead of loaded through JSON file
      - Made small style corrections
      
      * Reverted unintentional local_rank TPU check
      
      * Do not block XLA FSDP if local rank is -1
      
      * Rebased and applied automatic formatting
      
      - Rebased
      - Applied automatic formatting changes via `make style`
      
      * Applied automatic formatting with latest version of black
      
      * Replaced  expression with
      
      * Reran black examples tests src utils
      ruff examples tests src utils --fix
      make autogenerate_code
      make[1]: Entering directory '/usr/local/google/home/awertheim/HF-FSDP-PR/transformers'
      make[1]: Leaving directory '/usr/local/google/home/awertheim/HF-FSDP-PR/transformers' after additional formatting changes
      
      * Additionall automatic formatting changes
      
      * Remove unnecessary whitespace characters from src/transformers/training_args.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      ---------
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      7735e040
  4. 17 Feb, 2023 7 commits
  5. 16 Feb, 2023 9 commits
    • Steven Anton's avatar
      Adapt PerceiverIO Multimodal class to work with arbitrary modalities (#20054) · f16d29b3
      Steven Anton authored
      
      
      * * Properly register parameters in PerceiverMultimodalPreprocessor
      * Adapt PerceiverTextPreprocessor to work with PerceiverMultimodalPreprocessor
      * Change a few type hints
      
      * Fix formatting; incorrect return type
      
      * Return embeddings_wo_pos
      
      ---------
      Co-authored-by: default avatarSteven Anton <antonstv@amazon.com>
      f16d29b3
    • Arthur's avatar
      [CLAP] Add CLAP to the library (#21370) · c236a621
      Arthur authored
      
      
      * add model like clip
      
      * update
      
      * text model ok
      
      * clap text works
      
      * some refactor
      
      - `CLAPVision` to `CLAPAudio`
      - refactor kwargs of audio modules
      
      * more refactor
      
      * more refactor
      
      * more refactor
      
      * correct fusion
      
      * more refactor
      
      * new modules
      
      * add basic processor
      
      * fixup
      
      * remove whisper copioed from
      
      * audio logits match
      
      * add doc
      
      * correct filters mel and add maxlength
      
      * style
      
      * few fixes
      
      * forward passes
      
      * fixup
      
      * fixup
      
      * some clean up
      
      * remove mels form the dictionnary
      
      * pad after the repeat
      
      * update padding when dsmaller
      
      * fix padding
      
      * style
      
      * use swin patch merging
      
      * use copied from swin
      
      * processor with any tokenizer
      
      * more copied from
      
      * some clean up
      
      * more refactor
      
      * fix mel when rand_trunc
      
      * style
      
      * remove unused imports
      
      * update processing
      
      * remove image processing tests
      
      * add testing fiel
      
      * fixmodeling issues
      
      * replace with `is_longer`
      
      * clap in serialization
      
      * more refactor
      
      * `make fixup`
      
      * make fixup
      
      * fix feature extractor
      
      * update test feature extractor
      
      * `make fixup`
      
      * clean up config
      
      * more clean up
      
      * more cleanup
      
      * update tests
      
      * refactor tests and inits
      
      * removeCLAP vision config
      
      * remove CLAP from image procssing auto and dummy vision objects
      
      * update inits
      
      * style
      
      * re order classes in modeling clap
      
      * Use roberta tokenizer as the other weights are not open sourced
      
      * small cleaup
      
      * remove tokenization CLAP
      
      * processor tokenizr is roberta
      
      * update feature extraction doc
      
      * remove vclap from model zero shot
      
      * update f_min and f_max to frequency_xx
      
      * some changes
      
      - fix modeling keys
      - add `is_longer` in the forward pass
      - make fixup
      
      * make fixup
      
      * consistent behavior ebtween rand_crop and fusion
      
      * add numpy resize and bilinear and documentation
      
      * move resizing to image utils
      
      * clean feature extraction
      
      * import resize from correct file
      
      * resize in image transforms
      
      * update
      
      * style
      
      * style
      
      * nit
      
      * remove unused arguments form the feature extractor
      
      * style
      
      * few fixes + make fixup
      
      * oops
      
      * fix more tests
      
      * add zero shot audio classification pipeline
      
      * update zeroshot classification pipeline
      
      * fixup
      
      * fix copies
      
      * all CI tests pass
      
      * make fixup + fix docs
      
      * fix docs
      
      * fix docs
      
      * update tests pip;eline
      
      * update zero shot pipeline
      
      * update feature extraction clap
      
      * update tokenization auto
      
      * use nested simplify
      
      * update pipeline tests
      
      * Apply suggestions from code review
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * split in two lines
      
      * fixes
      
      * refactor
      
      * clean up
      
      * add integration tests
      
      * update config docstring
      
      * style
      
      * update processor
      
      * fix processor test
      
      * fix feat extractor tests
      
      * update docs
      
      * Apply suggestions from code review
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * fix readmes
      
      * fix tips
      
      * Update src/transformers/models/auto/configuration_auto.py
      
      * update doc and remove todo -> properly explained
      
      * fix idx and typo
      
      * typoe
      
      * cleanup config
      
      * cleanup tests, styles and doc
      
      * ignore docstyle on image transform
      
      * add conversion script
      
      * remove the `clap` indx in favor of `CLAP`
      
      * update __init
      
      * nits
      
      * Update src/transformers/pipelines/__init__.py
      
      * fix bug
      
      * clarifiy config
      
      * fix copy
      
      * fix init
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * fix model output
      
      * fix comment
      
      * make fixup
      
      * make fixup
      
      * rename to `Clap`
      
      * replace to `Clap`
      
      * replace to `Clap`
      
      * repo consistency
      
      * again repo-consistency
      
      * make fixup
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * add config
      
      * changes
      
      * update conversion
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * remove unused function
      
      * update based on code reviews
      
      * style
      
      * more comments
      
      * cleanup
      
      * clean up
      
      * style
      
      * apply suggestions
      
      * Empty commit
      
      * pipeline will be added in a different PR
      
      * update calls to audio utils functions
      
      * update pipeline init
      
      * style
      
      * style
      
      * styling again
      
      * use pad
      
      * fix repo-consistency
      
      * update utils and add doc for audio utils
      
      * clean up resize by using torch. update inits accordingly
      
      * style
      
      * CLap's  tokenizer is RobertA
      
      * add audio utils to internal toctreee
      
      * update totctree
      
      * style
      
      * update documentation and normalize naming accross audio utils and feature extraction clap
      
      * style
      
      * clean up
      
      * update doc and typos
      
      * fix doctest
      
      * update modelin code, got rid of a lot of reshaping
      
      * style on added doc audio utils
      
      * update modeling clap
      
      * style
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * docstringvariables with CLAP
      
      * rename key
      
      * update modeling CLAP
      
      * update audio utils docstring
      
      * update processing clap
      
      * fix readmes
      
      * fix toctree
      
      * udpate configuration clap
      
      * fix init
      
      * make fixup
      
      * fix
      
      * fix
      
      * update naming
      
      * update
      
      * update checkpoint path
      
      * Apply suggestions from code review
      
      * Major refactoring
      
      * Update src/transformers/models/clap/configuration_clap.py
      
      * merge
      
      ---------
      Co-authored-by: default avataryounesbelkada <younesbelkada@gmail.com>
      Co-authored-by: default avatarYounes Belkada <49240599+younesbelkada@users.noreply.github.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      c236a621
    • Sylvain Gugger's avatar
      Sort deps alphabetically · 6b0257de
      Sylvain Gugger authored
      6b0257de
    • Alissa's avatar
      Add OPT resources to the transformers documentation (#21625) · b0f0086f
      Alissa authored
      * Add resources to OPT
      
      * Add additional resources for OPT
      
      * Remove -{" "} after <PipelineTag pipeline="question-answering" />
      
      * Change bitsnbytes to bitsandbytes
      
      * Revert formatting
      
      * Revert automatic format changes
      
      * Remove - sign after <PipelineTag pipeline="question-answering" />
      b0f0086f
    • Stas Bekman's avatar
      [bloom] gradient_checkpointing fix (#21655) · 61d7fec8
      Stas Bekman authored
      Update modeling_bloom.py
      61d7fec8
    • Connor Henderson's avatar
      refactor: Make direct_transformers_import util (#21652) · 0f96c26d
      Connor Henderson authored
      * refactor: Make direct_import util
      
      * edit direct import fn
      
      * add docstring
      
      * make import function specific to transformers only
      
      * edit doc string
      0f96c26d
    • Jonatas Grosman's avatar
      [WhisperModel] fix bug in reshaping labels (#21653) · 96d4fa46
      Jonatas Grosman authored
      fix bug in reshaping labels
      96d4fa46
    • dependabot[bot]'s avatar
      Bump werkzeug from 2.0.3 to 2.2.3 in /examples/research_projects/decision_transformer (#21658) · fcfd4ec7
      dependabot[bot] authored
      Bump werkzeug in /examples/research_projects/decision_transformer
      
      Bumps [werkzeug](https://github.com/pallets/werkzeug) from 2.0.3 to 2.2.3.
      - [Release notes](https://github.com/pallets/werkzeug/releases)
      - [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
      - [Commits](https://github.com/pallets/werkzeug/compare/2.0.3...2.2.3
      
      )
      
      ---
      updated-dependencies:
      - dependency-name: werkzeug
        dependency-type: direct:production
      ...
      Signed-off-by: default avatardependabot[bot] <support@github.com>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      fcfd4ec7
    • Xiaoyang Chen's avatar
      Update document of WhisperDecoderLayer (#21621) · 212c42a1
      Xiaoyang Chen authored
      * Update document of WhisperDecoderLayer
      
      * Update modeling_mbart.py
      
      * Update doc with utils/check_copies.py --fix_and_overwrite
      
      * Update modeling_xlm_prophetnet.py
      212c42a1