* 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>
* add a warning=True tip to the Llama2 doc
* code llama needs a tip too
* doc nit
* build PR doc
* doc nits
Co-authored-by: Lysandre <lysandre@huggingface.co>
---------
Co-authored-by: Lysandre <lysandre@huggingface.co>
* add all
* Revert "Delete .github directory"
This reverts commit 9b0ff7b052e2b20b629a26fb13606b78a42944d1.
* make conversion script backward compatible
* fixup
* more styling
* copy to llama changes
* fix repo consistency
* nits
* document correct classes
* updates
* more fixes
* nits
* update auto mappings
* add readmes
* smallupdates
* llama-code replace with llama_code
* make fixup
* updates to the testsing suite
* fix fast nits
* more small fixes
* fix decode
* fix template processing
* properly reset the normalizer
* nits processor
* tokenization tests pass
* styling
* last tests
* additional nits
* one test is left
* nits
Co-authored-by faabian <faabian@users.noreply.github.com>
* update failing test
* fixup
* remove decode infilling users should handle it on their onw after generation, padding can be a problem
* update
* make test slow and more meaningfull
* fixup
* doc update
* fixup
* Apply suggestions from code review
* add kwargs doc
* tokenizer requires `requires_backend`
* type requires_backends
* CodeLlama instead of LlamaCode
* more name cahnges
* nits
* make doctests happy
* small pipeline nits
* last nit
* Apply suggestions from code review
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* update
* add codellama to toctree
---------
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* fix a typo in docsting
* Update src/transformers/modeling_utils.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
---------
Co-authored-by: statelesshz <jihuazhong1@huawei.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Correct attention mask dtype
* reformat code
* add a test for boolean mask
* convert test to fast test
* delete unwanted print
* use assertTrue for testing
* Add missing type hints for ErnieM family
* Add missing type hints for EsmForProteinFolding model
* Add missing type hints for Graphormer model
* Add type hints for InstructBlipQFormer model
* Add missing type hints for LayoutLMForMaskedLM model
* Add missing type hints for LukeForEntitySpanClassification model