1. 22 Mar, 2022 1 commit
    • NielsRogge's avatar
      Add GLPN (#16199) · 0c55d47c
      NielsRogge authored
      
      
      * First draft
      
      * Fix logits calculation
      
      * Improve tests
      
      * Add copied from statements
      
      * Fix base_model_prefix
      
      * Improve implementation, upload new models
      
      * Update design
      
      * Fix integration test
      
      * Add model to README and toctree
      
      * Add document image
      
      * Apply suggestions from code review
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Add decoder_hidden_size attribute
      
      * Update design of decoder
      
      * Add DepthEstimatorOutput class
      
      * Rename in_index to head_in_index and add feature extractor tests
      
      * Apply suggestions from code review
      
      * Apply suggestions from code review
      
      * Update pretrained model name and add to doc tests
      
      * Remove test.py script
      
      * Update copied from statements and clean up
      Co-authored-by: default avatarNiels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      0c55d47c
  2. 09 Mar, 2022 1 commit
    • Sanchit Gandhi's avatar
      Add FlaxBartForCausalLM (#15995) · b256f351
      Sanchit Gandhi authored
      * add causal lm
      
      * add CausalLM tests
      
      * Add FlaxBartForCausalLM
      
      * Add EncoderDecoder model tests
      
      * change docstring
      
      * make repo-consistency
      
      * suggested changes
      
      * remove jax ops
      
      * correction
      
      * rename pre-trained decoder model
      b256f351
  3. 04 Mar, 2022 1 commit
  4. 02 Mar, 2022 1 commit
    • Francesco Saverio Zuppichini's avatar
      Maskformer (#15682) · d83d22f5
      Francesco Saverio Zuppichini authored
      
      
      * maskformer
      
      * conflicts
      
      * conflicts
      
      * minor fixes
      
      * feature extractor test fix
      
      refactor MaskFormerLoss following conversation
      
      MaskFormer related types should not trigger a module time import error
      
      missed one
      
      removed all the types that are not used
      
      update config mapping
      
      minor updates in the doc
      
      resolved conversation that doesn't need a discussion
      
      minor changes
      
      resolved conversations
      
      fixed DetrDecoder
      
      * minor changes
      
      minor changes
      
      fixed mdx file
      
      test feature_extractor return types
      
      functional losses -> classes
      
      removed the return type test for the feature extractor
      
      minor changes + style + quality
      
      * conflicts?
      
      * rebase master
      
      * readme
      
      * added missing files
      
      * deleded poolformers test that where in the wrong palce
      
      * CI
      
      * minor changes
      
      * Apply suggestions from code review
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * resolved conversations
      
      * minor changes
      
      * conversations
      
      [Unispeech] Fix slow tests (#15818)
      
      * remove soundfile old way of loading audio
      
      * Adapt slow test
      
      [Barthez Tokenizer] Fix saving (#15815)
      
      [TFXLNet] Correct tf xlnet generate (#15822)
      
      * [TFXLNet] Correct tf xlnet
      
      * adapt test comment
      
      Fix the push run (#15807)
      
      Fix semantic segmentation pipeline test (#15826)
      
      Fix dummy_inputs() to dummy_inputs in symbolic_trace doc (#15776)
      
      Add model specific output classes to PoolFormer model docs (#15746)
      
      * Added model specific output classes to poolformer docs
      
      * Fixed Segformer typo in Poolformer docs
      
      Adding the option to return_timestamps on pure CTC ASR models. (#15792)
      
      * Adding the option to return_timestamps on pure CTC ASR models.
      
      * Remove `math.prod` which was introduced in Python 3.8
      
      * int are not floats.
      
      * Reworking the PR to support "char" vs "word" output.
      
      * Fixup!
      
      * Update src/transformers/pipelines/automatic_speech_recognition.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/transformers/pipelines/automatic_speech_recognition.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/transformers/pipelines/automatic_speech_recognition.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/transformers/pipelines/automatic_speech_recognition.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/transformers/pipelines/automatic_speech_recognition.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/transformers/pipelines/automatic_speech_recognition.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/transformers/pipelines/automatic_speech_recognition.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/transformers/pipelines/automatic_speech_recognition.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/transformers/pipelines/automatic_speech_recognition.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Quality.
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      HFTracer.trace should use/return self.graph to be compatible with torch.fx.Tracer (#15824)
      
      Fix tf.concatenate + test past_key_values for TF models (#15774)
      
      * fix wrong method name tf.concatenate
      
      * add tests related to causal LM / decoder
      
      * make style and quality
      
      * clean-up
      
      * Fix TFBertModel's extended_attention_mask when past_key_values is provided
      
      * Fix tests
      
      * fix copies
      
      * More tf.int8 -> tf.int32 in TF test template
      
      * clean-up
      
      * Update TF test template
      
      * revert the previous commit + update the TF test template
      
      * Fix TF template extended_attention_mask when past_key_values is provided
      
      * Fix some styles manually
      
      * clean-up
      
      * Fix ValueError: too many values to unpack in the test
      
      * Fix more: too many values to unpack in the test
      
      * Add a comment for extended_attention_mask when there is past_key_values
      
      * Fix TFElectra extended_attention_mask when past_key_values is provided
      
      * Add tests to other TF models
      
      * Fix for TF Electra test: add prepare_config_and_inputs_for_decoder
      
      * Fix not passing training arg to lm_head in TFRobertaForCausalLM
      
      * Fix tests (with past) for TF Roberta
      
      * add testing for pask_key_values for TFElectra model
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      
      [examples/summarization and translation] fix readme (#15833)
      
      Add ONNX Runtime quantization for text classification notebook (#15817)
      
      Re-enable doctests for the quicktour (#15828)
      
      * Re-enable doctests for the quicktour
      
      * Re-enable doctests for task_summary (#15830)
      
      * Remove &
      
      Framework split model report (#15825)
      
      Add TFConvNextModel (#15750)
      
      * feat: initial implementation of convnext in tensorflow.
      
      * fix: sample code for the classification model.
      
      * chore: added checked for  from the classification model.
      
      * chore: set bias initializer in the classification head.
      
      * chore: updated license terms.
      
      * chore: removed ununsed imports
      
      * feat: enabled  argument during using drop_path.
      
      * chore: replaced tf.identity with layers.Activation(linear).
      
      * chore: edited default checkpoint.
      
      * fix: minor bugs in the initializations.
      
      * partial-fix: tf model errors for loading pretrained pt weights.
      
      * partial-fix: call method updated
      
      * partial-fix: cross loading of weights (4x3 variables to be matched)
      
      * chore: removed unneeded comment.
      
      * removed playground.py
      
      * rebasing
      
      * rebasing and removing playground.py.
      
      * fix: renaming TFConvNextStage conv and layer norm layers
      
      * chore: added initializers and other minor additions.
      
      * chore: added initializers and other minor additions.
      
      * add: tests for convnext.
      
      * fix: integration tester class.
      
      * fix: issues mentioned in pr feedback (round 1).
      
      * fix: how output_hidden_states arg is propoagated inside the network.
      
      * feat: handling of  arg for pure cnn models.
      
      * chore: added a note on equal contribution in model docs.
      
      * rebasing
      
      * rebasing and removing playground.py.
      
      * feat: encapsulation for the convnext trunk.
      
      * Fix variable naming; Test-related corrections; Run make fixup
      
      * chore: added Joao as a contributor to convnext.
      
      * rebasing
      
      * rebasing and removing playground.py.
      
      * rebasing
      
      * rebasing and removing playground.py.
      
      * chore: corrected copyright year and added comment on NHWC.
      
      * chore: fixed the black version and ran formatting.
      
      * chore: ran make style.
      
      * chore: removed from_pt argument from test, ran make style.
      
      * rebasing
      
      * rebasing and removing playground.py.
      
      * rebasing
      
      * rebasing and removing playground.py.
      
      * fix: tests in the convnext subclass, ran make style.
      
      * rebasing
      
      * rebasing and removing playground.py.
      
      * rebasing
      
      * rebasing and removing playground.py.
      
      * chore: moved convnext test to the correct location
      
      * fix: locations for the test file of convnext.
      
      * fix: convnext tests.
      
      * chore: applied  sgugger's suggestion for dealing w/ output_attentions.
      
      * chore: added comments.
      
      * chore: applied updated quality enviornment style.
      
      * chore: applied formatting with quality enviornment.
      
      * chore: revert to the previous tests/test_modeling_common.py.
      
      * chore: revert to the original test_modeling_common.py
      
      * chore: revert to previous states for test_modeling_tf_common.py and modeling_tf_utils.py
      
      * fix: tests for convnext.
      
      * chore: removed output_attentions argument from convnext config.
      
      * chore: revert to the earlier tf utils.
      
      * fix: output shapes of the hidden states
      
      * chore: removed unnecessary comment
      
      * chore: reverting to the right test_modeling_tf_common.py.
      
      * Styling nits
      Co-authored-by: default avatarariG23498 <aritra.born2fly@gmail.com>
      Co-authored-by: default avatarJoao Gante <joao@huggingface.co>
      Co-authored-by: default avatarSylvain Gugger <Sylvain.gugger@gmail.com>
      
      * minor changes
      
      * doc fix in feature extractor
      
      * doc
      
      * typose
      
      * removed detr logic from config
      
      * removed detr logic from config
      
      * removed num_labels
      
      * small fix in the config
      
      * auxilary -> auxiliary
      
      * make style
      
      * some test is failing
      
      * fix a weird char in config prevending doc-builder
      
      * retry to fix the doc-builder issue
      
      * make style
      
      * new try to fix the doc builder
      
      * CI
      
      * change weights to facebook
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      Co-authored-by: default avatarariG23498 <aritra.born2fly@gmail.com>
      Co-authored-by: default avatarJoao Gante <joao@huggingface.co>
      Co-authored-by: default avatarSylvain Gugger <Sylvain.gugger@gmail.com>
      d83d22f5
  5. 01 Mar, 2022 1 commit
  6. 28 Feb, 2022 1 commit
  7. 23 Feb, 2022 1 commit
  8. 18 Feb, 2022 1 commit
    • Gunjan Chhablani's avatar
      Add PLBart (#13269) · ae1f8350
      Gunjan Chhablani authored
      * Init PLBART
      
      * Add missing configuration file
      
      * Add conversion script and configurationf ile
      
      * Fix style
      
      * Update modeling and conversion scripts
      
      * Fix scale embedding in config
      
      * Add comment
      
      * Fix conversion script
      
      * Add classification option to conversion script
      
      * Fix vocab size in config doc
      
      * Add tokenizer files from MBart50
      
      * Allow no lang code in regular tokenizer
      
      * Add PLBart Tokenizer Converters
      
      * Remove mask from multi tokenizer
      
      * Remove mask from multi tokenizer
      
      * Change from MBart-50 to MBart tokenizer
      
      * Fix names and modify src/tgt behavior
      
      * Fix imports for tokenizer
      
      * Remove <mask> from multi tokenizer
      
      * Fix style
      
      * Change tokenizer_class to processor_class
      
      * Add attribute map to config class
      
      * Update modeling file to modified MBart code
      
      * Update configuration file to MBart style configuration
      
      * Fix tokenizer
      
      * Separate tokenizers
      
      * Fix error in tokenization auto
      
      * Copy MBart tests
      
      * Replace with MBart tokenization tests
      
      * Fix style
      
      * Fix language code in multi tokenizer
      
      * Fix configuration docs
      
      * Add entry for plbart_multi in transformers init
      
      * Add dummy objects and fix imports
      
      * Fix modeling tests
      
      * Add TODO in config
      
      * Fix copyright year
      
      * Fix modeling docs and test
      
      * Fix some tokenization tests and style
      
      * Add changes from review
      
      * Fix copies
      
      * Fix docs
      
      * Fix docs
      
      * Fix style
      
      * Fix year
      
      * Add changes from review
      
      * Remove extra changes
      
      * Fix base tokenizer and doc
      
      * Fix style
      
      * Fix modeling and slow tokenizer tests
      
      * Remove Multi-tokenizer Converter and Tests
      
      * Delete QA model and Multi Tokenizer dummy objects
      
      * Fix repo consistency and code quality issues
      
      * Fix example documentation
      
      * Fix style
      
      * Remove PLBartTokenizer from type checking in init
      
      * Fix consistency issue
      
      * Add changes from review
      
      * Fix style
      
      * Remove PLBartTokenizerFast
      
      * Remove FastTokenizer converter
      
      * Fix AutoTokenzier mapping
      
      * Add plbart to toctree and fix consistency issues
      
      * Add language codes tokenizer test
      
      * Fix styling and doc issues
      
      * Add fixes for failing tests
      
      * Fix copies
      
      * Fix failing modeling test
      
      * Change assert to assertTrue in modeling tests
      ae1f8350
  9. 04 Feb, 2022 1 commit
  10. 28 Jan, 2022 1 commit
    • Suraj Patil's avatar
      Add XGLM models (#14876) · d25e25ee
      Suraj Patil authored
      
      
      * add xglm
      
      * update vocab size
      
      * fix model name
      
      * style and tokenizer
      
      * typo
      
      * no mask token
      
      * fix pos embed compute
      
      * fix args
      
      * fix tokenizer
      
      * fix positions
      
      * fix tokenization
      
      * style and dic fixes
      
      * fix imports
      
      * add fast tokenizer
      
      * update names
      
      * add pt tests
      
      * fix tokenizer
      
      * fix typo
      
      * fix tokenizer import
      
      * fix fast tokenizer
      
      * fix tokenizer
      
      * fix converter
      
      * add tokenizer test
      
      * update checkpoint names
      
      * fix tokenizer tests
      
      * fix slow tests
      
      * add copied from comments
      
      * rst -> mdx
      
      * flax model
      
      * update flax tests
      
      * quality
      
      * style
      
      * doc
      
      * update index and readme
      
      * fix copies
      
      * fix doc
      
      * update toctrr
      
      * fix indent
      
      * minor fixes
      
      * fix config doc
      
      * don't save embed_pos weights
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * address Sylvains commnets, few doc fixes
      
      * fix check_repo
      
      * align order of arguments
      
      * fix copies
      
      * fix labels
      
      * remove unnecessary mapping
      
      * fix saving tokenizer
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      d25e25ee
  11. 19 Jan, 2022 1 commit
    • NielsRogge's avatar
      Add ViLT (#14895) · ac227093
      NielsRogge authored
      
      
      * First commit
      
      * Add conversion script
      
      * Make conversion script work for base model
      
      * More improvements
      
      * Update conversion script, works for vqa
      
      * Add indexing argument to meshgrid
      
      * Make conversion script work for ViltForPreTraining
      
      * Add ViltForPreTraining to docs
      
      * Fix device issue
      
      * Add processor
      
      * Add MinMaxResize to feature extractor
      
      * Implement call method of ViltProcessor
      
      * Fix tests
      
      * Add integration test
      
      * Add loss calculation for VQA
      
      * Improve tests
      
      * Improve some more tests
      
      * Debug tests
      
      * Small improvements
      
      * Add support for attention_mask
      
      * Remove mask_it
      
      * Add pixel_mask
      
      * Add tests for ViltFeatureExtractor
      
      * Improve tests
      
      * Add ViltForNaturalLanguageVisualReasoning
      
      * Add ViltForNaturalLanguageVisualReasoning to conversion script
      
      * Minor fixes
      
      * Add support for image_embeds, update docstrings to markdown
      
      * Update docs to markdown
      
      * Improve conversion script
      
      * Rename ViltForPreTraining to ViltForMaskedLM
      
      * Improve conversion script
      
      * Convert docstrings to markdown
      
      * Fix code example of retrieval model
      
      * Properly convert masked language model
      
      * Add integration test for nlvr
      
      * Fix code quality
      
      * Apply suggestions from code review
      
      * Add copied from statements
      
      * Fix pretrained_config_archive_map
      
      * Fix docs
      
      * Add model to README
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Apply more suggestions from code review
      
      * Make code more readable
      
      * Add ViltForNaturalLanguageVisualReasoning to the tests
      
      * Rename ViltForVisualQuestionAnswering to ViltForQuestionAnswering
      
      * Replace pixel_values_2 by single tensor
      
      * Add hidden_states and attentions
      
      * Fix one more test
      
      * Fix all tests
      
      * Update year
      
      * Fix rebase issues
      
      * Fix another rebase issue
      
      * Remove ViltForPreTraining from auto mapping
      
      * Rename ViltForImageRetrievalTextRetrieval to ViltForImageAndTextRetrieval
      
      * Make it possible to use BertTokenizerFast in the processor
      
      * Use BertTokenizerFast by default
      
      * Rename ViltForNaturalLanguageVisualReasoning, define custom model output
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      ac227093
  12. 18 Jan, 2022 1 commit
    • Li-Huai (Allan) Lin's avatar
      Add REALM (#13292) · 22454ae4
      Li-Huai (Allan) Lin authored
      
      
      * REALM initial commit
      
      * Retriever OK (Update new_gelu).
      
      * Encoder prediction score OK
      
      * Encoder pretrained model OK
      
      * Update retriever comments
      
      * Update docs, tests, and imports
      
      * Prune unused models
      
      * Make embedder as a module `RealmEmbedder`
      
      * Add RealmRetrieverOutput
      
      * Update tokenization
      
      * Pass all tests in test_modeling_realm.py
      
      * Prune RealmModel
      
      * Update docs
      
      * Add training test.
      
      * Remove completed TODO
      
      * Style & Quality
      
      * Prune `RealmModel`
      
      * Fixup
      
      * Changes:
      1. Remove RealmTokenizerFast
      2. Update docstrings
      3. Add a method to RealmTokenizer to handle candidates tokenization.
      
      * Fix up
      
      * Style
      
      * Add tokenization tests
      
      * Update `from_pretrained` tests
      
      * Apply suggestions
      
      * Style & Quality
      
      * Copy BERT model
      
      * Fix comment to avoid docstring copying
      
      * Make RealmBertModel private
      
      * Fix bug
      
      * Style
      
      * Basic QA
      
      * Save
      
      * Complete reader logits
      
      * Add searcher
      
      * Complete searcher & reader
      
      * Move block records init to constructor
      
      * Fix training bug
      
      * Add some outputs to RealmReader
      
      * Add finetuned checkpoint variable names parsing
      
      * Fix bug
      
      * Update REALM config
      
      * Add RealmForOpenQA
      
      * Update convert_tfrecord logits
      
      * Fix bugs
      
      * Complete imports
      
      * Update docs
      
      * Update naming
      
      * Add brute-force searcher
      
      * Pass realm model tests
      
      * Style
      
      * Exclude RealmReader from common tests
      
      * Fix
      
      * Fix
      
      * convert docs
      
      * up
      
      * up
      
      * more make style
      
      * up
      
      * upload
      
      * up
      
      * Fix
      
      * Update src/transformers/__init__.py
      
      * adapt testing
      
      * change modeling code
      
      * fix test
      
      * up
      
      * up
      
      * up
      
      * correct more
      
      * make retriever work
      
      * update
      
      * make style
      
      * finish main structure
      
      * Resolve merge conflict
      
      * Make everything work
      
      * Style
      
      * Fixup
      
      * Fixup
      
      * Update training test
      
      * fix retriever
      
      * remove hardcoded path
      
      * Fix
      
      * Fix modeling test
      
      * Update model links
      
      * Initial retrieval test
      
      * Fix modeling test
      
      * Complete retrieval tests
      
      * Fix
      
      * style
      
      * Fix tests
      
      * Fix docstring example
      
      * Minor fix of retrieval test
      
      * Update license headers and docs
      
      * Apply suggestions from code review
      
      * Style
      
      * Apply suggestions from code review
      
      * Add an example to RealmEmbedder
      
      * Fix
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      22454ae4
  13. 14 Jan, 2022 1 commit
  14. 10 Jan, 2022 2 commits
  15. 03 Jan, 2022 1 commit
  16. 23 Dec, 2021 1 commit
    • Yih-Dar's avatar
      Add TFCLIPModel (#13967) · 8f2cc1c3
      Yih-Dar authored
      
      
      * Start the work for TFCLIPModel
      
      * Convert to TF code (TODO: loss + doc)
      
      * Clean up
      
      * Fix pooled_output for TFCLIPTextTransformer - using tf.gather_nd
      
      * assert -> raise error
      
      * Expose TFCLIPModel
      
      * Deal with dummy_inputs
      
      * Add tests
      
      * Fix all tests. TODO: manual check weight loading + add more comments
      
      * Fix pt tf equivalence test
      
      * fixes
      
      * update TFCLIPVisionEmbeddings's Conv2D
      
      * Fix loss + overwrite test_pt_tf_model_equivalence from common
      
      * Add a comment about the change about MainLayer in test_keras_save_load
      
      * Set return_loss=True in TFCLIPModelTester + make tests pass
      
      * overwrite test_pt_tf_model_equivalence from tf common
      
      * fix base_model_prefix
      
      * Fix examples
      
      * remove unused
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * apply review suggestions
      
      * change self.pre_layrnorm to self.pre_layernorm
      
      * apply more review suggestions
      
      * return attention probs before dropout (to align with PT)
      
      * fix weight init
      
      * fix
      
      * build doc
      
      * fix missing doc
      
      * fix for test
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      8f2cc1c3
  17. 22 Dec, 2021 1 commit
  18. 21 Dec, 2021 1 commit
    • Sylvain Gugger's avatar
      Mass conversion of documentation from rst to Markdown (#14866) · 27b3031d
      Sylvain Gugger authored
      * Convert docstrings of all configurations and tokenizers
      
      * Processors and fixes
      
      * Last modeling files and fixes to models
      
      * Pipeline modules
      
      * Utils files
      
      * Data submodule
      
      * All the other files
      
      * Style
      
      * Missing examples
      
      * Style again
      
      * Fix copies
      
      * Say bye bye to rst docstrings forever
      27b3031d
  19. 13 Dec, 2021 1 commit
  20. 08 Dec, 2021 1 commit
    • NielsRogge's avatar
      Add Perceiver IO (#14487) · 65b20b73
      NielsRogge authored
      * First draft
      
      * Style and remove mlm
      
      * Make forward pass work
      
      * More improvements
      
      * More improvements
      
      * Fix bug
      
      * More improvements
      
      * More improvements
      
      * Add PerceiverTokenizer first draft
      
      * Improve conversion script
      
      * More improvements
      
      * Make conversion script work for the encoder
      
      * Make conversion script work with local pickle files
      
      * Style & quality, fix-copies
      
      * Add dummy input to conversion script
      
      * Add absolute position embeddings to TextPreProcessor
      
      * Make forward pass of encoder work
      
      * More improvements
      
      * Move text preprocessor to separate script
      
      * More improvements
      
      * More improvements
      
      * Add post processor
      
      * Make MLM model work
      
      * Style
      
      * Add PerceiverForMaskedLM
      
      * Add PerceiverImagePreprocessor
      
      * Make style
      
      * Make PerceiverForImageClassification work
      
      * More improvements
      
      * More improvements
      
      * Use tokenizer in conversion script
      
      * Use PerceiverForMaskedLM in conversion script
      
      * Define custom PerceiverModelOutput
      
      * Improve PerceiverAttention to make it work for both MLM and image classification
      
      * More improvements
      
      * More improvements
      
      * More improvements to the conversion script
      
      * Make conversion script work for both MLM and image classification
      
      * Add PerceiverFeatureExtractor
      
      * More improvements
      
      * Style and quality
      
      * Add center cropping
      
      * Fix bug
      
      * Small fix
      
      * Add print statement
      
      * Fix bug in image preprocessor
      
      * Fix bug with conversion script
      
      * Make output position embeddings an nn.Parameter layer instead of nn.Embedding
      
      * Comment out print statements
      
      * Add position encoding classes
      
      * More improvements
      
      * Use position_encoding_kwargs
      
      * Add PerceiverForImageClassificationFourier
      
      * Make style & quality
      
      * Add PerceiverForImageClassificationConvProcessing
      
      * Style & quality
      
      * Add flow model
      
      * Move processors to modeling file
      
      * Make position encodings modular
      
      * Make basic decoder use modular position encodings
      
      * Add PerceiverForOpticalFlow to conversion script
      
      * Add AudioPreprocessor
      
      * Make it possible for the basic decoder to use Fourier position embeddings
      
      * Add PerceiverForMultimodalAutoencoding
      
      * Improve model for optical flow
      
      * Improve _build_network_inputs method
      
      * Add print statement
      
      * Fix device issue
      
      * Fix device of Fourier embeddings
      
      * Add print statements for debugging
      
      * Add another print statement
      
      * Add another print statement
      
      * Add another print statement
      
      * Add another print statement
      
      * Improve PerceiverAudioPreprocessor
      
      * Improve conversion script for multimodal modal
      
      * More improvements
      
      * More improvements
      
      * Improve multimodal model
      
      * Make forward pass multimodal model work
      
      * More improvements
      
      * Improve tests
      
      * Fix some more tests
      
      * Add output dataclasses
      
      * Make more tests pass
      
      * Add print statements for debuggin
      
      * Add tests for image classification
      
      * Add PerceiverClassifierOutput
      
      * More improvements
      
      * Make more tests pass for the optical flow model
      
      * Make style & quality
      
      * Small improvements
      
      * Don't support training for optical flow model for now
      
      * Fix _prepare_for_class for tests
      
      * Make more tests pass, add some docs
      
      * Add multimodal model to tests
      
      * Minor fixes
      
      * Fix tests
      
      * Improve conversion script
      
      * Make fixup
      
      * Remove pos_dim argument
      
      * Fix device issue
      
      * Potential fix for OOM
      
      * Revert previous commit
      
      * Fix test_initialization
      
      * Add print statements for debugging
      
      * Fix print statement
      
      * Add print statement
      
      * Add print statement
      
      * Add print statement
      
      * Add print statement
      
      * Add print statement
      
      * Add print statement
      
      * Remove need for output_shape
      
      * Comment out output_shape
      
      * Remove unnecessary code
      
      * Improve docs
      
      * Fix make fixup
      
      * Remove PerceiverTextProcessor from init
      
      * Improve docs
      
      * Small improvement
      
      * Apply first batch of suggestions from code review
      
      * Apply more suggestions from code review
      
      * Update docstrings
      
      * Define dicts beforehand for readability
      
      * Rename task to architecture in conversion script, include PerceiverModel in tests
      
      * Add print statements for debugging
      
      * Fix tests on GPU
      
      * Remove preprocessors, postprocessors and decoders from main init
      
      * Add integration test
      
      * Fix docs
      
      * Replace einops by torch
      
      * Update for new docs frontend
      
      * Rename PerceiverForImageClassification
      
      * Improve docs
      
      * Improve docs
      
      * Improve docs of PerceiverModel
      
      * Fix some more tests
      
      * Improve center_crop
      
      * Add PerceiverForSequenceClassification
      
      * Small improvements
      
      * Fix tests
      
      * Add integration test for optical flow model
      
      * Clean up
      
      * Add tests for tokenizer
      
      * Fix tokenizer by adding special tokens properly
      
      * Fix CI
      65b20b73
  21. 07 Dec, 2021 1 commit
    • Ryokan RI's avatar
      Add mLUKE (#14640) · 30646a0a
      Ryokan RI authored
      * implement MLukeTokenizer and LukeForMaskedLM
      
      * update tests
      
      * update docs
      
      * add LukeForMaskedLM to check_repo.py
      
      * update README
      
      * fix test and specify the entity pad id in tokenization_(m)luke
      
      * fix EntityPredictionHeadTransform
      30646a0a
  22. 01 Dec, 2021 1 commit
    • Sylvain Gugger's avatar
      Doc new front (#14590) · 4df7d05a
      Sylvain Gugger authored
      
      
      * Convert PretrainedConfig doc to Markdown
      
      * Use syntax
      
      * Add necessary doc files (#14496)
      
      * Doc fixes (#14499)
      
      * Fixes for the new front
      
      * Convert DETR file for table
      
      * Title is needed
      
      * Simplify a bit
      
      * Even simpler
      
      * Remove imports
      
      * Fix typo in toctree (#14516)
      
      * Fix checkpoints badge
      
      * Update versions.yml format (#14517)
      
      * Doc new front github actions (#14512)
      
      * Doc new front github actions
      
      * Fix docstring
      
      * Fix feature extraction utils import (#14515)
      
      * Address Julien's comments
      
      * Push to doc-builder
      
      * Ready for merge
      
      * Remove old build and deploy
      
      * Doc misc fixes (#14583)
      
      * Rm versions.yml from doc
      
      * Fix converting.rst
      
      * Rm pretrained_models from toctree
      
      * Fix index links (#14567)
      
      * Fix links in README
      
      * Localized READMEs
      
      * Fix copy script
      
      * Fix find doc script
      
      * Update README_ko.md
      Co-authored-by: default avatarJulien Chaumond <julien@huggingface.co>
      Co-authored-by: default avatarJulien Chaumond <julien@huggingface.co>
      
      * Adapt build command to new CLI tools (#14578)
      
      * Fix typo
      
      * Fix doc interlinks (#14589)
      
      * Convert PretrainedConfig doc to Markdown
      
      * Use syntax
      
      * Rm pattern <[a-z]+(.html).*>
      
      * Rm huggingface.co/transformers/master
      
      * Rm .html
      
      * Rm .html from index.mdx
      
      * Rm .html from model_summary.rst
      
      * Update index.mdx rm html
      
      * Update remove .html
      
      * Fix inner doc links
      
      * Fix interlink in preprocssing.rst
      
      * Update pr_checks
      Co-authored-by: default avatarSylvain Gugger <sylvain.gugger@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Convert PretrainedConfig doc to Markdown
      
      * Use syntax
      
      * Add necessary doc files (#14496)
      
      * Doc fixes (#14499)
      
      * Fixes for the new front
      
      * Convert DETR file for table
      
      * Title is needed
      
      * Simplify a bit
      
      * Even simpler
      
      * Remove imports
      
      * Fix checkpoints badge
      
      * Fix typo in toctree (#14516)
      
      * Update versions.yml format (#14517)
      
      * Doc new front github actions (#14512)
      
      * Doc new front github actions
      
      * Fix docstring
      
      * Fix feature extraction utils import (#14515)
      
      * Address Julien's comments
      
      * Push to doc-builder
      
      * Ready for merge
      
      * Remove old build and deploy
      
      * Doc misc fixes (#14583)
      
      * Rm versions.yml from doc
      
      * Fix converting.rst
      
      * Rm pretrained_models from toctree
      
      * Fix index links (#14567)
      
      * Fix links in README
      
      * Localized READMEs
      
      * Fix copy script
      
      * Fix find doc script
      
      * Update README_ko.md
      Co-authored-by: default avatarJulien Chaumond <julien@huggingface.co>
      Co-authored-by: default avatarJulien Chaumond <julien@huggingface.co>
      
      * Adapt build command to new CLI tools (#14578)
      
      * Fix typo
      
      * Fix doc interlinks (#14589)
      
      * Convert PretrainedConfig doc to Markdown
      
      * Use syntax
      
      * Rm pattern <[a-z]+(.html).*>
      
      * Rm huggingface.co/transformers/master
      
      * Rm .html
      
      * Rm .html from index.mdx
      
      * Rm .html from model_summary.rst
      
      * Update index.mdx rm html
      
      * Update remove .html
      
      * Fix inner doc links
      
      * Fix interlink in preprocssing.rst
      
      * Update pr_checks
      Co-authored-by: default avatarSylvain Gugger <sylvain.gugger@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Styling
      Co-authored-by: default avatarMishig Davaadorj <mishig.davaadorj@coloradocollege.edu>
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      Co-authored-by: default avatarJulien Chaumond <julien@huggingface.co>
      4df7d05a
  23. 30 Nov, 2021 1 commit
    • Suraj Patil's avatar
      VisionTextDualEncoder (#13511) · fc1d97f2
      Suraj Patil authored
      
      
      * init vision_text_dual_encoder
      
      * fix merge
      
      * remove extra heads
      
      * fix tests
      
      * remove VISION_TEXT_DUAL_ENCODER_PRETRAINED_CONFIG_ARCHIVE_MAP
      
      * remove archive map
      
      * fix imports
      
      * fix more imports
      
      * fix init
      
      * delete tokenizers
      
      * fix imports
      
      * clean
      
      * support clip's vision model
      
      * handle None config
      
      * begin tests
      
      * more test and few fixes
      
      * warn about newly init weights
      
      * more tests
      
      * add loss to model
      
      * remove extra classes from doc
      
      * add processor
      
      * doc and small fixes
      
      * add start docstr
      
      * update flax model
      
      * flax tests
      
      * more flax tests
      
      * doc
      
      * quality
      
      * doc and quality
      
      * fix doc
      
      * doc
      
      * remove comments
      
      * update warning
      
      * quality
      
      * fix docs
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * replace asserts, fix imports
      
      * update imports
      
      * fix import
      
      * address some review comments
      
      * fix check
      
      * reduce tolerance
      
      * fix test
      
      * add flax integration test
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * address Sylvain's comments
      
      * fix style
      
      * add pt_flax_equivalence test in PT tests
      
      * add pt integration test
      
      * update test
      
      * use pre-trained checkpoint in examples
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      fc1d97f2
  24. 19 Nov, 2021 1 commit
  25. 18 Nov, 2021 1 commit
    • NielsRogge's avatar
      Add ImageGPT (#14240) · da36c557
      NielsRogge authored
      * First draft
      
      * More improvements
      
      * Improve conversion script
      
      * Fix init weights for layer norm
      
      * Fix correct model for conversion script
      
      * Don't tie input and output embeddings
      
      * Add print statements for debugging
      
      * Add print statements for debugging
      
      * Fix vocab size of model
      
      * Improve documentation, remove fast tokenizer
      
      * Add ImageGPTForImageClassification, improve docs
      
      * Fix docs issue
      
      * Set verbosity level back to info
      
      * Improve tests
      
      * Fix tests and add figure
      
      * Delete tokenizer file
      
      * Remove ImageGPTTokenizer from init files
      
      * Remove ImageGPTLayer from init files
      
      * Remove ImageGPT tokenizer from docs
      
      * First draft of ImageGPTFeatureExtractor
      
      * Fix typo
      
      * Fix bug
      
      * More improvements
      
      * Apply suggestions from code review, add tests for feature extractor
      
      * Fix layernorm
      
      * Update save_pretrained method
      
      * Fix issue
      
      * Make all tests of ImageGPTFeatureExtractor pass
      
      * Update code examples
      
      * Rename model inputs to pixel_values
      
      * Improve code examples
      
      * Update init_weights to post_init
      
      * Fix post_init
      da36c557
  26. 09 Nov, 2021 1 commit
    • Yih-Dar's avatar
      Add FlaxVisionEncoderDecoderModel (#13359) · 95b3ec3b
      Yih-Dar authored
      
      
      * Start the work on FlaxVisionEncoderDecoderModel
      
      * Add FlaxVisionEncoderDecoderModel
      
      * Add VisionEncoderDecoderConfig
      
      * Make FlaxVisionEncoderDecoderModel visible to transformers
      
      * Add test
      
      * Fix wrong getattr usage
      
      * Fix tests
      
      * Add FlaxAutoModelForVision2Seq
      
      * Expose FLAX_MODEL_FOR_VISION_2_SEQ_MAPPING
      
      * clean-up
      
      * add integration test
      
      * update expected logits
      
      * update expected scores
      
      * Add ViT2GPT2ModelIntegrationTest + some cleaning
      
      * Add projection layer + PT/Flax equivalence tests
      
      * Fix import
      
      * minor changes
      
      * make test slow again
      
      * Apply suggestions
      
      * Add modeling_flax_vision_encoder_decoder to _ignore_modules in get_model_modules()
      
      * fix copies
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * split long strings in multiple lines
      
      * decoder_input_ids can't be None
      
      * Add back test_configuration_tie
      
      * Remove attention_mask parameter
      
      * fix test - encoder_last_hidden_state should be encoder_outputs.last_hidden_state instead of the projected vector
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Remove more encoder_attention_mask
      
      * remove encoder_attention_mask when calling self.decode (in FlaxVisionEncoderDecoderModule)
      
      * Fix style + pass 1s instead of None as encoder_attention_mask
      
      * fix init_weights
      
      * pass None for encoder_attention_mask
      
      * pass 1s instead of None as encoder_attention_mask
      
      * Fix doc style
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      95b3ec3b
  27. 01 Nov, 2021 2 commits
    • NielsRogge's avatar
      Add BeitForSemanticSegmentation (#14096) · e20faa6f
      NielsRogge authored
      
      
      * Add first draft
      
      * Make forward pass work
      
      * Improve conversion script
      
      * Add notebook that checks if it works
      
      * Add BeitForSemanticSegmentation to the tests
      
      * More improvements
      
      * Make BeitForSemanticSegmentation consistent with Segformer
      
      * Small bug fix
      
      * Add BeitForSemanticSegmentation to docs
      
      * Make sure model doesn't output hidden states when the user doesn't want to
      
      * Make it possible to convert the large model
      
      * Fix issue
      
      * Fix conversion script for large model
      
      * Add auxiliary_head option to semantic segmentation model
      
      * Apply suggestions from @sgugger's review
      
      * Apply suggestions from code review
      
      * Fix failing test
      Co-authored-by: default avatarLysandre <lysandre.debut@reseau.eseo.fr>
      e20faa6f
    • Yih-Dar's avatar
      Add more missing models to models/__init__.py (#14177) · 9450bfcc
      Yih-Dar authored
      
      
      * Add missing models to models/__init__.py
      
      * Fix issues previously undetected
      
      * Add UniSpeechSatForPreTraining to all_model_classes
      
      * fix unispeech sat
      
      * fix
      
      * Add check_model_list() to check_repo.py
      
      * Remove _ignore_models = ["bort"]
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      Co-authored-by: default avatarpatrickvonplaten <patrick.v.platen@gmail.com>
      9450bfcc
  28. 28 Oct, 2021 1 commit
    • NielsRogge's avatar
      Add SegFormer (#14019) · 1dc96a76
      NielsRogge authored
      
      
      * First draft
      
      * Make style & quality
      
      * Improve conversion script
      
      * Add print statement to see actual slice
      
      * Make absolute tolerance smaller
      
      * Fix image classification models
      
      * Add post_process_semantic method
      
      * Disable padding
      
      * Improve conversion script
      
      * Rename to ForSemanticSegmentation, add integration test, remove post_process methods
      
      * Improve docs
      
      * Fix code quality
      
      * Fix feature extractor tests
      
      * Fix tests for image classification model
      
      * Delete file
      
      * Add is_torch_available to feature extractor
      
      * Improve documentation of feature extractor methods
      
      * Apply suggestions from @sgugger's code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Apply some more suggestions of code review
      
      * Rebase with master
      
      * Fix rebase issues
      
      * Make sure model only outputs hidden states when the user wants to
      
      * Apply suggestions from code review
      
      * Add pad method
      
      * Support padding of 2d images
      
      * Add print statement
      
      * Add print statement
      
      * Move padding method to SegformerFeatureExtractor
      
      * Fix issue
      
      * Add casting of segmentation maps
      
      * Add test for padding
      
      * Add small note about padding
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      1dc96a76
  29. 26 Oct, 2021 1 commit
  30. 15 Oct, 2021 1 commit
  31. 12 Oct, 2021 1 commit
    • Yih-Dar's avatar
      Add TFEncoderDecoderModel + Add cross-attention to some TF models (#13222) · 8b240a06
      Yih-Dar authored
      
      
      * Add cross attentions to TFGPT2Model
      
      * Add TFEncoderDecoderModel
      
      * Add TFBaseModelOutputWithPoolingAndCrossAttentions
      
      * Add cross attentions to TFBertModel
      
      * Fix past or past_key_values argument issue
      
      * Fix generation
      
      * Fix save and load
      
      * Add some checks and comments
      
      * Clean the code that deals with past keys/values
      
      * Add kwargs to processing_inputs
      
      * Add serving_output to TFEncoderDecoderModel
      
      * Some cleaning + fix use_cache value issue
      
      * Fix tests + add bert2bert/bert2gpt2 tests
      
      * Fix more tests
      
      * Ignore crossattention.bias when loading GPT2 weights into TFGPT2
      
      * Fix return_dict_in_generate in tf generation
      
      * Fix is_token_logit_eos_token bug in tf generation
      
      * Finalize the tests after fixing some bugs
      
      * Fix another is_token_logit_eos_token bug in tf generation
      
      * Add/Update docs
      
      * Add TFBertEncoderDecoderModelTest
      
      * Clean test script
      
      * Add TFEncoderDecoderModel to the library
      
      * Add cross attentions to TFRobertaModel
      
      * Add TFRobertaEncoderDecoderModelTest
      
      * make style
      
      * Change the way of position_ids computation
      
      * bug fix
      
      * Fix copies in tf_albert
      
      * Remove some copied from and apply some fix-copies
      
      * Remove some copied
      
      * Add cross attentions to some other TF models
      
      * Remove encoder_hidden_states from TFLayoutLMModel.call for now
      
      * Make style
      
      * Fix TFRemBertForCausalLM
      
      * Revert the change to longformer + Remove copies
      
      * Revert the change to albert and convbert + Remove copies
      
      * make quality
      
      * make style
      
      * Add TFRembertEncoderDecoderModelTest
      
      * make quality and fix-copies
      
      * test TFRobertaForCausalLM
      
      * Fixes for failed tests
      
      * Fixes for failed tests
      
      * fix more tests
      
      * Fixes for failed tests
      
      * Fix Auto mapping order
      
      * Fix TFRemBertEncoder return value
      
      * fix tf_rembert
      
      * Check copies are OK
      
      * Fix missing TFBaseModelOutputWithPastAndCrossAttentions is not defined
      
      * Add TFEncoderDecoderModelSaveLoadTests
      
      * fix tf weight loading
      
      * check the change of use_cache
      
      * Revert the change
      
      * Add missing test_for_causal_lm for TFRobertaModelTest
      
      * Try cleaning past
      
      * fix _reorder_cache
      
      * Revert some files to original versions
      
      * Keep as many copies as possible
      
      * Apply suggested changes - Use raise ValueError instead of assert
      
      * Move import to top
      
      * Fix wrong require_torch
      
      * Replace more assert by raise ValueError
      
      * Add test_pt_tf_model_equivalence (the test won't pass for now)
      
      * add test for loading/saving
      
      * finish
      
      * finish
      
      * Remove test_pt_tf_model_equivalence
      
      * Update tf modeling template
      
      * Remove pooling, added in the prev. commit, from MainLayer
      
      * Update tf modeling test template
      
      * Move inputs["use_cache"] = False to modeling_tf_utils.py
      
      * Fix torch.Tensor in the comment
      
      * fix use_cache
      
      * Fix missing use_cache in ElectraConfig
      
      * Add a note to from_pretrained
      
      * Fix style
      
      * Change test_encoder_decoder_save_load_from_encoder_decoder_from_pt
      
      * Fix TFMLP (in TFGPT2) activation issue
      
      * Fix None past_key_values value in serving_output
      
      * Don't call get_encoderdecoder_model in TFEncoderDecoderModelTest.test_configuration_tie until we have a TF checkpoint on Hub
      
      * Apply review suggestions - style for cross_attns in serving_output
      
      * Apply review suggestions - change assert + docstrings
      
      * break the error message to respect the char limit
      
      * deprecate the argument past
      
      * fix docstring style
      
      * Update the encoder-decoder rst file
      
      * fix Unknown interpreted text role "method"
      
      * fix typo
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      8b240a06
  32. 21 Sep, 2021 1 commit
    • Kamal Raj's avatar
      beit-flax (#13515) · a2dec768
      Kamal Raj authored
      * beit-flax
      
      * updated FLAX_BEIT_MLM_DOCSTRING
      
      * removed bool_masked_pos from classification
      
      * updated Copyright
      
      * code refactoring: x -> embeddings
      
      * updated test: rm from_pt
      
      * Update docs/source/model_doc/beit.rst
      
      * model code dtype updates and
      other changes according to review
      
      * relative_position_bias
      revert back to pytorch design
      a2dec768
  33. 01 Sep, 2021 1 commit
  34. 27 Aug, 2021 1 commit
    • Anton Lozhkov's avatar
      Add Wav2Vec2 & Hubert ForSequenceClassification (#13153) · b6f332ec
      Anton Lozhkov authored
      * Add hubert classifier + tests
      
      * Add hubert classifier + tests
      
      * Dummies for all classification tests
      
      * Wav2Vec2 classifier + ER test
      
      * Fix hubert integration tests
      
      * Add hubert IC
      
      * Pass tests for all classification tasks on Hubert
      
      * Pass all tests + copies
      
      * Move models to the SUPERB org
      b6f332ec
  35. 23 Aug, 2021 1 commit
    • Yih-Dar's avatar
      Make Flax GPT2 working with cross attention (#13008) · 2e20c0f3
      Yih-Dar authored
      
      
      * make flax gpt2 working with cross attention
      
      * Remove encoder->decoder projection layer
      
      * A draft (incomplete) for FlaxEncoderDecoderModel
      
      * Add the method from_encoder_decoder_pretrained + the docstrings
      
      * Fix the mistakes of using EncoderDecoderModel
      
      * Fix style
      
      * Add FlaxEncoderDecoderModel to the library
      
      * Fix cyclic imports
      
      * Add FlaxEncoderDecoderModel to modeling_flax_auto.py
      
      * Remove question comments
      
      * add tests for FlaxEncoderDecoderModel
      
      * add flax_encoder_decoder to the lists of ignored entries in check_repo.py
      
      * fix missing required positional arguments
      
      * Remove **kwargs when creating FlaxEncoderDecoderModel in from_encoder_decoder_pretrained()
      
      Also fix generation eos/pad tokens issue
      
      * Fix: Use sequences from the generated_output
      
      * Change a check from assert to raise ValueError
      
      * Fix examples and token ids issues
      
      * Fix missing all_cross_attentions when outputting tuple in modeling_gpt2
      
      * Remove the changes in configuration docstrings.
      
      * allow for bert 2 gpt2
      
      * make fix-copies
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Change remaining examples to bert2gpt2
      
      * Change the test to Bert2GPT2
      
      * Fix examples
      
      * Fix import
      
      * Fix unpack bug
      
      * Rename to FlaxEncoderDecoderModelTest and change the test to bert2gpt2
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Fix: NotImplentedError -> NotImplementedError
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * up
      
      * finalize
      Co-authored-by: default avatarydshieh <ydshieh@user.noreply>
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      2e20c0f3
  36. 06 Aug, 2021 1 commit
    • Sylvain Gugger's avatar
      [WIP] Disentangle auto modules from other modeling files (#13023) · 9870093f
      Sylvain Gugger authored
      * Initial work
      
      * All auto models
      
      * All tf auto models
      
      * All flax auto models
      
      * Tokenizers
      
      * Add feature extractors
      
      * Fix typos
      
      * Fix other typo
      
      * Use the right config
      
      * Remove old mapping names and update logic in AutoTokenizer
      
      * Update check_table
      
      * Fix copies and check_repo script
      
      * Fix last test
      
      * Add back name
      
      * clean up
      
      * Update template
      
      * Update template
      
      * Forgot a )
      
      * Use alternative to fixup
      
      * Fix TF model template
      
      * Address review comments
      
      * Address review comments
      
      * Style
      9870093f
  37. 04 Aug, 2021 2 commits
    • NielsRogge's avatar
      Add BEiT (#12994) · 83e5a106
      NielsRogge authored
      
      
      * First pass
      
      * Make conversion script work
      
      * Improve conversion script
      
      * Fix bug, conversion script working
      
      * Improve conversion script, implement BEiTFeatureExtractor
      
      * Make conversion script work based on URL
      
      * Improve conversion script
      
      * Add tests, add documentation
      
      * Fix bug in conversion script
      
      * Fix another bug
      
      * Add support for converting masked image modeling model
      
      * Add support for converting masked image modeling
      
      * Fix bug
      
      * Add print statement for debugging
      
      * Fix another bug
      
      * Make conversion script finally work for masked image modeling models
      
      * Move id2label for datasets to JSON files on the hub
      
      * Make sure id's are read in as integers
      
      * Add integration tests
      
      * Make style & quality
      
      * Fix test, add BEiT to README
      
      * Apply suggestions from @sgugger's review
      
      * Apply suggestions from code review
      
      * Make quality
      
      * Replace nielsr by microsoft in tests, add docs
      
      * Rename BEiT to Beit
      
      * Minor fix
      
      * Fix docs of BeitForMaskedImageModeling
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      83e5a106
    • Patrick von Platen's avatar
      [Flax] Correctly Add MT5 (#12988) · a317e6c3
      Patrick von Platen authored
      
      
      * finish PR
      
      * finish mt5
      
      * push
      
      * up
      
      * Update tests/test_modeling_flax_mt5.py
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      a317e6c3