1. 30 Sep, 2022 2 commits
    • Matt's avatar
      Rebase ESM PR and update all file formats (#19055) · 368b649a
      Matt authored
      
      
      * Rebase ESM PR and update all file formats
      
      * Fix test relative imports
      
      * Add __init__.py to the test dir
      
      * Disable gradient checkpointing
      
      * Remove references to TFESM... FOR NOW >:|
      
      * Remove completed TODOs from tests
      
      * Convert docstrings to mdx, fix-copies from BERT
      
      * fix-copies for the README and index
      
      * Update ESM's __init__.py to the modern format
      
      * Add to _toctree.yml
      
      * Ensure we correctly copy the pad_token_id from the original ESM model
      
      * Ensure we correctly copy the pad_token_id from the original ESM model
      
      * Tiny grammar nitpicks
      
      * Make the layer norm after embeddings an optional flag
      
      * Make the layer norm after embeddings an optional flag
      
      * Update the conversion script to handle other model classes
      
      * Remove token_type_ids entirely, fix attention_masking and add checks to convert_esm.py
      
      * Break the copied from link from BertModel.forward to remove token_type_ids
      
      * Remove debug array saves
      
      * Begin ESM-2 porting
      
      * Add a hacky workaround for the precision issue in original repo
      
      * Code cleanup
      
      * Remove unused checkpoint conversion code
      
      * Remove unused checkpoint conversion code
      
      * Fix copyright notices
      
      * Get rid of all references to the TF weights conversion
      
      * Remove token_type_ids from the tests
      
      * Fix test code
      
      * Update src/transformers/__init__.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/__init__.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update README.md
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Add credit
      
      * Remove _ args and __ kwargs in rotary embedding
      
      * Assertively remove asserts
      
      * Replace einsum with torch.outer()
      
      * Fix docstring formatting
      
      * Remove assertions in tokenization
      
      * Add paper citation to ESMModel docstring
      
      * Move vocab list to single line
      
      * Remove ESMLayer from init
      
      * Add Facebook copyrights
      
      * Clean up RotaryEmbedding docstring
      
      * Fix docstring formatting
      
      * Fix docstring for config object
      
      * Add explanation for new config methods
      
      * make fix-copies
      
      * Rename all the ESM- classes to Esm-
      
      * Update conversion script to allow pushing to hub
      
      * Update tests to point at my repo for now
      
      * Set config properly for tests
      
      * Remove the gross hack that forced loss of precision in inv_freq and instead copy the data from the model being converted
      
      * make fixup
      
      * Update expected values for slow tests
      
      * make fixup
      
      * Remove EsmForCausalLM for now
      
      * Remove EsmForCausalLM for now
      
      * Fix padding idx test
      
      * Updated README and docs with ESM-1b and ESM-2 separately (#19221)
      
      * Updated README and docs with ESM-1b and ESM-2 separately
      
      * Update READMEs, longer entry with 3 citations
      
      * make fix-copies
      Co-authored-by: default avatarYour Name <you@example.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarTom Sercu <tsercu@fb.com>
      Co-authored-by: default avatarYour Name <you@example.com>
      368b649a
    • NielsRogge's avatar
      Add MarkupLM (#19198) · f3d2f7a6
      NielsRogge authored
      
      
      * First draft
      
      * Make basic test work
      
      * Fix most tokenizer tests
      
      * More improvements
      
      * Make more tests pass
      
      * Fix more tests
      
      * Fix some code quality
      
      * Improve truncation
      
      * Implement feature extractor
      
      * Improve feature extractor and add tests
      
      * Improve feature extractor tests
      
      * Fix pair_input test partly
      
      * Add fast tokenizer
      
      * Improve implementation
      
      * Fix rebase
      
      * Fix rebase
      
      * Fix most of the tokenizer tests.
      
      * propose solution for fast
      
      * add: integration test for fasttokenizer, warning for decode, fix template in slow tokenizer
      
      * add: modify markuplmconverter
      
      * add: some modify on converter and tokenizerfast
      
      * Fix style, copies
      
      * Make fixup
      
      * Update tokenization_markuplm.py
      
      * Update test_tokenization_markuplm.py
      
      * Update markuplm related
      
      * Improve processor, add integration test
      
      * Add processor test file
      
      * Improve processor
      
      * Improve processor tests
      
      * Fix more processor tests
      
      * Fix processor tests
      
      * Update docstrings
      
      * Add Copied from statements
      
      * Add more Copied from statements
      
      * Add code examples
      
      * Improve code examples
      
      * Add model to doc tests
      
      * Adding dependency check
      
      * Add dummy file
      
      * Add requires_backends
      
      * Add model to toctree
      
      * Fix more things, disable dependency check for now
      
      * Apply more suggestions
      
      * Add soft dependency
      
      * Add annotators to tests
      
      * Fix style
      
      * Remove from_slow=True
      
      * Remove print statements
      
      * Add sanity check
      
      * Fix processor test
      
      * Fix processor tests, add more docs
      
      * Add doc tests for mdx file
      
      * Add more tips
      
      * Apply suggestions
      Co-authored-by: default avatarNiels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
      Co-authored-by: default avatarlockon-n <45759388+lockon-n@users.noreply.github.com>
      Co-authored-by: default avatarSaulLu <lucilesaul.com@gmail.com>
      Co-authored-by: default avatarlockon-n <dd098309@126.com>
      f3d2f7a6
  2. 29 Sep, 2022 4 commits
    • mustapha ajeghrir's avatar
      Fix `m2m_100.mdx` doc example missing `labels` (#19149) · ba9e336f
      mustapha ajeghrir authored
      The `labels` variable is not defined, the `model_inputs` already contain this information.
      ba9e336f
    • Aritra Roy Gosthipaty's avatar
      [TensorFlow] Adding GroupViT (#18020) · 0dc7b3a7
      Aritra Roy Gosthipaty authored
      
      
      * chore: initial commit
      
      * chore: adding util methods
      
      yet to work on the nn.functional.interpolate port with align_corener=True
      
      * chore: refactor the utils
      
      * used tf.compat.v1.image.resize to align the F.interpolate function
      * added type hints to the method signatures
      * added references to the gists where one 2 one alignment of torch and tf has been shown
      
      * chore: adding the layers
      
      * chore: porting all the layers from torch to tf
      
      This is the initial draft, nothing is tested yet.
      
      * chore: aligning the layers with reference to tf clip
      
      * chore: aligning the modules
      
      * added demaraction comments
      * added copied and adapted from comments
      
      * chore: aligning with CLIP
      
      * chore: wrangling the layers to keep it tf compatible
      
      * chore: aligning the names of the layers for porting
      
      * chore: style changes
      
      * chore: adding docs and inits
      
      * chore: adding tfp dependencis
      
      the code is taken from TAPAS
      
      * chore: initial commit for testing
      
      * chore: aligning the vision embeddings with the vit implementatino
      
      * chore: changing model prefix
      
      * chore: fixing the name of the model and the layer normalization test case
      
      * chore: every test passes but the slow ones
      
      * chore: fix style and integration test
      
      * chore: moving comments below decorators
      
      * chore: make fixup and fix-copies changes
      
      * chore: adding the Vision and Text Model to check_repo
      
      * chore: modifying the prefix name to align it with the torch implementation
      
      * chore: fix typo in configuration
      
      * choer: changing the name of the model variable
      
      * chore: adding segmentation flag
      
      * chore: gante's review
      
      * chore: style refactor
      
      * chore: amy review
      
      * chore: adding shape_list to parts that have been copied from other snippets
      
      * chore: init batchnorm with torch defaults
      
      * chore: adding shape_list to pass the tests
      
      * test fix: adding seed as 0
      
      * set seed
      
      * chore: changing the straight through trick to fix -ve dimensinos
      
      * chore: adding a dimension to the loss
      
      * chore: adding reviewers and contributors names to the docs
      
      * chore: added changes after review
      
      * chore: code quality fixup
      
      * chore: fixing the segmentation snippet
      
      * chore: adding  to the layer calls
      
      * chore: changing int32 to int64 for inputs of serving
      
      * chore: review changes
      
      * chore: style changes
      
      * chore: remove from_pt=True
      
      * fix: repo consistency
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      0dc7b3a7
    • Steven Liu's avatar
      Focus doc around preprocessing classes (#18768) · 6957350c
      Steven Liu authored
      * 📝 reframe docs around preprocessing classes
      
      * small edits
      
      * edits and review
      
      * fix typo
      
      * apply review
      
      * clarify processor
      6957350c
    • Steven Liu's avatar
      Move AutoClasses under Main Classes (#19163) · 990936a8
      Steven Liu authored
      * move autoclasses to main classes
      
      * keep auto.mdx in model_doc
      990936a8
  3. 27 Sep, 2022 1 commit
  4. 26 Sep, 2022 1 commit
  5. 23 Sep, 2022 1 commit
  6. 22 Sep, 2022 5 commits
  7. 21 Sep, 2022 2 commits
  8. 20 Sep, 2022 1 commit
  9. 19 Sep, 2022 1 commit
  10. 14 Sep, 2022 4 commits
    • Stas Bekman's avatar
      [doc] debug: fix import (#19042) · 8edf1963
      Stas Bekman authored
      correct the import statement
      8edf1963
    • Hakjin Lee's avatar
      Fix a broken link for deepspeed ZeRO inference in the docs (#19001) · abca1741
      Hakjin Lee authored
      
      
      * Fix a broken link for deepspeed ZeRO inference
      
      * fix link
      Co-authored-by: default avatarStas Bekman <stas@stason.org>
      abca1741
    • Shinya Otani's avatar
      Add support for Japanese GPT-NeoX-based model by ABEJA, Inc. (#18814) · f5f430e5
      Shinya Otani authored
      * add gpt-neox-japanese model and tokenizer as new model
      
      * Correction to PR's comment for GPT NeoX Japanese
      - Fix to be able to use gpu
      - Add comment # Copied... at the top of RotaryEmbedding
      - Implement nn.Linear instead of original linear class
      - Add generation test under @slow
      
      * fix bias treatment for gpt-neox-japanese
      
      * Modidy gpt-neox-japanese following PR
      - add doc for bias_dropout_add
      - style change following a PR comment
      
      * add document for gpt-neox-japanese
      
      * remove unused import from gpt-neox-japanese
      
      * fix README for gpt-neox-japanese
      f5f430e5
    • NielsRogge's avatar
      Add Deformable DETR (#17281) · 59407bbe
      NielsRogge authored
      
      
      * First draft
      
      * More improvements
      
      * Improve model, add custom CUDA code
      
      * Import torch before
      
      * Add script that imports custom layer
      
      * Add everything in new ops directory
      
      * Import custom layer in modeling file
      
      * Fix ARCHIVE_MAP typo
      
      * Creating the custom kernel on the fly.
      
      * Import custom layer in modeling file
      
      * More improvements
      
      * Fix CUDA loading
      
      * More improvements
      
      * Improve conversion script
      
      * Improve conversion script
      
      * Make it work until encoder_outputs
      
      * Make forward pass work
      
      * More improvements
      
      * Make logits match original implementation
      
      * Make implementation also support single_scale model
      
      * Add support for single_scale and dilation checkpoint
      
      * Add support for with_box_refine model
      
      * Support also two stage model
      
      * Improve tests
      
      * Fix more tests
      
      * Make more tests pass
      
      * Upload all models to the hub
      
      * Clean up some code
      
      * Improve decoder outputs
      
      * Rename intermediate hidden states and reference points
      
      * Improve model outputs
      
      * Move tests to dedicated folder
      
      * Improve model outputs
      
      * Fix retain_grad test
      
      * Improve docs
      
      * Clean up and make test_initialization pass
      
      * Improve variable names
      
      * Add copied from statements
      
      * Improve docs
      
      * Fix style
      
      * Improve docs
      
      * Improve docs, move tests to model folder
      
      * Fix rebase
      
      * Remove DetrForSegmentation from auto mapping
      
      * Apply suggestions from code review
      
      * Improve variable names and docstrings
      
      * Apply some more suggestions from code review
      
      * Apply suggestion from code review
      
      * better docs and variables names
      
      * hint to num_queries and two_stage confusion
      
      * remove asserts and code refactor
      
      * add exception if two_stage is True and with_box_refine is False
      
      * use f-strings
      
      * Improve docs and variable names
      
      * Fix code quality
      
      * Fix rebase
      
      * Add require_torch_gpu decorator
      
      * Add pip install ninja to CI jobs
      
      * Apply suggestion of @sgugger
      
      * Remove DeformableDetrForObjectDetection from auto mapping
      
      * Remove DeformableDetrModel from auto mapping
      
      * Add model to toctree
      
      * Add model back to mappings, skip model in pipeline tests
      
      * Apply @sgugger's suggestion
      
      * Fix imports in the init
      
      * Fix copies
      
      * Add CPU implementation
      
      * Comment out GPU function
      
      * Undo previous change
      
      * Apply more suggestions
      
      * Remove require_torch_gpu annotator
      
      * Fix quality
      
      * Add logger.info
      
      * Fix logger
      
      * Fix variable names
      
      * Fix initializaztion
      
      * Add missing initialization
      
      * Update checkpoint name
      
      * Add model to doc tests
      
      * Add CPU/GPU equivalence test
      
      * Add Deformable DETR to pipeline tests
      
      * Skip model for object detection pipeline
      Co-authored-by: default avatarNicolas Patry <patry.nicolas@protonmail.com>
      Co-authored-by: default avatarNouamane Tazi <nouamane98@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <Sylvain.gugger@gmail.com>
      59407bbe
  11. 12 Sep, 2022 2 commits
  12. 09 Sep, 2022 2 commits
  13. 08 Sep, 2022 2 commits
    • 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
    • Devlee247's avatar
      Fix LayoutXLM wrong link in README (#18932) · 9832ac7c
      Devlee247 authored
      * fix LayoutXLM wrong link in README
      
      * fix LayoutXLM worng link in index.mdx
      9832ac7c
  14. 07 Sep, 2022 3 commits
  15. 06 Sep, 2022 2 commits
  16. 05 Sep, 2022 2 commits
  17. 02 Sep, 2022 5 commits