1. 14 Mar, 2023 2 commits
  2. 13 Mar, 2023 3 commits
    • Younes Belkada's avatar
      [`Whiper`] add `get_input_embeddings` to `WhisperForAudioClassification` (#22133) · d979cf6e
      Younes Belkada authored
      
      
      * add `get_input_embeddings` to `WhisperForAudioClassification`
      
      * add common tests
      
      * fix another common test
      
      * Update tests/models/whisper/test_modeling_whisper.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * fix style
      
      ---------
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      d979cf6e
    • Younes Belkada's avatar
      [`Blip2`] skip accelerate test (#22124) · 6652e7da
      Younes Belkada authored
      skip accelerate test
      6652e7da
    • wangpeng's avatar
      add new model of MGP-STR (#21418) · 102b5ff4
      wangpeng authored
      
      
      * add new model of MGP-STR
      
      * fix the check failings
      
      * remove torch and numpy from mgp_tokenization
      
      * remove unused import from modeling_mgp_str
      
      * add test_processing_mgp_str
      
      * rm test_processing_mgp_str.py
      
      * add test_processing_mgp_str
      
      * add test_processing_mgp_str
      
      * add test_processing_mgp_str
      
      * rm test_processing_mgp_str and add softmax outs to model
      
      * rm test_processing_mgp_str and add softmax outs to model
      
      * rewrite the code of mgp-str according to PR suggestions
      
      * rewrite the code of mgp-str according to PR suggestions
      
      * add new model of MGP-STR
      
      * fix the check failings
      
      * remove torch and numpy from mgp_tokenization
      
      * remove unused import from modeling_mgp_str
      
      * add test_processing_mgp_str
      
      * rm test_processing_mgp_str.py
      
      * add test_processing_mgp_str
      
      * add test_processing_mgp_str
      
      * add test_processing_mgp_str
      
      * rm test_processing_mgp_str and add softmax outs to model
      
      * rewrite the code of mgp-str according to PR suggestions
      
      * rewrite the code of mgp-str according to PR suggestions
      
      * remove representation_size from MGPSTRConfig
      
      * reformat configuration_mgp_str.py
      
      * format test_processor_mgp_str.py
      
      * add test for tokenizer and complete model/processer test and model file
      
      * rm Unnecessary tupple in modeling_mgp_str
      
      * reduce hidden_size/layers/label_size in test_model
      
      * add integration tests and change MGPSTR to Mgpstr
      
      * add test for logit values
      
      * reformat test model file
      
      ---------
      Co-authored-by: default avataryue kun <yuekun.wp@alibaba-inc.com>
      102b5ff4
  3. 10 Mar, 2023 2 commits
  4. 09 Mar, 2023 2 commits
  5. 08 Mar, 2023 2 commits
  6. 07 Mar, 2023 7 commits
    • Yih-Dar's avatar
      Update tiny model creation script and some others files (#22006) · b338414e
      Yih-Dar authored
      
      
      * Update 1
      
      * Update 2
      
      * Update 3
      
      * Update 4
      
      * Update 5
      
      * Update 6
      
      * Update 7
      
      * Update 8
      
      * Update 9
      
      * Update 10
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      b338414e
    • Eli Simhayev's avatar
      [Time-Series] informer model (#21099) · 8abe4930
      Eli Simhayev authored
      * added informer to gitignore
      
      * added informer to gitignore
      
      * WIP informer2020
      
      * added checking that instantiate works
      
      * added config using gluonTS by kashif
      
      * WIP config
      
      * adding informeConfig. need to remove FeatureEmbedder
      
      * done InformerConfig, but need to change the names
      
      * Done informer model init. working on enc-dec
      
      * added things to address, after reading again enc-dec in the paper
      
      * done modeling - checking initialization work
      
      * added informer to gitignore
      
      * WIP informer2020
      
      * added checking that instantiate works
      
      * added config using gluonTS by kashif
      
      * WIP config
      
      * adding informeConfig. need to remove FeatureEmbedder
      
      * done InformerConfig, but need to change the names
      
      * Done informer model init. working on enc-dec
      
      * added things to address, after reading again enc-dec in the paper
      
      * done modeling - checking initialization work
      
      * moved enc-dec init to InformerEncoder/Decoder init
      
      * added 'init_std' to config, now model init works!
      
      * WIP conversion script, and added code sources
      
      * WIP conversion script: loading original informer pth works
      
      * WIP conversion script: change defaults in the config
      
      * WIP conversion script: supporting Informer input embedding
      
      * WIP conversion script: added parameters for the informer embed
      
      * WIP conversion script: change dim_feedforward=2048
      
      * WIP conversion script: remove unused args for loading checkpoint
      
      * just cleaning up
      
      * DataEmbedding removed, after thinking with Kashif
      
      * working on forward pass
      
      * WIP forward pass: trying to establish working batch for forward pass
      
      * cleaning and finalizing
      
      * adding HF names and docs
      
      * init after cleaning works
      
      * WIP in tests
      
      * added docs for the informer specific args
      
      * fix style
      
      * undo change
      
      * cleaning informer, now need to work only enc-dec
      
      * initial enc-dec classes
      
      * added encoder and decoder
      
      * added todo
      
      * add todos for conv_layers
      
      * added decoder docs from vanilla
      
      * added encoder docs from vanilla
      
      * remove encoder decoder from the original informer
      
      * removed AttentionLayer from the original paper
      
      * removed TriangularCausalMask, same as decoder_attention_mask
      
      * initial sparse attention
      
      * use conv_layers
      
      * fixed test_config test
      
      * fix parenthesis when itearting zip(layers, conv_layers)
      
      * error found in prob attention, added sizes as comments
      
      * fix sizes
      
      * added proposal for q_reduce indexing, and remove unused
      
      * WIP ProbMask, and changed factor=2 for testing
      
      * remove unused libs for this PR for creating the env
      
      * fix checking the attn_weights.size() after bmm
      
      * Q_reduce: changed from torch.gather to simple slicing
      
      * WIP calculate final attn_output
      
      * finish adding v_aggregated, attn_output ready
      
      * changed tgt_len to u in attention_mask, need to fix the size error
      
      * comment attention_mask for encoder, and fix if cond for v_agg
      
      * added ProbMask support (wip), removed old original code
      
      * finished ProbMask 馃槂
      
      
      
      * Revert "remove unused libs for this PR for creating the env"
      
      This reverts commit 11a081e09e92771e51a5d2758d53a9afb59547f0.
      
      * fixes
      
      * make style
      
      * fix initial tests
      
      * fix more tests
      
      * dry
      
      * make style
      
      * remove unused files
      
      * style
      
      * added integration tests
      
      * fix num_static_real_features
      
      * fix header
      
      * remove unused function
      
      * fix example
      
      * fix docs
      
      * Update src/transformers/models/informer/configuration_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/informer/modeling_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/informer/configuration_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/informer/configuration_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/informer/configuration_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/informer/configuration_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * fixes for reviewer
      
      * use prediction_length from model
      
      * fix style
      
      * fixed informer.mdx
      
      * added to index
      
      * updated readme
      
      * undo
      
      * make fix-copies
      
      * typo
      
      * fix copy
      
      * added Informer to toctree
      
      * in order
      
      * fixed comments
      
      * remove unneeded new lines in docs
      
      * make static real and cat optional
      
      * fix use of distil conv layers
      
      * fixed integration test
      
      * added checkpoint for convlayer
      
      * make fix-copies
      
      * updated from time series model
      
      * make fix-copies
      
      * copy decoder
      
      * fix unit tests
      
      * updated scaling config
      
      * fix integration tests
      
      * IGNORE_NON_TESTED
      
      * IGNORE_NON_AUTO_CONFIGURED
      
      * IGNORE_NON_AUTO_CONFIGURED
      
      * updated check configs
      
      * fix formatting
      
      * undo change from time series
      
      * prediction_length should not be None
      
      * aliign with the blog: prettify ProbSparse and change attention_factor  to sampling_factor
      
      * make style
      
      * make fix-copies
      
      * niels CR: update contributed by
      
      * niels CR: update configuration_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * niels CR: update kashif -> huggingface
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * niels CR: `sampling_factor` only relevant when `attention_type`=prob
      
      * make style
      
      * fixed U_part: added multiplication by `L_Q`
      
      * fixed bug: remove `is not None` from `if config.distil`
      
      * fixed test: `decoder_seq_length` to `encoder_seq_length` in cross_attentions check
      
      * fix integration tests
      
      * updated model hub
      
      * do not shift as in training
      
      * undo
      
      * fix make-copies
      
      * make fix-copies
      
      * added `if prediction_length is None`
      
      * changed `ProbSparseAttention` to `InformerProbSparseAttention`
      
      * changed `V_sum` -> `v_mean_dim_time`
      
      * changed `ConvLayer` to `InformerConvLayer` and fixed `super()`
      
      * TimeSeriesTansformer->Informer in decoder's Copied from
      
      * more descriptive in ProbSparse
      
      * make style
      
      * fix coped from
      
      * Revert "added `if prediction_length is None`"
      
      This reverts commit b4cbddfa05e3bd739b79569cd3c3b89e316f2451.
      
      * fixed indent
      
      * use InformerSinusoidalPositionalEmbedding
      
      * make fix-style
      
      * fix from #21860
      
      * fix name
      
      * make fix-copies
      
      * use time series utils
      
      * fix dec num_heads
      
      * docstring
      
      * added time series util doc
      
      * _import_structure
      
      * formatting
      
      * changes from review
      
      * make style
      
      * fix docs
      
      * fix doc
      
      * removed NegativeLogLikelihood
      
      ---------
      Co-authored-by: default avatarKashif Rasul <kashif.rasul@gmail.com>
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      8abe4930
    • NielsRogge's avatar
      [DETR and friends] Remove is_timm_available (#21814) · dde718e7
      NielsRogge authored
      
      
      * First draft
      
      * Fix to_dict
      
      * Improve conversion script
      
      * Update config
      
      * Remove timm dependency
      
      * Fix dummies
      
      * Fix typo, add integration test
      
      * Upload 101 model as well
      
      * Remove timm dummies
      
      * Fix style
      
      ---------
      Co-authored-by: default avatarNiels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
      dde718e7
    • Sanchit Gandhi's avatar
      [Whisper] Add model for audio classification (#21754) · 7c393181
      Sanchit Gandhi authored
      * [Whisper] Add model for audio classification
      
      * make fix-copies
      
      * add to docs
      
      * add docstring
      
      * empty returns
      
      * add code example
      
      * switch to fleurs
      
      * stick everything on one line
      7c393181
    • Yih-Dar's avatar
      Skip `test_multi_gpu_data_parallel_forward` for some model tests (#21991) · 9402788b
      Yih-Dar authored
      
      
      skip test_multi_gpu_data_parallel_forward for some model tests
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      9402788b
    • NielsRogge's avatar
      [DETR, YOLOS] Fix device bug (#21974) · 95408e99
      NielsRogge authored
      * Fix integration test
      
      * Add test
      
      * Add test
      95408e99
    • Yih-Dar's avatar
      Update `Jukebox` tests (#21984) · 5b28b783
      Yih-Dar authored
      
      
      * update expected values for jukebox
      
      * update expected values for jukebox
      
      * update expected values for jukebox
      
      * update expected values for jukebox
      
      * update expected values for jukebox
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      5b28b783
  7. 06 Mar, 2023 2 commits
  8. 03 Mar, 2023 3 commits
  9. 02 Mar, 2023 7 commits
  10. 01 Mar, 2023 5 commits
  11. 28 Feb, 2023 5 commits
    • Matt's avatar
      Improve TF weight loading, especially PT crossloading (#21792) · acfb714b
      Matt authored
      * First commit for the improved PT-TF weight loading
      
      * Remove workarounds from TFEncoderDecoder tests
      
      * Allow a custom weight renaming function in from_pretrained and use that to clean up EncoderDecoder
      
      * make fixup
      
      * First attempt at visionencoderdecoder
      
      * Disable tensorfloat32 in tests to get consistent outputs
      
      * Quick fix to tf_vision_encoder_decoder tests
      
      * make fixup
      
      * Update Blenderbot tests
      
      * Remove unused arg in modeling_tf_opt
      
      * load_tf_sharded_weights had strict=True! This meant transfer learning was impossible, so I'm setting it to False.
      
      * Support prefixes when loading sharded TF checkpoints
      
      * make fixup
      
      * Add test to load sharded models with a weight prefix
      
      * Fix sharded weight loading test
      
      * Add a test for transfer from a sharded checkpoint
      
      * make fixup
      
      * Add test to check that crossloading from PT with a prefix works
      
      * Refactor from_pretrained in the encoderdecoder classes
      
      * Refactor from_pretrained in the encoderdecoder classes
      
      * missmatched -> mismatched
      
      * Explicitly check for None
      
      * No comments showing my very impressive and attractive knowledge of Py3.9+
      
      * Disable TF32 across all TF tests
      acfb714b
    • Yih-Dar's avatar
      馃敟Rework pipeline testing by removing `PipelineTestCaseMeta` 馃殌 (#21516) · 871c31a6
      Yih-Dar authored
      
      
      * Add PipelineTesterMixin
      
      * remove class PipelineTestCaseMeta
      
      * move validate_test_components
      
      * Add for ViT
      
      * Add to SPECIAL_MODULE_TO_TEST_MAP
      
      * style and quality
      
      * Add feature-extraction
      
      * update
      
      * raise instead of skip
      
      * add tiny_model_summary.json
      
      * more explicit
      
      * skip tasks not in mapping
      
      * add availability check
      
      * Add Copyright
      
      * A way to diable irrelevant tests
      
      * update with main
      
      * remove disable_irrelevant_tests
      
      * skip tests
      
      * better skip message
      
      * better skip message
      
      * Add all pipeline task tests
      
      * revert
      
      * Import PipelineTesterMixin
      
      * subclass test classes with PipelineTesterMixin
      
      * Add pipieline_model_mapping
      
      * Fix import after adding pipieline_model_mapping
      
      * Fix style and quality after adding pipieline_model_mapping
      
      * Fix one more import after adding pipieline_model_mapping
      
      * Fix style and quality after adding pipieline_model_mapping
      
      * Fix test issues
      
      * Fix import requirements
      
      * Fix mapping for MobileViTModelTest
      
      * Update
      
      * Better skip message
      
      * pipieline_model_mapping could not be None
      
      * Remove some PipelineTesterMixin
      
      * Fix typo
      
      * revert tests_fetcher.py
      
      * update
      
      * rename
      
      * revert
      
      * Remove PipelineTestCaseMeta from ZeroShotAudioClassificationPipelineTests
      
      * style and quality
      
      * test fetcher for all pipeline/model tests
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      871c31a6
    • Anahita Bhiwandiwalla's avatar
      Add loss for BridgeTowerForMaskedLM and BridgeTowerForImageAndTextRetrieval (#21684) · 4cb5ffa9
      Anahita Bhiwandiwalla authored
      
      
      * Add loss for BridgeTowerForMaskedLM and BridgeTowerForImageAndTextRetrieval
      
      * minor fix return_dict
      
      * implement test for loss computation
      
      ---------
      Co-authored-by: default avatarTiep Le <97980157+tileintel@users.noreply.github.com>
      Co-authored-by: default avatarTiep Le <tiep.le@intel.com>
      4cb5ffa9
    • Younes Belkada's avatar
      [`Blip2`] Fix Blip-2 multi gpu (#21707) · 7f4f8b97
      Younes Belkada authored
      
      
      * fix blip multi gpu
      
      * fix
      
      * final changes
      
      * adapt suggestions
      
      * fix failing slow test
      
      * forward contrib credits from testing and suggestions
      
      * reformat
      
      ---------
      Co-authored-by: default avatarakkikiki <akkikiki@users.noreply.github.com>
      7f4f8b97
    • raghavanone's avatar
      Fix the issue of blip model returning loss even when the label is not provided. (#21811) · eec76042
      raghavanone authored
      * Fix the issue of blip model returning loss even when the label is not provoided
      
      * Fix ruff failure
      
      * Incorporate PR feedbacks
      
      * Incorporate PR feedbacks
      
      * Incorporate PR feedbacks
      
      * Incorporate PR feedbacks
      eec76042