1. 12 Sep, 2022 2 commits
  2. 10 Sep, 2022 1 commit
  3. 09 Sep, 2022 2 commits
    • Matt's avatar
      Fix train_step, test_step and tests for CLIP (#18684) · 660e0b97
      Matt authored
      
      
      * Fix train_step and test_step, correctly enable CLIP fit test
      
      * Stop using get_args on older Python versions
      
      * Don't use get_origin either
      
      * UnionType is actually even newer, don't use that either
      
      * Apply the same fix to test_loss_computation
      
      * Just realized I was accidentally skipping a bunch of tests!
      
      * Fix test_loss_computation for models without separable labels
      
      * Fix scalar losses in test_step and train_step
      
      * Stop committing your breakpoints
      
      * Fix Swin loss shape
      
      * Fix Tapas loss shape
      
      * Shape fixes for TAPAS, DeIT, HuBERT and ViTMAE
      
      * Add loss computation to TFMobileBertForPreTraining
      
      * make fixup and move copied from statement
      
      * make fixup and move copied from statement
      
      * Correct copied from
      
      * Add labels and next_sentence_label inputs to TFMobileBERT
      
      * Make sure total_loss is always defined
      
      * Update tests/test_modeling_tf_common.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Fix copied from
      
      * Ensure CTC models get labels in tests
      
      * Ensure CTC models get labels in tests
      
      * Fix tests for vit_mae
      
      * Fix tests for vit_mae
      
      * Fix tests for vit_mae
      
      * Reduce batch size for wav2vec2 testing because it was causing OOM
      
      * Skip some TAPAS tests that are failing
      
      * Skip a failing HuBERT test
      
      * make style
      
      * Fix mobilebertforpretraining test
      
      * Skip Wav2Vec2 tests that use huge amounts of mem
      
      * Skip keras_fit for Wav2Vec2 as well
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      660e0b97
    • HuYong's avatar
      add task_type_id to BERT to support ERNIE-2.0 and ERNIE-3.0 models (#18686) · 22f72185
      HuYong authored
      
      
      * add_ernie
      
      * remove Tokenizer in ernie
      
      * polish code
      
      * format code style
      
      * polish code
      
      * fix style
      
      * update doc
      
      * make fix-copies
      
      * change model name
      
      * change model name
      
      * fix dependency
      
      * add more copied from
      
      * rename ErnieLMHeadModel to ErnieForCausalLM
      do not expose ErnieLayer
      update doc
      
      * fix
      
      * make style
      
      * polish code
      
      * polish code
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * final fix
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      22f72185
  4. 08 Sep, 2022 1 commit
    • NielsRogge's avatar
      Add X-CLIP (#18852) · bb6f6d53
      NielsRogge authored
      * First draft
      
      * Improve conversion script
      
      * Make vision encoder work
      
      * More improvements
      
      * Improve conversion script
      
      * Fix quality
      
      * Add MultiframeIntegrationTransformer
      
      * More improvements
      
      * Make MiT output work
      
      * Fix quality
      
      * Add prompts generator
      
      * Add tests
      
      * Fix some tests
      
      * Fix some more tests
      
      * Fix more tests
      
      * Improve conversion script
      
      * Fix model outputs
      
      * Fix more tests
      
      * Add XClipProcessor
      
      * Use processor in conversion script
      
      * Fix integration test
      
      * Update README, fix docs
      
      * Fix all tests
      
      * Add MIT output to XClipOutput
      
      * Create better variable names
      
      * Rename XClip to XCLIP
      
      * Extend conversion script
      
      * Add support for large models
      
      * Add support for 16 frame models
      
      * Add another model'
      
      * Fix module issue
      
      * Apply suggestions from code review
      
      * Add figure to docs
      
      * Fix CLIPProcessor issue
      
      * Apply suggestions from code review
      
      * Delete file
      
      * Convert more checkpoints
      
      * Convert last checkpoint
      
      * Update nielsr to microsoft
      bb6f6d53
  5. 07 Sep, 2022 2 commits
    • Ankur Goyal's avatar
      Add DocumentQuestionAnswering pipeline (#18414) · 2ef77421
      Ankur Goyal authored
      
      
      * [WIP] Skeleton of VisualQuestionAnweringPipeline extended to support LayoutLM-like models
      
      * Fixup
      
      * Use the full encoding
      
      * Basic refactoring to DocumentQuestionAnsweringPipeline
      
      * Cleanup
      
      * Improve args, docs, and implement preprocessing
      
      * Integrate OCR
      
      * Refactor question_answering pipeline
      
      * Use refactored QA code in the document qa pipeline
      
      * Fix tests
      
      * Some small cleanups
      
      * Use a string type annotation for Image.Image
      
      * Update encoding with image features
      
      * Wire through the basic docs
      
      * Handle invalid response
      
      * Handle empty word_boxes properly
      
      * Docstring fix
      
      * Integrate Donut model
      
      * Fixup
      
      * Incorporate comments
      
      * Address comments
      
      * Initial incorporation of tests
      
      * Address Comments
      
      * Change assert to ValueError
      
      * Comments
      
      * Wrap `score` in float to make it JSON serializable
      
      * Incorporate AutoModeLForDocumentQuestionAnswering changes
      
      * Fixup
      
      * Rename postprocess function
      
      * Fix auto import
      
      * Applying comments
      
      * Improve docs
      
      * Remove extra assets and add copyright
      
      * Address comments
      Co-authored-by: default avatarAnkur Goyal <ankur@impira.com>
      2ef77421
    • Yih-Dar's avatar
      remvoe `_create_and_check_torch_fx_tracing` in specific test files (#18667) · 10c774cf
      Yih-Dar authored
      
      
      * remvoe _create_and_check_torch_fx_tracing defined in specific model test files
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      10c774cf
  6. 06 Sep, 2022 2 commits
  7. 05 Sep, 2022 1 commit
  8. 02 Sep, 2022 1 commit
    • Jason Phang's avatar
      PEGASUS-X (#18551) · 53e33e6f
      Jason Phang authored
      * PegasusX Initial commit
      
      * rename
      
      * pegasus X implementation
      
      * pegx update
      
      * pegx fix
      
      * pegasus-x fixes
      
      * pegx updates
      
      * cleanup
      
      * cleanup
      
      * cleanup
      
      * tests
      
      * stylefixes
      
      * Documentation update
      
      * Model hub fix
      
      * cleanup
      
      * update
      
      * update
      
      * testfix
      
      * Check fix
      
      * tweaks for merging
      
      * style
      
      * style
      
      * updates for pr
      
      * style
      
      * change pegasus-x repo
      53e33e6f
  9. 01 Sep, 2022 1 commit
  10. 31 Aug, 2022 2 commits
  11. 30 Aug, 2022 3 commits
  12. 29 Aug, 2022 1 commit
  13. 26 Aug, 2022 2 commits
  14. 24 Aug, 2022 2 commits
  15. 22 Aug, 2022 1 commit
  16. 12 Aug, 2022 2 commits
    • Niklas Muennighoff's avatar
      Update BLOOM parameter counts (#18531) · 56ef0ba4
      Niklas Muennighoff authored
      * Update BLOOM parameter counts
      
      * Update BLOOM parameter counts
      56ef0ba4
    • NielsRogge's avatar
      Add Donut (#18488) · 2ab790e8
      NielsRogge authored
      
      
      * First draft
      
      * Improve script
      
      * Update script
      
      * Make conversion work
      
      * Add final_layer_norm attribute to Swin's config
      
      * Add DonutProcessor
      
      * Convert more models
      
      * Improve feature extractor and convert base models
      
      * Fix bug
      
      * Improve integration tests
      
      * Improve integration tests and add model to README
      
      * Add doc test
      
      * Add feature extractor to docs
      
      * Fix integration tests
      
      * Remove register_buffer
      
      * Fix toctree and add missing attribute
      
      * Add DonutSwin
      
      * Make conversion script work
      
      * Improve conversion script
      
      * Address comment
      
      * Fix bug
      
      * Fix another bug
      
      * Remove deprecated method from docs
      
      * Make Swin and Swinv2 untouched
      
      * Fix code examples
      
      * Fix processor
      
      * Update model_type to donut-swin
      
      * Add feature extractor tests, add token2json method, improve feature extractor
      
      * Fix failing tests, remove integration test
      
      * Add do_thumbnail for consistency
      
      * Improve code examples
      
      * Add code example for document parsing
      
      * Add DonutSwin to MODEL_NAMES_MAPPING
      
      * Add model to appropriate place in toctree
      
      * Update namespace to appropriate organization
      Co-authored-by: default avatarNiels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
      2ab790e8
  17. 11 Aug, 2022 2 commits
  18. 10 Aug, 2022 1 commit
  19. 05 Aug, 2022 1 commit
  20. 04 Aug, 2022 2 commits
    • Yih-Dar's avatar
    • NielsRogge's avatar
      Add VideoMAE (#17821) · f9a0008d
      NielsRogge authored
      
      
      * First draft
      
      * Add VideoMAEForVideoClassification
      
      * Improve conversion script
      
      * Add VideoMAEForPreTraining
      
      * Add VideoMAEFeatureExtractor
      
      * Improve VideoMAEFeatureExtractor
      
      * Improve docs
      
      * Add first draft of model tests
      
      * Improve VideoMAEForPreTraining
      
      * Fix base_model_prefix
      
      * Make model take pixel_values of shape (B, T, C, H, W)
      
      * Add loss computation of VideoMAEForPreTraining
      
      * Improve tests
      
      * Improve model tests茅
      
      * Make all tests pass
      
      * Add VideoMAE to main README
      
      * Add tests for VideoMAEFeatureExtractor
      
      * Add integration test
      
      * Improve conversion script
      
      * Rename patch embedding class
      
      * Remove VideoMAELayer from init
      
      * Update design of patch embeddings
      
      * Improve comments
      
      * Improve conversion script
      
      * Improve conversion script
      
      * Add conversion of pretrained model
      
      * Add loss verification of pretrained model
      
      * Add loss verification of unnormalized targets
      
      * Add integration test for pretraining model
      
      * Apply suggestions from code review
      
      * Fix bug to make feature extractor resize only shorter edge
      
      * Address more comments
      
      * Improve normalization of videos
      
      * Add doc examples
      
      * Move constants to dedicated script
      
      * Remove scripts
      
      * Transfer checkpoints, fix docs
      
      * Update script
      
      * Update image mean and std
      
      * Fix doc tests
      
      * Set return_tensors to NumPy by default
      
      * Revert the previous change
      Co-authored-by: default avatarNiels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
      f9a0008d
  21. 03 Aug, 2022 1 commit
  22. 01 Aug, 2022 1 commit
  23. 29 Jul, 2022 2 commits
  24. 27 Jul, 2022 3 commits
    • Ritik Nandwal's avatar
      Add swin transformer v2 (#17469) · e87ac9d1
      Ritik Nandwal authored
      
      
      * Add files generated using transformer-cli add-new-model-like command
      
      * Add changes for swinv2 attention and forward method
      
      * Add fixes
      
      * Add modifications for weight conversion and remaining args in swin model
      
      * Add changes for patchmerging
      
      * Add changes for SwinV2selfattention
      
      * Update conversion script
      
      * Add final fixes for the swin_v2 model
      
      * Add changes for conversion script for pretrained window size case
      
      * Add pretrained window size value from config in SwinV2Encoder class
      
      * Make fixup
      
      * Add swinv2 to models_not_in_readme to utils/check_copies.py
      
      * Modify Swinv2v2 to Swin Transformer V2
      
      * Remove copied from, to run make fixup command
      
      * Add updates to swinv2tf from main branch
      
      * Add pretrained_window_size to config, to make tests pass
      
      * Add modified weights from nandwalritik profile for swinv2
      
      * Update model weights from swinv2 from nandwalritik profile
      
      * Add fix for build_pr_documentation CI fix
      
      * Add fixes for weight conversion
      
      * Add change to make input with padding work
      
      * Add fixes for test cases
      
      * Add few changes from swin to swinv2 to pass test cases
      
      * Remove tests for tensorflow as swinv2 for TF is not added yet
      
      * Overide test_pt_tf_model_equivalence function as TF implementation for swinv2 is not added yet
      
      * Add modeling_tf_swinv2 to _ignore_modules as test file is removed for this one right now.
      
      * Update docs url for swinv2 in README.md
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Undo changes for check_repo
      
      * Update url in readme.md
      
      * Remove overrided function to test pt_tf_model_equivalence
      
      * Remove TF model imports for Swinv2 as its not implemented in this PR
      
      * Add changes for index.mdx
      
      * Add swinv2 papers link,abstract and contributors details
      
      * Rename cpb_mlp to continous_position_bias_mlp
      
      * Add tips for swinv2 model
      
      * Update src/transformers/models/swinv2/configuration_swinv2.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/swinv2/configuration_swinv2.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Fix indentation for docstring example in src/transformers/models/swinv2/configuration_swinv2.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update import order in src/transformers/models/swinv2/configuration_swinv2.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Add copyright statements in weights conversion script.
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Remove Swinv2 from models_not_in_readme
      
      * Reformat code
      
      * Remove TF implementation file for swinv2
      
      * Update start docstring.
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Add changes for docstring
      
      * Update orgname for weights to microsoft
      
      * Remove to_2tuple function
      
      * Add copied from statements wherever applicable
      
      * Add copied from to Swinv2ForMaskedImageModelling class
      
      * Reformat code.
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Add unittest.skip(with reason.) for test_inputs_embeds test case.
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Add updates for test_modeling_swinv2.py
      
      * Add @unittest.skip() annotation for clarity to create_and_test_config_common_properties function
      
      * Add continuous_position_bias_mlp parameter to conversion script
      
      * Add test for testing masked_image_modelling for swinv2
      
      * Update Swinv2 to Swin Transformer v2 in docs/source/en/model_doc/swinv2.mdx
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update Swinv2 to Swin Transformer v2 in docs/source/en/model_doc/swinv2.mdx
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update docs/source/en/model_doc/swinv2.mdx
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update docs/source/en/model_doc/swinv2.mdx
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Add suggested changes
      
      * Add copied from to forward methods of Swinv2Stage and Swinv2Encoder
      
      * Add push_to_hub flag to weight conversion script
      
      * Change order or Swinv2DropPath class
      
      * Add id2label mapping for imagenet 21k
      
      * Add updated url for SwinV2 functions and classes used in implementation
      
      * Update input_feature dimensions format, mentioned in comments.
      Co-authored-by: default avatarAlara Dirik <8944735+alaradirik@users.noreply.github.com>
      
      * Add suggested changes for modeling_swin2.py
      
      * Update docs
      
      * Remove create_and_test_config_common_properties function, as test_model_common_attributes is sufficient.
      
      * Fix indentation.
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Add changes for making Nit objects in code style
      
      * Add suggested changes
      
      * Add suggested changes for test_modelling_swinv2
      
      * make fix-copies
      
      * Update docs/source/en/model_doc/swinv2.mdx
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      Co-authored-by: default avatarAlara Dirik <8944735+alaradirik@users.noreply.github.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      e87ac9d1
    • Alara Dirik's avatar
      Owlvit test fixes (#18303) · 9caf68a6
      Alara Dirik authored
      * fix owlvit test assertion errors
      
      * fix gpu test error
      
      * remove redundant lines
      
      * fix styling
      9caf68a6
    • Mikkel Denker's avatar
      Fixes torch jit tracing for LayoutLMv2 model (re-open) (#18313) · 70e7d1d6
      Mikkel Denker authored
      * Fixes torch jit tracing for LayoutLMv2 model.
      Pytorch seems to reuse memory for input_shape which caused a mismatch in shapes later in the forward pass.
      
      * Fixed code quality
      
      * avoid unneeded allocation of vector for shape
      70e7d1d6
  25. 26 Jul, 2022 1 commit