1. 28 Nov, 2023 1 commit
  2. 15 Nov, 2023 1 commit
  3. 22 Sep, 2023 1 commit
  4. 18 Aug, 2023 1 commit
  5. 29 Jun, 2023 1 commit
  6. 23 Jun, 2023 1 commit
  7. 20 Jun, 2023 1 commit
  8. 21 Apr, 2023 1 commit
  9. 13 Mar, 2023 1 commit
  10. 20 Feb, 2023 1 commit
    • Andy Ehrenberg's avatar
      add flax whisper implementation (#20479) · 2840272c
      Andy Ehrenberg authored
      
      
      * add flax whisper implementation
      
      * rever change to setup
      
      * remove unused imports
      
      * revert generation changes
      
      * flax whisper docs
      
      * docs
      
      * import order
      
      * import sorting
      
      * isort
      
      * add dummy objects
      
      * doc formatting
      
      * formatting
      
      * remove trailing whitespaces
      
      * fix flax whisper docs
      
      * add generation logic to unlock flax whisper
      
      * remove scans
      
      * give credits to Flax Bart implementation
      
      * remove unused imports
      
      * add license
      
      * remove assert
      
      * more credits to Bart
      
      * fix style
      
      * formatting
      
      * support left padding
      
      * add flax whisper generation test
      
      * remove copied from comments whenever not a full copy
      
      * fix docstrings for logits processors
      
      * revert change to FlaxForceTokensLogitsProcessor
      
      * revert doc changes
      
      * improve generation docs
      
      * reorganize
      
      * formatting
      
      * cleanup docs
      
      * add tests
      
      * handle empty list case
      
      * fix forced decoder ids in flax tests
      
      * add flax whisper to inits
      
      * upate dummy objects
      
      * docs for FlaxAutoModelForSpeechSeq2Seq
      
      * fix decoder_position_ids computation in pretrained model decode/__call__ fns
      
      * add Copied from statements as necessary
      
      * compute position_ids only in __call__ and decode methods of pretrained model subclasses
      
      * improve readabilityof compute positional embeddings
      
      * check dimensionality of input_features instead of hidden_states
      
      * copied from statement for init_cache
      
      * formatting
      
      * fix copies
      
      * fix copies
      
      * pass attention mask to encoder layers
      
      * fix decoder module outputs
      
      * set dtype
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * smaller flax model for whisper test
      
      * Update src/transformers/generation/flax_utils.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/whisper/modeling_flax_whisper.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update tests/models/whisper/test_modeling_flax_whisper.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * cleanup
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/whisper/modeling_flax_whisper.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * bias cleanup
      
      * doc fix
      
      * align style for force tokens processor
      
      * readability
      
      * fix input shape in tests
      
      * revert FlaxGenerationMixin docstring
      
      * formatting
      
      * fix tests
      
      * fix imports
      
      * consistent encoder hidden states
      
      * consistent hidden states
      
      * input shapes
      
      * typo
      
      * partial class trick
      
      * partial class for input shape
      
      * base_class with correct input shape
      
      * partial base classes
      
      * match by name
      
      * set main_input_name
      
      * compare on names
      
      * formatting
      
      * remove unused import
      
      * safer position ids computation
      
      * safer position id computation
      
      * Update src/transformers/models/whisper/modeling_flax_whisper.py
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * Update src/transformers/models/whisper/modeling_flax_whisper.py
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * remove identical inherited tests
      
      * fix prompt ids in tests
      
      * use generation config
      
      * use jnp array
      
      * better var names
      
      * more explicit bias use
      
      * import transformers
      
      * formatting
      
      * test formatting
      
      * remove unused imports
      
      * remove unused imports
      
      * formatting
      
      * isort
      
      * docs
      
      * fix ln orders for encoder hidden states
      
      * whisper unique generation stuff
      
      * flake
      
      * use finfo for attention bias
      
      * docs
      
      * Update src/transformers/generation/flax_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * docs
      
      * add timestamp flax test
      
      * jit for timestamps
      
      * formatting
      
      * clean up timestamps processor
      
      * formatting
      
      * remove if_true
      
      * cleanup
      
      ---------
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      2840272c
  11. 16 Dec, 2022 1 commit
  12. 05 Dec, 2022 1 commit
  13. 08 Nov, 2022 1 commit
    • amyeroberts's avatar
      AutoImageProcessor (#20111) · 4eb918e6
      amyeroberts authored
      * AutoImageProcessor skeleton
      
      * Update references
      
      * Add mapping in init
      
      * Add model image processors to __init__ for importing
      
      * Add AutoImageProcessor tests
      
      * Fix up
      
      * Image Processor documentation
      
      * Remove pdb
      
      * Update docs/source/en/model_doc/mobilevit.mdx
      
      * Update docs
      
      * Don't add whitespace on json files
      
      * Remove fixtures
      
      * Move checking model config down
      
      * Fix up
      
      * Add check for image processor
      
      * Remove FeatureExtractorMixin in docstrings
      
      * Rename model_tmpfile to config_tmpfile
      
      * Don't make None if not in image processor map
      4eb918e6
  14. 12 Oct, 2022 1 commit
  15. 07 Oct, 2022 1 commit
    • Amrit Sahu's avatar
      [WIP] Add ZeroShotObjectDetectionPipeline (#18445) (#18930) · e9a49bab
      Amrit Sahu authored
      * Add ZeroShotObjectDetectionPipeline (#18445)
      
      * Add AutoModelForZeroShotObjectDetection task
      
      This commit also adds the following
      
      - Add explicit _processor method for ZeroShotObjectDetectionPipeline.
        This is necessary as pipelines don't auto infer processors yet and
        `OwlVitProcessor` wraps tokenizer and feature_extractor together, to
        process multiple images at once
      
      - Add auto tests and other tests for ZeroShotObjectDetectionPipeline
      
      * Add AutoModelForZeroShotObjectDetection task
      
      This commit also adds the following
      
      - Add explicit _processor method for ZeroShotObjectDetectionPipeline.
        This is necessary as pipelines don't auto infer processors yet and
        `OwlVitProcessor` wraps tokenizer and feature_extractor together, to
        process multiple images at once
      
      - Add auto tests and other tests for ZeroShotObjectDetectionPipeline
      
      * Add batching for ZeroShotObjectDetectionPipeline
      
      * Fix doc-string ZeroShotObjectDetectionPipeline
      
      * Fix output format: ZeroShotObjectDetectionPipeline
      e9a49bab
  16. 07 Sep, 2022 1 commit
    • 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
  17. 12 Aug, 2022 1 commit
  18. 04 Aug, 2022 1 commit
    • 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
  19. 13 Jun, 2022 1 commit
  20. 09 May, 2022 1 commit
    • Manan Dey's avatar
      add `mobilebert` onnx configs (#17029) · dc3645dc
      Manan Dey authored
      * update docs of length_penalty
      
      * Revert "update docs of length_penalty"
      
      This reverts commit 466bf4800b75ec29bd2ff75bad8e8973bd98d01c.
      
      * add mobilebert onnx config
      
      * address suggestions
      
      * Update auto.mdx
      
      * Update __init__.py
      
      * Update features.py
      dc3645dc
  21. 04 Apr, 2022 1 commit
  22. 04 Mar, 2022 1 commit
  23. 17 Feb, 2022 1 commit
    • NielsRogge's avatar
      Add SimMIM (#15586) · 57882177
      NielsRogge authored
      
      
      * Add first draft
      
      * Make model importable
      
      * Make SwinForMaskedImageModeling importable
      
      * Fix imports
      
      * Add missing inits
      
      * Add support for Swin
      
      * Fix bug
      
      * Fix bug
      
      * Fix another bug
      
      * Fix Swin MIM implementation
      
      * Fix default encoder stride
      
      * Fix Swin
      
      * Add print statements for debugging
      
      * Add image_size data argument
      
      * Fix Swin
      
      * Fix image_size
      
      * Add print statements for debugging
      
      * Fix print statement
      
      * Remove print statements
      
      * Improve reshaping of bool_masked_pos
      
      * Add support for DeiT, fix tests
      
      * Improve docstrings
      
      * Apply new black version
      
      * Improve script
      
      * Fix bug
      
      * Improve README
      
      * Apply suggestions from code review
      
      * Remove DS_Store and add to gitignore
      
      * Apply suggestions from code review + fix BEiT Flax
      
      * Revert BEiT changes
      
      * Improve README
      
      * Fix code quality
      
      * Improve README
      Co-authored-by: default avatarNiels Rogge <nielsrogge@Nielss-MBP.localdomain>
      Co-authored-by: default avatarNiels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
      57882177
  24. 08 Feb, 2022 1 commit
    • Joao Gante's avatar
      Add TFSpeech2Text (#15113) · 8406fa6d
      Joao Gante authored
      * Add wrapper classes
      
      * convert inner layers to tf
      
      * Add TF Encoder and Decoder layers
      
      * TFSpeech2Text models
      
      * Loadable model
      
      * TF model with same outputs as PT model
      
      * test skeleton
      
      * correct tests and run the fixup
      
      * correct attention expansion
      
      * TFSpeech2Text pask_key_values with TF format
      8406fa6d
  25. 04 Feb, 2022 1 commit
  26. 10 Jan, 2022 1 commit
    • Yih-Dar's avatar
      Add TFVisionEncoderDecoderModel (#14148) · b67fd797
      Yih-Dar authored
      
      
      * Start the work on TFVisionEncoderDecoderModel
      
      * Expose TFVisionEncoderDecoderModel
      
      * fix import
      
      * Add modeling_tf_vision_encoder_decoder to _ignore_modules in get_model_modules()
      
      * reorder
      
      * Apply the fix for checkpoint loading as in #14016
      
      * remove attention_mask + fix VISION_DUMMY_INPUTS
      
      * A minimal change to make TF generate() work for vision models as encoder in encoder-decoder setting
      
      * fix wrong condition: shape_list(input_ids) == 2
      
      * add tests
      
      * use personal TFViTModel checkpoint (for now)
      
      * Add equivalence tests + projection layer
      
      * style
      
      * make sure projection layer can run
      
      * Add examples
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Clean comments (need to work on TODOs for PyTorch models)
      
      * Remove TF -> PT in check_pt_tf_equivalence for TFVisionEncoderDecoderModel
      
      * fixes
      
      * Revert changes in PT code.
      
      * Update tests/test_modeling_tf_vision_encoder_decoder.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Add test_inference_coco_en for TF test
      
      * fix quality
      
      * fix name
      
      * build doc
      
      * add main_input_name
      
      * Fix ckpt name in test
      
      * fix diff between master and this PR
      
      * fix doc
      
      * fix style and quality
      
      * fix missing doc
      
      * fix labels handling
      
      * Delete auto.rst
      
      * Add the changes done in #14016
      
      * fix prefix
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * make style
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      b67fd797
  27. 28 Dec, 2021 1 commit
  28. 27 Dec, 2021 1 commit