* Smarter check for
* Use protected functions
* Do others too
* Apply suggestions from code review
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Address review comments
---------
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Add type hints to `TFBlipTextModel`
* Add missing type hints to DPR family models
* Add type hints to `TFLEDModel`
* Add type hints to `TFLxmertForPreTraining`
* Add missing type hints to `TFMarianMTModel` and `TFMarianModel`
* Add missing type hints to `TFRagModel` & `TFRagTokenForGeneration`
* Make type hints annotations consistent
* pad token should be None by default
* fix tests
* nits
* check if isfile vocabfile
* add warning if sp model folder was deleted
* save SPM when missing folder for sloz
* update the ` can_save_slow_tokenizer` to be a property
* first batch
* second batch
* missing one
* Modify single-GPU efficient training doc with now-available adamw_bnb_8bit optimizer
* Apply suggestions from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* Add Blip2 model in VQA pipeline
* use require_torch_gpu for test_large_model_pt_blip2
* use can_generate in vqa pipeline
* test Blip2ForConditionalGeneration using float16
* remove custom can_generate from Blip2ForConditionalGeneration
* Update trainer.py (error with checking steps in args.eval_accumulation_steps to gather tensors)
While the deprecated code has the correct check (line 3772):
"if args.eval_accumulation_steps is not None and (step + 1) % args.eval_accumulation_steps == 0:"
The current code does not (line 3196):
"if args.eval_accumulation_steps is not None and self.accelerator.sync_gradients:"
We need to check "(step + 1) % args.eval_accumulation_steps == 0". Hence, the line 3196 should be modified to:
"if args.eval_accumulation_steps is not None and (step + 1) % args.eval_accumulation_steps == 0 and self.accelerator.sync_gradients:"
* Fix error with checking args.eval_accumulation_steps to gather tensors
* fix warning triggering for xglm.embed_positions
* Make TF variable a tf.constant to match (and fix some spelling)
---------
Co-authored-by: Matt <rocketknight1@gmail.com>
* return when length is zero
* Add tests
Co-authored-by: Avnish Narayan <38871737avnishn@users.noreply.github.com>
* Co-authored-by: avnishn
<38871737+avnishn@users.noreply.github.com>
* codeLlama doc should not be on Main
* update test
---------
Co-authored-by: Avnish Narayan <38871737avnishn@users.noreply.github.com>
* fixing name position_embeddings to object_queries
* [fix] renaming variable and docstring do object queries
* [fix] comment position_embedding to object queries
* [feat] changes from make-fix-copies to keep consistency
* Revert "[feat] changes from make-fix-copies to keep consistency"
This reverts commit 56e3e9ede1.
* [tests] fix wrong expected score
* [fix] wrong assignment causing wrong tensor shapes
* [fix] fixing position_embeddings to object queries to keep consistency (make fix copies)
* [fix] make fix copies, renaming position_embeddings to object_queries
* [fix] positional_embeddingss to object queries, fixes from make fix copies
* [fix] comments frmo make fix copies
* [fix] adding args validation to keep version support
* [fix] adding args validation to keep version support -conditional detr
* [fix] adding args validation to keep version support - maskformer
* [style] make fixup style fixes
* [feat] adding args checking
* [feat] fixcopies and args checking
* make fixup
* make fixup
---------
Co-authored-by: Lorenzobattistela <lorenzobattistela@gmail.com>
* Add type hints for MGP STR model
* Add missing type hints for plbart model
* Add type hints for Pix2struct model
* Add missing type hints to Rag model and tweak the docstring
* Add missing type hints to Sam model
* Add missing type hints to Swin2sr model
* Fix a type hint for Pix2StructTextModel
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
* Fix typo on Rag model docstring
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
* Fix linter
---------
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
* Add type hints for table_transformer
* Add type hints to Timesformer model
* Add type hints to Timm Backbone model
* Add type hints to TVLT family models
* Add type hints to Vivit family models
* Use the typing instance instead of the python builtin.
* Fix the `replace_return_docstrings` decorator for Vivit model
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
---------
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
* Add missing type hint to cpmant
* Add type hints to decision_transformer model
* Add type hints to deformable_detr models
* Add type hints to detr models
* Add type hints to deta models
* Add type hints to dpr models
* Update attention mask type hint
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
* Update remaining attention masks type hints
* Update docstrings' type hints related to attention masks
---------
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>