amyeroberts
a95fd35426
Vision processors - replace FE with IPs ( #20590 )
...
* Replace FE references with IPs
* Update processor tests
* Update src/transformers/models/clip/processing_clip.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/clip/processing_clip.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update warning messages v4.27 -> v5
* Fixup
* Update Chinese CLIP processor
* Add feature_extractor property
* Add attributes
* Add tests
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-12-09 10:48:34 +00:00
Yih-Dar
704027f0ef
skip test_multi_gpu_data_parallel_forward
for MaskFormerSwinModelTest
( #20688 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-09 11:10:00 +01:00
Michael Benayoun
6a062a3ed9
Change transformers.onnx to use optimum.exporters.onnx ( #20529 )
...
* Change transformers.onnx to use optimum.exporters.onnx
* Update doc
* Remove print
* Fix transformers.onnx cli
* Update documentation
* Update documentation
* Small fixes
* Fix log message
* Apply suggestions
* Update src/transformers/onnx/__main__.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Apply suggestions
* Add missing line break
* Ran make fix-copies
* Update src/transformers/onnx/__main__.py
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
* Update src/transformers/onnx/__main__.py
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
Co-authored-by: Michael Benayoun <michael@huggingface.co>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
2022-12-09 10:42:02 +01:00
NielsRogge
9a6c6ef97f
[Backbones] Improve out features ( #20675 )
...
* Improve ResNet backbone
* Improve Bit backbone
* Improve docstrings
* Fix default stage
* Apply suggestions from code review
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-12-09 09:14:52 +01:00
Nathan Raw
9e56aff58a
Add video classification pipeline ( #20151 )
...
* 🚧 wip video classification pipeline
* 🚧 wip - add is_decord_available check
* 🐛 add missing import
* ✅ add tests
* 🔧 add decord to setup extras
* 🚧 add is_decord_available
* ✨ add video-classification pipeline
* 📝 add video classification pipe to docs
* 🐛 add missing VideoClassificationPipeline import
* 📌 add decord install in test runner
* ✅ fix url inputs to video-classification pipeline
* ✨ updates from review
* 📝 add video cls pipeline to docs
* 📝 add docstring
* 🔥 remove unused import
* 🔥 remove some code
* 📝 docfix
2022-12-08 16:22:43 -05:00
amyeroberts
c56ebbbea6
Add deprecation warning when image FE instantiated ( #20427 )
...
* Add deprecation warning when image FE instantiated
* Update src/transformers/models/beit/feature_extraction_beit.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update v2.7 -> v5 and add for new IPs
* Add message to Chinese CLIP
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-12-08 20:47:35 +00:00
IMvision12
183af58b11
Added missing test_tokenization_led
( #20568 )
...
* Create test_tokenization_led.py
* Update test_tokenization_led.py
* Update test_tokenization_led.py
* Update test_tokenization_led.py
* Update test_tokenization_led.py
* Update test_tokenization_led.py
* Update test_tokenization_led.py
* Update test_tokenization_led.py
* Update test_tokenization_led.py
2022-12-08 20:55:22 +01:00
amyeroberts
cf1b8c34cc
Fix donut image processor ( #20625 )
...
* fix donut image processor
* Update test values
* Apply lower bound on resizing size
* Add in missing size param
* Resolve resize channel_dimension bug
* Update src/transformers/image_transforms.py
2022-12-08 19:10:40 +00:00
Yih-Dar
e3cc4487fe
Fix CIs for PyTorch 1.13 ( #20686 )
...
* fix 1
* fix 2
* fix 3
* fix 4
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-08 18:51:54 +01:00
jeffhataws
bcc069ddb8
Enable bf16 option for XLA devices ( #20684 )
2022-12-08 12:34:40 -05:00
Younes Belkada
9858ecd706
[ViTHybrid
] Fix accelerate
slow tests ( #20679 )
...
* fix failing `accelerate` tests
* make fixup
* smaller values
* even lower
2022-12-08 17:39:32 +01:00
Sylvain Gugger
69038ce009
Whilelist Transformers private method in DummyObject ( #20681 )
2022-12-08 11:19:11 -05:00
Sylvain Gugger
9cc65f8701
Migrate torchdynamo to torch.compile ( #20634 )
...
* Migrate torchdynamo to torch.compile
* Add docstring and generic option
* Properly use the function...
* Reorg args
2022-12-08 11:18:52 -05:00
dependabot[bot]
da95f6ca4c
Bump certifi in /examples/research_projects/visual_bert ( #20673 )
...
Bumps [certifi](https://github.com/certifi/python-certifi ) from 2020.6.20 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases )
- [Commits](https://github.com/certifi/python-certifi/compare/2020.06.20...2022.12.07 )
---
updated-dependencies:
- dependency-name: certifi
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 11:15:42 -05:00
dependabot[bot]
efd7c021ee
Bump certifi in /examples/research_projects/decision_transformer ( #20677 )
...
Bumps [certifi](https://github.com/certifi/python-certifi ) from 2021.10.8 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases )
- [Commits](https://github.com/certifi/python-certifi/compare/2021.10.08...2022.12.07 )
---
updated-dependencies:
- dependency-name: certifi
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 11:15:11 -05:00
dependabot[bot]
9e33e19bf5
Bump certifi in /examples/research_projects/lxmert ( #20672 )
...
Bumps [certifi](https://github.com/certifi/python-certifi ) from 2020.6.20 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases )
- [Commits](https://github.com/certifi/python-certifi/compare/2020.06.20...2022.12.07 )
---
updated-dependencies:
- dependency-name: certifi
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 11:14:54 -05:00
Yih-Dar
6eae3f7801
Add BackboneMixin
( #20660 )
...
* add BackboneBaseModel
* add BackboneBaseModel
* Rename to BackboneMixin
* remove nn.Module
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-08 16:55:48 +01:00
Matt
be3d6c84cc
Fix expected values for TF-ESM tests ( #20680 )
2022-12-08 15:26:09 +00:00
Sylvain Gugger
c83703cbdb
Update the list of contributors to reflect current organization ( #20603 )
...
* Update the list of contributors to reflect current organization
* Proper indent
2022-12-08 10:05:43 -05:00
Sylvain Gugger
a03f7514db
Fix load from PT-formatted checkpoint in composite TF models ( #20661 )
...
* Fix load from PT-formatted checkpoint in composite TF models
* Leave the from_pt part as it was
2022-12-08 09:33:07 -05:00
Jingya HUANG
521da6518f
Fix gpt2 fp16 training when tracing is enabled ( #20656 )
...
* ONNX tracing fix
* Remove conditional
2022-12-08 08:55:59 -05:00
Younes Belkada
93b54368f5
[BiT
] Small patch fix ( #20657 )
...
* patch fix for `fp16`
* use `np` instead
2022-12-08 12:41:33 +01:00
Emmanuel Schmidbauer
0526a075c5
run_speech_recognition_seq2seq.py: add cache_dir param to dataset ( #20540 )
2022-12-07 18:23:16 +00:00
Cole Howard
fc95386ea1
Add TFBartForSequenceClassification ( #20570 )
...
* read to load
* base functionality
* revert init
* fix dummy data
* moving right along
* moving right along
* finally
* cleanup
* pull out comment
* add test
* update docstring for main class
* flake comments and rewriting copies from make repo-consistency`
* remove irrelevant differences/accidental spaces
* put copies back after space removals
* mid
* final test pass
* stray comment
* update test file
* update test file
* fixup
* black
* missed
* black missed one more
* sytle
* add doc update
* fix order of output class
* comment
* Revert "comment"
This reverts commit 03f86b6948
.
* remove redundant function, and redundant reshape
* move change out of common
* style
* put common spaces back
* reorder kwargs in output
* doc style
2022-12-07 18:05:39 +01:00
Sanchit Gandhi
77382e918d
[Whisper] Fix forced decoder ids ( #20652 )
...
* [Whisper] Fix forced decoder ids
* fix test
2022-12-07 16:44:13 +00:00
Younes Belkada
7c5eaf9e5a
Add dpt-hybrid
support ( #20645 )
...
* add `dpt-hybrid` support
* refactor
* final changes, all tests pass
* final cleanups
* final changes
* Apply suggestions from code review
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* fix docstring
* fix typo
* change `vit_hybrid` to `hybrid`
* replace dataclass
* add docstring
* move dataclasses
* fix test
* add `PretrainedConfig` support for `backbone_config`
* fix docstring
* Apply suggestions from code review
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* remove `embedding_type` and replace it by `is_hybrid`
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-12-07 17:01:55 +01:00
Julian Mack
3ac040bca1
Updated Trainer args typing ( #20655 )
2022-12-07 09:57:39 -05:00
xloem
3994c04585
Speed up git-lfs detection on error ( #20641 )
...
Prevent read and discard of entire checkpoint file.
2022-12-07 09:51:02 -05:00
Yih-Dar
147fa37fb1
pin TF 2.11 in docker files ( #20642 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-07 15:46:48 +01:00
Yih-Dar
cec5f7abd1
Update summarization run_pipeline_test
( #20623 )
...
* update summarization run_pipeline_test
* update
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-07 15:46:12 +01:00
Younes Belkada
3e4c9e5c64
[ViTHybrid
] + [BiT
] cleaner __init__
( #20649 )
...
* cleaner `__init__`
* add docstring for `backbone_config`
2022-12-07 15:35:37 +01:00
Younes Belkada
aac7b0d232
[Trainer] add error when passing 8bit
models ( #20651 )
...
* add error when passing `8bit`models
* fix
* improve message
2022-12-07 15:30:56 +01:00
NielsRogge
d151a8c550
Add BiT + ViT hybrid ( #20550 )
...
* First draft
* More improvements
* Add backbone, first draft of ViT hybrid
* Add AutoBackbone
* More improvements
* Fix bug
* More improvements
* More improvements
* Convert ViT-hybrid
* More improvements
* add patch bit
* Fix style
* Improve code
* cleaned v1
* more cleaning
* more refactoring
* Improve models, add tests
* Add docs and tests
* Make more tests pass
* Improve default backbone config
* Update model_type
* Fix more tests
* Add more copied from statements
* More improvements
* Add push to hub to conversion scripts
* clean
* more cleanup
* clean
* replace to
* fix
* Update src/transformers/models/bit/configuration_bit.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fix base model prefix
* more cleaning
* get rid of stem
* clean
* replace flag
* Update src/transformers/models/bit/configuration_bit.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/bit/configuration_bit.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* add check
* another check
* fix for hybrid vit
* final fix
* update config
* fix class name
* fix `make fix-copies`
* remove `use_activation`
* Update src/transformers/models/bit/configuration_bit.py
* rm unneeded file
* Add BiT image processor
* rm unneeded file
* add doc
* Add image processor to conversion script
* Add ViTHybrid image processor
* Add resources
* Move bit to correct position
* Fix auto mapping
* Rename hybrid to Hybrid
* Fix name in toctree
* Fix READMEs'
* Improve config
* Simplify GroupNormActivation layer
* fix test + make style
* Improve config
* Apply suggestions from code review
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* remove comment
* remove comment
* replace
* replace
* remove all conv_layer
* refactor norm_layer
* revert x
* add copied from
* last changes + integration tests
* make fixup
* Apply suggestions from code review
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* fix name
* fix message
* remove assert and refactor
* refactor + make fixup
* refactor - add + sfety checker
* fix docstring + checkpoint names
* fix merge issues
* fix function name
* fix copies
* Apply suggestions from code review
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* fix model checkpoint
* fix doctest output
* vit name on doc
* fix name on doc
* fix small nits
* fixed integration tests
* final changes - slow tests pass
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
Co-authored-by: younesbelkada <younesbelkada@gmail.com>
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-12-07 11:03:39 +01:00
NielsRogge
b610c47f89
[MaskFormer] Add support for ResNet backbone ( #20483 )
...
* Add SwinBackbone
* Add hidden_states_before_downsampling support
* Fix Swin tests
* Improve conversion script
* Add id2label mappings
* Add vistas mapping
* Update comments
* Fix backbone
* Improve tests
* Extend conversion script
* Add Swin conversion script
* Fix style
* Revert config attribute
* Remove SwinBackbone from main init
* Remove unused attribute
* Use encoder for ResNet backbone
* Improve conversion script and add integration test
* Apply suggestion
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-12-07 09:42:38 +01:00
Sylvain Gugger
6c1a0b3931
Pin TensorFlow to the next release ( #20635 )
2022-12-06 18:28:59 -05:00
aws-sangeetha
c95f84700c
Clip floating point constants to bf16 range to avoid inf conversion ( #20605 )
...
Co-authored-by: EC2 Default User <ec2-user@ip-172-31-40-169.us-west-2.compute.internal>
2022-12-06 17:25:26 -05:00
Yih-Dar
f68796bd60
Fix natten
installation in docker file ( #20632 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-06 22:23:06 +01:00
Francisco Kurucz
f821bea0ad
Fix link to speech encoder decoder model in speech recognition readme ( #20633 )
2022-12-06 15:46:41 -05:00
Steven Liu
4f78bcb287
add missing is_decoder param ( #20631 )
2022-12-06 12:18:58 -08:00
Sylvain Gugger
7586a1a367
Fix dtype of weights in from_pretrained when device_map is set ( #20602 )
2022-12-06 12:16:17 -05:00
Yih-Dar
bf9a5882a7
Update some GH action versions ( #20537 )
...
* update actions versions
* update actions versions
* update actions versions
* update actions versions
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-06 16:54:40 +01:00
Arthur
acc439ba17
Ci-jukebox ( #20613 )
...
* fix cuda OOM by using single Prior
* only send to device when used
* use custom model
* Skip the big slow test
* Update tests/models/jukebox/test_modeling_jukebox.py
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
2022-12-06 16:14:03 +01:00
Yih-Dar
9b14c1b6bf
Fix AutomaticSpeechRecognitionPipelineTests.run_pipeline_test
( #20597 )
...
* Remove assert exception not triggered
* Fix wrong expected exception string
* fix
* use assertRaisesRegex
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-06 15:48:49 +01:00
Sylvain Gugger
6a707cf586
Repo consistency
2022-12-06 08:08:37 -05:00
Sourab Mangrulkar
97a51b0c7d
updating T5 and BART models to support Prefix Tuning ( #20601 )
...
* updating T5 and BART models to support Prefix Tuning
* `make fix-copies`
* address comments
* address comments
2022-12-06 18:24:39 +05:30
xxyzz
b9a0ede6ab
Check if docstring is None before formating it ( #20592 )
...
docstrings could be `None` if Python optimize level is set to 2.
2022-12-06 07:44:17 -05:00
Wang, Yi
ae06bce888
exclude jit time from the speed metric calculation of evaluation and prediction ( #20553 )
...
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
2022-12-06 07:37:01 -05:00
Sourab Mangrulkar
25e10da427
Adding anchor links to Hindi README ( #20606 )
2022-12-06 18:06:25 +05:30
Samuel Xu
e842e181df
Documentation fixes ( #20607 )
2022-12-06 07:32:46 -05:00
Nicolas Patry
28f3d431d4
Rework the pipeline tutorial ( #20437 )
...
* [WIP] Rework the pipeline tutorial
- Switch to `asr` instead of another NLP task.
- It also has simpler to understand results.
- Added a section with interaction with `datasets`.
- Added a section with writing a simple webserver.
* Apply suggestions from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* Addressing comments.
* Links.
* Fixing docs format.
* Adding pipeline_webserver to _toctree.
* Warnig -> Tip warnings={true}.
* Fix link ?
* Links ?
* Fixing link, adding chunk batching.
* Oops.
* Apply suggestions from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* Update docs/source/en/pipeline_tutorial.mdx
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* 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>
2022-12-06 10:47:31 +01:00