Partho
96f243c399
[Doctest] LeViT Config for doctest ( #19622 )
2022-10-14 17:21:24 +02:00
Jing Hua
78c1e7d253
xlm roberta xl config for doctest ( #19610 )
...
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-10-14 11:04:10 -04:00
Jing Hua
10ea45b902
Ernie config for doctest ( #19611 )
2022-10-14 10:57:51 -04:00
Jing Hua
637af90d7f
xlm roberta config for doctest ( #19609 )
2022-10-14 10:48:38 -04:00
Jing Hua
f8244014a5
Visual Bert config for doctest ( #19605 )
2022-10-14 10:45:37 -04:00
NielsRogge
4f0337a08f
[Time Series Transformer] Add doc tests ( #19607 )
...
* Add doc tests
* Make it more consistent
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-10-14 15:57:03 +02:00
Xabier Lahuerta Vazquez
909f07092a
[Doctest] Add configuration_bigbird_pegasus.py
and configuration_big_bird.py
( #19606 )
...
* [Doctest] Add `configuration_bigbird_pegasus.py` and `configuration_big_bird`
[Doctest] Re-style `configuration_big_bird.py`
* [Doctest] One python instruction per line
* [Doctest] Fix styling
* [Doctest] More styling fixes
2022-10-14 15:17:36 +02:00
RamitPahwa
7036c956fe
[Doctest] fix doc test for megatron bert ( #19600 )
2022-10-14 12:08:55 +02:00
Partho
c7d1fb6964
[Doctest] SEW-D Config for doctest ( #19598 )
2022-10-14 12:07:32 +02:00
Partho
0ac6b90563
[Doctest] UniSpeech Config for doctest ( #19596 )
2022-10-14 12:03:35 +02:00
Partho
71a27e3952
[Doctest] SEW Config for doctest ( #19597 )
2022-10-14 11:47:29 +02:00
Partho
e64798296f
[Doctest] Swin Config for doctest ( #19594 )
2022-10-14 11:37:37 +02:00
Partho
7178b29a8e
[Doctest] Swin V2 Config for doctest ( #19595 )
2022-10-14 11:16:38 +02:00
KaranGarg
76b4239ec8
[Doctests] add configuration_blenderbot_small.py
( #19589 )
...
* yoso config for doctest
* Revert "yoso config for doctest"
This reverts commit eae128d6f1
.
* add configurations_blenderbot_small.py for doctests
2022-10-14 09:42:29 +02:00
Sujay
3d320c78c3
[Doctest] adds trajectory_transformer config to Docs test ( #19586 )
2022-10-13 19:07:10 +02:00
KaranGarg
1f6a28c71c
[Doctests] add configuration_blenderbot.py
( #19577 )
...
* yoso config for doctest
* Revert "yoso config for doctest"
This reverts commit eae128d6f1
.
* add configurations.blenderbot.py for doctests
* add configuration.blenderbot for doctest
2022-10-13 18:46:12 +02:00
KaranGarg
7180e17256
[Doctests] Config files for ViTMAE
and YOSO
( #19567 )
2022-10-13 15:05:02 +02:00
Isaac Omolayo
05a287ec1a
[Doctest] Add configuration_canine.py ( #19575 )
2022-10-13 14:12:49 +02:00
imarekkus
117098421c
[Doctest] CTRL config ( #19574 )
2022-10-13 14:10:04 +02:00
imarekkus
0903fc80b5
[Doctest] bloom config update ( #19566 )
2022-10-13 12:14:38 +02:00
Partho
0ae3ec5b9d
[Doctest] Add configuration_vit.py
( #19561 )
...
* ViT Config for doctest
2022-10-13 12:07:14 +02:00
Partho
f173ceefc0
[Doctest] RoBERTa Config for doctest ( #19563 )
2022-10-13 12:06:18 +02:00
Partho
2719599a22
[Doctest] Reformer Config for doctest ( #19562 )
2022-10-13 12:03:15 +02:00
Partho
4a3578f23f
[Doctest] DeiT Config for doctest ( #19560 )
2022-10-13 12:02:40 +02:00
Vishwas
f4b386765d
[Doctest] Fixing doctest bert_generation configuration ( #19558 )
...
* Added (with random weights) in the comment before model initialization line
* Added configuration_bert_generation.py to utils/documentation_tests.txt
Co-authored-by: vishwaspai <vishwas.pai@emplay.net>
2022-10-13 11:59:02 +02:00
RamitPahwa
1d4d9dc3c9
[Doctest] Fixing mobile bert configuration doctest ( #19557 )
...
* Fixing mobile bert configuration doctest
* Fixed build failures by removing empty line
2022-10-13 11:56:35 +02:00
RamitPahwa
3ae21936e5
[Doctest] Fixing the Doctest for imageGPT config ( #19556 )
2022-10-13 11:54:35 +02:00
Partho
ef5899bf34
[Doctest] GPT2 Config for doctest ( #19549 )
2022-10-13 05:58:59 +02:00
Partho
6cd8676cf3
[Doctest] Beit Config for doctest ( #19542 )
2022-10-12 20:38:13 +02:00
Partho
383ad81e68
[Doctest] Add configuration_whisper.py
( #19540 )
...
* Whisper Config for doctest
* restyle fix
2022-10-12 14:03:22 -04:00
imarekkus
4a5d63c958
Albert config update ( #19541 )
2022-10-12 14:02:55 -04:00
Partho
51d21b7619
[Doctest] Add configuration_yolos.py
( #19539 )
...
* YOLOS Config for doctest
* fix
2022-10-12 14:01:25 -04:00
NielsRogge
9e29080439
[X-CLIP] Fix doc tests ( #19523 )
...
* Fix XCLIP doc tests
* Add model to doc test list
* Fix tests
2022-10-12 17:05:12 +02:00
imarekkus
3ccda6d0b0
[Doctest] Bart configuration update ( #19524 )
...
* Update configuration_bart.py
* Update documentation_tests.txt
* Update documentation_tests.txt
Putting this line in a sorted order
2022-10-12 15:11:46 +02:00
NielsRogge
4d367a3c81
Add LiLT ( #19450 )
...
* First draft
* Fix more things
* Improve more things
* Remove some head models
* Fix more things
* Add missing layers
* Remove tokenizer
* Fix more things
* Fix copied from statements
* Make all tests pass
* Remove print statements
* Remove files
* Fix README and docs
* Add integration test and fix organization
* Add tips
* Apply suggestions from code review
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Make tests faster, improve docs
* Fix doc tests
* Add model to toctree
* Add docs
* Add note about creating new checkpoint
* Remove is_decoder
* Make tests smaller, add docs
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-10-12 10:11:20 +02:00
Yih-Dar
e2dc558e9c
[Doctest] Add configuration_bert.py
to doctest ( #19485 )
...
* BertConfig for doctest
* Change import order
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-12 09:44:07 +02:00
amyeroberts
e3f028f3af
Add TF whisper ( #19378 )
...
* simplify loop
* add featur extractor
* add model
* start conversion
* add dropout
* initial commit of test files
* copnversion for all models
* update processor for correct padding
* update feature extraction
* update integration test logits match
* fmnt: off for the logits
* on the fly mel bank
* small nit
* update test
* update tokenizer
* nit feature extraction
* update
* update tokenizer test
* adds logit processor and update tokenizer to get supress tokens
* style
* clean convert
* revert to original modeling tf utils
* Update
* update
* nit
* clean convert file
* update tests and nits
* quality
* slow generation test
* ffn_dim to allow customization
* update readme
* add to toctreee
* start fixing integration tests
* update tests and code
* fix feature extractor
* fix config tests common
* update code to fix tests
* fix feature exctractor
* nit feature extraction
* update test for new feature extractor
* style
* add absrtact
* large logits wioth custom decoder input ids
* wraap around is otrch available
* fix feature extractor
* correct logits for whisper small.en
* nit
* fix encoder_attentino_mask
* some fixes
* remove unnecessary inputs
* nits
* add normalizer file
* update etst tokenization
* fix attention mask not defined
* fix generate
* remove uncoder attention mask useless
* update test modeling whisper
* update condfig to add second non supress tokens
* nits on feature exrtactor
* nit for test tokenizers
* update etsts
* update tests
* update tokenization test
* fixup
* invalidated hf token. Clean convert openai to whisper
* fix logit tests
* fixup
* Add model to README
* Fix doc tests
* clean merge
* revert toc_tree changes
* remove useless LogitProcessor
* Update whisper .mdx
* update config file doc
* update configuration docstring
* update test tokenization
* update test tokenization
* update tokenization whisper
Added copied from where needed
* update feature extraction
* nit test name
* style
* quality
* remove get suppress tokens and update non_speech tokens global variables
* Update src/transformers/models/whisper/feature_extraction_whisper.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* clean modeling whisper and test
Removed the attention mask arguments that are deprecated
* fix large test
* Add multilingual audio test, and translate test
* style
* fix larg multilingual test
* nits
* add copied from for attention layer
* remove attention masks in doc
* add english normalizer
* Update docs/source/en/model_doc/whisper.mdx
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* update tokenization test
* remove copied from in whisper attention : no bias in k_proj only
* wrap around dependencies in english normalizer
* style
* correct import generation logits
* for now, wrap feature extractor with torch
* remove torch depencies for feature extraction and style
* Update src/transformers/models/whisper/convert_openai_whisper_to_tfms.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/whisper/configuration_whisper.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/en/model_doc/whisper.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fixup
* nit
* update logitds
* style
* nit
* nits and fix final tests
* add `is_more_itertools_available` to utils
* quality
* add begin supress tokens, supress tokens to generate args and config
* clean supressTokensLogitProcessor in generation logits
* Nit naming
* add supressTokensAtBegin
* udpate tests, supress tokens to None or correct values
* nit and style
* update RAG to fit test and generate_logit
* add copy pasted statment on english normalizer
* add arguments to config_common_kwargs
* Update src/transformers/generation_utils.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/generation_logits_process.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* revert changes based on reviews
* update doc and nits
* Update src/transformers/models/whisper/configuration_whisper.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* more nits
* last nits
* update test configuration common
* add BART name in decoder attention mask documentation
* Update src/transformers/models/whisper/modeling_whisper.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* style
* nit
* nit
* add english.json file to git
* nits on documentation
* nit
* nits
* last styling
* add main toctree file
* remove sentence piece dependency
* clean init file
* fix tokenizer that has no dependencies on sentencepiece
* update whisper init file, nit
* remove english.json file
* add get decoder prompt id
* All weights loading
* Remove hanging pdb
* Fixup and tidy up
* Use same copied from as PT model
* Remove whitespace changes
* Remove torch references
* Tie embeddings
* Remove logits processor input to generate
* Update logit values
* revert changes and add forced logit processor
* nit
* clean normalizer
* remove protected
* Add logit processors and update generation code & tests
* Some tidy up
* Update docstring
* update
* update based on review
* Update src/transformers/models/whisper/configuration_whisper.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/whisper/configuration_whisper.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update to reflect changes on the PT model branch
* Tidy up
* Remove extra whitespace
* Fix test - make input ids small enough we can append
* Include upstream changes on main
* PR comments - add batch tests, remove comments & defaults
* Fix model output imports
* Update src/transformers/models/whisper/modeling_tf_whisper.py
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
* Update src/transformers/generation_tf_logits_process.py
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
* Update src/transformers/models/whisper/modeling_tf_whisper.py
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
* Update src/transformers/models/whisper/modeling_tf_whisper.py
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
* Update tests/models/whisper/test_modeling_tf_whisper.py
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
* Update src/transformers/models/whisper/modeling_tf_whisper.py
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
* Update src/transformers/models/whisper/modeling_tf_whisper.py
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
* Update docstring example
* Update src/transformers/models/whisper/modeling_tf_whisper.py
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
* Remove changes to adjust_logits_during_generation function
* Update src/transformers/models/whisper/modeling_tf_whisper.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Tidy up imports that don't require TF
* Update tests - skip and no more skip
* Update tests/generation/test_generation_tf_logits_process.py
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
* Update src/transformers/models/whisper/modeling_tf_whisper.py
* Update src/transformers/models/whisper/modeling_tf_whisper.py
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
* Add training flags
* Add (skipped) XLA generation tests
* Add embedding correctness test
* Add constant ids for generation tests
* Make logits finding a bit tidier
* Remove unused args
* xla generation enabled
* Don't skip XLA tests anymore
* Fix tests - add position ids to expected signature and update rag generation
* Undo method reorder
* Remove added whitespace
* Remove copy-paste gradient checkopint ref
* Remove
* Trigger CI - (issue with refs when pulling)
Co-authored-by: Arthur Zucker <arthur.zucker@gmail.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: NielsRogge <niels.rogge1@gmail.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
Co-authored-by: Joao Gante <joao@huggingface.co>
2022-10-10 14:48:17 +01:00
Arthur
45e14038f2
Add WhisperModel to transformers ( #19166 )
...
* simplify loop
* add featur extractor
* add model
* start conversion
* add dropout
* initial commit of test files
* copnversion for all models
* update processor for correct padding
* update feature extraction
* update integration test logits match
* fmnt: off for the logits
* on the fly mel bank
* small nit
* update test
* update tokenizer
* nit feature extraction
* update
* update tokenizer test
* adds logit processor and update tokenizer to get supress tokens
* style
* clean convert
* revert to original modeling tf utils
* Update
* update
* nit
* clean convert file
* update tests and nits
* quality
* slow generation test
* ffn_dim to allow customization
* update readme
* add to toctreee
* start fixing integration tests
* update tests and code
* fix feature extractor
* fix config tests common
* update code to fix tests
* fix feature exctractor
* nit feature extraction
* update test for new feature extractor
* style
* add absrtact
* large logits wioth custom decoder input ids
* wraap around is otrch available
* fix feature extractor
* correct logits for whisper small.en
* nit
* fix encoder_attentino_mask
* some fixes
* remove unnecessary inputs
* nits
* add normalizer file
* update etst tokenization
* fix attention mask not defined
* Add model to README
* Fix doc tests
* fix generate
* remove uncoder attention mask useless
* update test modeling whisper
* update condfig to add second non supress tokens
* nits on feature exrtactor
* nit for test tokenizers
* update etsts
* update tests
* update tokenization test
* fixup
* invalidated hf token. Clean convert openai to whisper
* fix logit tests
* fixup
* clean merge
* revert toc_tree changes
* remove useless LogitProcessor
* Update whisper .mdx
* update config file doc
* update configuration docstring
* update test tokenization
* update test tokenization
* update tokenization whisper
Added copied from where needed
* update feature extraction
* nit test name
* style
* quality
* remove get suppress tokens and update non_speech tokens global variables
* Update src/transformers/models/whisper/feature_extraction_whisper.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* clean modeling whisper and test
Removed the attention mask arguments that are deprecated
* fix large test
* Add multilingual audio test, and translate test
* style
* fix larg multilingual test
* nits
* Update docs/source/en/model_doc/whisper.mdx
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* add copied from for attention layer
* remove attention masks in doc
* add english normalizer
* update tokenization test
* remove copied from in whisper attention : no bias in k_proj only
* wrap around dependencies in english normalizer
* style
* correct import generation logits
* for now, wrap feature extractor with torch
* Update src/transformers/models/whisper/convert_openai_whisper_to_tfms.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/whisper/configuration_whisper.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/en/model_doc/whisper.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* remove torch depencies for feature extraction and style
* fixup
* nit
* update logitds
* style
* nit
* nits and fix final tests
* add `is_more_itertools_available` to utils
* quality
* add begin supress tokens, supress tokens to generate args and config
* clean supressTokensLogitProcessor in generation logits
* Nit naming
* add supressTokensAtBegin
* udpate tests, supress tokens to None or correct values
* nit and style
* update RAG to fit test and generate_logit
* add copy pasted statment on english normalizer
* add arguments to config_common_kwargs
* Update src/transformers/generation_utils.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/generation_logits_process.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/whisper/configuration_whisper.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* revert changes based on reviews
* update doc and nits
* more nits
* last nits
* update test configuration common
* add BART name in decoder attention mask documentation
* Update src/transformers/models/whisper/modeling_whisper.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* style
* nit
* nit
* add english.json file to git
* nits on documentation
* nit
* nits
* last styling
* add main toctree file
* remove sentence piece dependency
* clean init file
* fix tokenizer that has no dependencies on sentencepiece
* update whisper init file, nit
* remove english.json file
* add get decoder prompt id
* revert changes and add forced logit processor
* nit
* clean normalizer
* remove protected
* update
* Update src/transformers/models/whisper/configuration_whisper.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* update based on review
* Update src/transformers/models/whisper/configuration_whisper.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* add batched tests
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: NielsRogge <niels.rogge1@gmail.com>
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-10-05 22:28:31 +02:00
NielsRogge
f3d2f7a6e0
Add MarkupLM ( #19198 )
...
* 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: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
Co-authored-by: lockon-n <45759388+lockon-n@users.noreply.github.com>
Co-authored-by: SaulLu <lucilesaul.com@gmail.com>
Co-authored-by: lockon-n <dd098309@126.com>
2022-09-30 08:25:43 +02:00
Aritra Roy Gosthipaty
0dc7b3a785
[TensorFlow] Adding GroupViT ( #18020 )
...
* 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: ydshieh <ydshieh@users.noreply.github.com>
2022-09-29 10:48:04 +01:00
Steven Anton
49bf569830
Add doctests to Perceiver examples ( #19129 )
...
* Fix bug in example and add to tests
* Fix failing tests
* Check the size of logits
* Code style
* Try again...
* Add expected loss for PerceiverForMaskedLM doctest
Co-authored-by: Steven Anton <antonstv@amazon.com>
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-23 19:19:35 +02:00
NielsRogge
cf6308ef9b
Improve conditional detr docs ( #19154 )
...
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-09-22 13:21:05 +02:00
Sayak Paul
2d9853b226
MSN (Masked Siamese Networks) for ViT ( #18815 )
...
* feat: modeling and conversion scripts for msn.
* chore: change license year.
* chore: remove unneeded modules.
* feat: direct loading of state_dict from remote url.
* fix: import paths.
* add: rest of the files.
* add and fix rest of the files.
Co-authored-by: Niels <niels.rogge1@gmail.com>
* chore: formatting.
* code quality fix.
* chore: remove pooler.
* feat: add classification top.
* fix: configuration object.
* add: initial test cases (one failing).
* fix: basemodeloutput.
* add: caution on using the classification head.
* add: rest of the model related files.
* add: vit msn readme.
* fix: copied from statement.
* fix: dummy objects.
* add: ViTMSNPreTrainedModel to inits.
* fix: repo consistency.
* minor change in the model doc.
* fix: tests.
* Empty-Commit
* Update src/transformers/models/vit_msn/configuration_vit_msn.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* address PR comments.
* Update src/transformers/models/vit_msn/modeling_vit_msn.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* chore: put model in no_grad() and formatting.
Co-authored-by: Niels <niels.rogge1@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2022-09-22 07:15:03 -04:00
NielsRogge
59407bbeb3
Add Deformable DETR ( #17281 )
...
* 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: Nicolas Patry <patry.nicolas@protonmail.com>
Co-authored-by: Nouamane Tazi <nouamane98@gmail.com>
Co-authored-by: Sylvain Gugger <Sylvain.gugger@gmail.com>
2022-09-14 11:45:21 +02:00
Sayak Paul
954e18ab97
TensorFlow MobileViT ( #18555 )
...
* initial implementation.
* add: working model till image classification.
* add: initial implementation that passes intg tests.
Co-authored-by: Amy <aeroberts4444@gmail.com>
* chore: formatting.
* add: tests (still breaking because of config mismatch).
Coo-authored-by: Yih <2521628+ydshieh@users.noreply.github.com>
* add: corrected tests and remaning changes.
* fix code style and repo consistency.
* address PR comments.
* address Amy's comments.
* chore: remove from_pt argument.
* chore: add full-stop.
* fix: TFLite model conversion in the doc.
* Update src/transformers/models/mobilevit/modeling_tf_mobilevit.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/mobilevit/modeling_tf_mobilevit.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/mobilevit/modeling_tf_mobilevit.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/mobilevit/modeling_tf_mobilevit.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/mobilevit/modeling_tf_mobilevit.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* apply formatting.
* chore: remove comments from the example block.
* remove identation in the example.
Co-authored-by: Amy <aeroberts4444@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-09-01 10:35:15 -04:00
Ankur Goyal
5c4c869014
Add LayoutLMForQuestionAnswering model ( #18407 )
...
* Add LayoutLMForQuestionAnswering model
* Fix output
* Remove TF TODOs
* Add test cases
* Add docs
* TF implementation
* Fix PT/TF equivalence
* Fix loss
* make fixup
* Fix up documentation code examples
* Fix up documentation examples + test them
* Remove LayoutLMForQuestionAnswering from the auto mapping
* Docstrings
* Add better docstrings
* Undo whitespace changes
* Update tokenizers in comments
* Fixup code and remove `from_pt=True`
* Fix tests
* Revert some unexpected docstring changes
* Fix tests by overriding _prepare_for_class
Co-authored-by: Ankur Goyal <ankur@impira.com>
2022-08-31 10:05:33 +02:00
Dan Tegzes
5727dfcebe
Added Docstrings for Deberta and DebertaV2 [PyTorch] ( #18610 )
...
* Added Doctest for Deberta Pytorch
* Added path in documentation test file
* Added docstrings for DebertaV2
* Revert "Added docstrings for DebertaV2"
This reverts commit 307185e62a
.
* Added DebertaV2 Docstrings
2022-08-30 14:46:21 +02:00
Christoffer Koo Øhrstrøm
de8548ebf3
[LayoutLMv3] Add TensorFlow implementation ( #18678 )
...
Co-authored-by: Esben Toke Christensen <esben.christensen@visma.com>
Co-authored-by: Lasse Reedtz <lasse.reedtz@visma.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
2022-08-30 11:48:11 +01:00
NielsRogge
2ab790e82d
Add Donut ( #18488 )
...
* First draft
* Improve script
* Update script
* Make conversion work
* Add final_layer_norm attribute to Swin's config
* Add DonutProcessor
* Convert more models
* Improve feature extractor and convert base models
* Fix bug
* Improve integration tests
* Improve integration tests and add model to README
* Add doc test
* Add feature extractor to docs
* Fix integration tests
* Remove register_buffer
* Fix toctree and add missing attribute
* Add DonutSwin
* Make conversion script work
* Improve conversion script
* Address comment
* Fix bug
* Fix another bug
* Remove deprecated method from docs
* Make Swin and Swinv2 untouched
* Fix code examples
* Fix processor
* Update model_type to donut-swin
* Add feature extractor tests, add token2json method, improve feature extractor
* Fix failing tests, remove integration test
* Add do_thumbnail for consistency
* Improve code examples
* Add code example for document parsing
* Add DonutSwin to MODEL_NAMES_MAPPING
* Add model to appropriate place in toctree
* Update namespace to appropriate organization
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-08-12 16:40:58 +02:00
NielsRogge
82bb682643
[VideoMAE] Add model to doc tests ( #18523 )
...
* Add videomae to doc tests
* Add pip install decord
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-08-08 19:28:51 +02:00