Commit Graph

12278 Commits

Author SHA1 Message Date
Yih-Dar
fcf813417a
Update expected values in XLMProphetNetModelIntegrationTest (#21957)
update values

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-06 09:15:44 +01:00
Batese2001
699a2293cc
Fixed gradient_checkpointing/use_cache bug in blenderbot (#21833)
* Fixed gradient_checkpointing/use_cache bug in blenderbot

* Update modeling_blenderbot.py

* Added back if statement

* Formatted using black
2023-03-04 15:45:53 +00:00
Karim Foda
6feb39b43c
Fix gradient checkpointing bug in Roformer (#21946) 2023-03-04 15:44:33 +00:00
Karim Foda
6386eb9721
Fix gradient checkpointing bug in Rembert (#21945) 2023-03-04 15:44:06 +00:00
Karim Foda
f12c74f51e
Fix gradient checkpointing bug in Pegasus (#21944) 2023-03-04 15:43:32 +00:00
Karim Foda
f932ee61b9
Fix gradient checkpointing bug in OPT (#21943) 2023-03-04 15:42:57 +00:00
bofeng huang
003a7cc608
[Whisper] Fix feature normalization in WhisperFeatureExtractor (#21938)
Fix feature normalization in WhisperFeatureExtractor
2023-03-03 14:21:13 -05:00
Arthur
718e9d777f
[CLAP] Support batched inputs for CLAP. Fixes pipeline issues (#21931)
* fix pipeline

* fix feature_extraction clap

* you can now batch the `is_longer` attribute

* add tests

* fixup

* add expected scores

* comment on is_longert
2023-03-03 18:42:18 +01:00
Victor Muštar
c5fe06c59d
Update README logo (#21933) 2023-03-03 11:57:39 -05:00
Arthur
82aac00e0f
[Flan-UL2] Add-flan-ul2 (#21929)
* add doc and readme

* add model docs

* update toctree and fix copies

* update

* update doc file

* fix

* add FLAN-UL2 to configuration mapping

* fixup

* Apply suggestions from code review

* more clarification

---------

Co-authored-by: younesbelakda <younesbelkada@gmail.com>
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
2023-03-03 17:57:24 +01:00
substanc3
956ae62139
Fix wrong documentation about DataCollator padding defaults (#21919)
* Fix wrong documentation about DataCollator padding defaults

* Fix styling
2023-03-03 11:51:54 -05:00
Yih-Dar
8c40ba73d8
Avoid failure in check_repo.py due to missing backends (#21930)
* Update utils/check_repo.py

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Update utils/check_repo.py

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2023-03-03 15:34:20 +01:00
Yih-Dar
d4306daea1
Fix AlignModelTest tests (#21923)
* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-03 14:47:09 +01:00
Zach Nussbaum
c5a1ff9ef0
feat: filter try/except when looking at custom code (#21914)
* feat: filter try/except

* Update src/transformers/dynamic_module_utils.py

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

---------

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2023-03-03 08:43:59 -05:00
Yih-Dar
02a77fa04c
Cleanup more auto mapping names (#21909)
* fix auto 2

* fix auto 2

* fix task guide issue

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-03 14:43:44 +01:00
Yih-Dar
b05e0bec88
Use large VM for repo_utils_job (#21928)
upgrade to large VM

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-03 14:43:03 +01:00
Yih-Dar
fa9d2ad7ec
Update model_split_percents for WhisperModelTest (#21922)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-03 14:35:08 +01:00
Karim Foda
c82bd37169
Fix gradient checkpointing megatron bert (#21921) 2023-03-03 11:50:21 +00:00
Karim Foda
99a62347fb
Fix gradient checkpointing bug in mvp (#21920) 2023-03-03 11:49:49 +00:00
Karim Foda
e407b5a323
Fix gradient checkpointing bug in MBart (#21918) 2023-03-03 11:49:27 +00:00
Arthur
dcec3277cd
faster forward following what is done for images (#21906)
* faster forward following what is done for images

* add missing licence
2023-03-03 06:18:18 +01:00
Matt
37e0974afc
Fix doctests for TFVisionTextDualEncoder (#21910) 2023-03-03 00:18:11 +00:00
Yih-Dar
9f5bfe1b99
Avoid modeling tests run in pipeline CI jobs (#21911)
* rework is_pipeline_test

* bring back 3 tests

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-02 21:23:06 +01:00
Kashif Rasul
db979f7588
[time series] Add Time series inputs tests (#21846)
* intial test of inputs

* added test for generation

* remove asserts

* fixed test

* Update tests/models/time_series_transformer/test_modeling_time_series_transformer.py

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

---------

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
2023-03-02 20:43:35 +01:00
Nicolas Patry
b2a41d2be4
Faster zero shot image (#21897)
* Make ZeroShotImageClassificationPipeline faster

The pipeline makes separate calls to model for each candidate label.
This commit combines all labels into one call.
Original code takes more that 60 seconds to process one image and 1000
candidate labels. Updated code takes less than 2 seconds.

* implement batching

* code formatting

* Creating an even faster zero-shot-image-classifiction.

Unfortunately super tailored towards CLIP.

Co-Authored-By: Yessen Kanapin <yessen@deepinfra.com>

* Quality.

* Cleanup.

* Order different on the CI it seems.

* Cleanup.

* Quality.

---------

Co-authored-by: Yessen Kanapin <yessen@deepinfra.com>
2023-03-02 19:46:22 +01:00
Yih-Dar
88e5c51a15
Temporarily skip 3 tests in BridgeTowerModelTest (#21908)
skip for now

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-02 19:16:03 +01:00
Yih-Dar
e6de918676
Add Blip and Blip2 for pipeline tests (#21904)
* fix

* add to tests

* style and quality

* add missing

---------

Co-authored-by: NielsRogge <NielsRogge@users.noreply.github.com>
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-02 18:20:34 +01:00
Nicolas Patry
1325459105
Refactor whisper asr pipeline to include language too. (#21427)
* [WIP] whisper refacto to support language output.

* Handling merges.

* A bit more cleanup and comments.

* Many improvements.

Lots of details everywhere.

* Cleanup old code and tests.

* Handle lone timestamp tokens (just recover when something bad happens).

* Adding return_language example.

* No ffmpeg.

* Hmm.

* Some corrections.

* Both fast and slow.

* New black.

* Update src/transformers/models/whisper/tokenization_whisper.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update src/transformers/models/whisper/tokenization_whisper.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Remove print.

* Undoing tests modifications.

* Smaller test modifications.

* Rename.

* Remove maxDiff.

---------

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2023-03-02 18:12:19 +01:00
Connor Henderson
8e5a1b2abb
Make schedulers picklable by making lr_lambda fns global (#21768)
* Make schedulers picklable by making lr_lambda fns global

* add unused _get_constant_schedule_lr_lambda arg

* remove unneeded _get_constant_schedule_lr_lamda

* add test

* make style

* rebase, remove torch dep, put lambda back

* repo-consistency and style
2023-03-02 12:08:43 -05:00
Kian Sierra McGettigan
6bf885375a
Prophetnet batch dimension inversion fix (#21870)
* decoder forward pass is working

* no model has forward pass returning attentions

* decoder ngram changed to not mix batch size

* current basic forward pass returns identical result

* passed test_model attentions

* passed test_encoder_decoder_model_generate

* passed test_headmasking

* removed old block

* removed comments bug/fixme

* removed bug comments

* applied styling

* applied fix-copies

* applied ngram forward comments

* corrected dimension notation

* applied styling and comment fixes

* changed asserts for raise ValueError

* changed question gen test

* updated hidden_states integration test

* applied styling
2023-03-02 12:07:45 -05:00
Yih-Dar
99ba36e72f
Clean up auto mapping names (#21903)
* add new test

* fix after new test

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-02 17:14:50 +01:00
Sylvain Gugger
50a8ed3ee0
Mark pipeline tests to skip them easily (#21887)
* Mark pipeline tests to skip them easily

* Mark the mixin as pipeline test

* Update src/transformers/testing_utils.py

Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>

---------

Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
2023-03-02 10:55:36 -05:00
Karim Foda
d9e28d91a8
Fix gradient checkpointing bug marian (#21842)
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2023-03-02 15:41:15 +00:00
Karim Foda
b405b62f4a
Fix gradient checkpointing bug M2M 100 (#21841)
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2023-03-02 15:40:56 +00:00
Karim Foda
7e6dd664e8
Fix gradient checkpointing bug LED (#21840)
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2023-03-02 15:40:35 +00:00
Sourab Mangrulkar
b6f47b5393
fsdp bf16 enable autocast (#21847) 2023-03-02 20:18:07 +05:30
Arthur
fb76994c41
[GPT-J] add deprecation warning (#21869)
* add deprecation warning

* remove pos ids from args docstirng

* fix failing test
2023-03-02 14:51:59 +01:00
Kashif Rasul
648d0deb1d
fix typo in Bart's attention (#21898) 2023-03-02 08:49:26 -05:00
Arthur
c87654dca1
[Whisper] Add rescaling function with do_normalize (#21263)
* add `zero_mean_unit_var_norm` function

* normalize before MEL computation

* fixup

* add simple test

* quality

* Update tests/models/whisper/test_feature_extraction_whisper.py

Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>

* fixup

* use attention masks if padding was applied

* Update based on review

Co-authored-by: bofeng huang <bofenghuang7@gmail.com>

---------

Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
Co-authored-by: bofeng huang <bofenghuang7@gmail.com>
2023-03-02 14:17:21 +01:00
Arthur
b48c7f7b3f
[T5 doc] Fix confusing documentation about d_kv (#21896)
* Confusing documentation in T5

* Fix onfusing documentation in T5 configuration file
2023-03-02 14:07:25 +01:00
Sid Kiblawi
edbb37f736
Add inputs_embeds functionality when generating with BioGPT (#21889)
* initial commit to add inputs_embeds to generation

* formatting
2023-03-02 07:43:19 -05:00
amyeroberts
3412f5979d
Use PyAV instead of Decord in examples (#21572)
* Use PyAV instead of Decord

* Get frame indices

* Fix number of frames

* Update src/transformers/models/videomae/image_processing_videomae.py

* Fix up

* Fix copies

* Update timesformer doctests

* Update docstrings
2023-03-02 12:30:38 +00:00
Arthur
c256bc6d10
[ZAC] fix ci daily (#21893)
add correct revision after model was overwritten
2023-03-02 10:46:03 +01:00
Arthur
633e5e89f7
[Refactor] Relative imports wherever we can (#21880)
* initial commit

* update

* second batch

* style

* fix imports

* fix relative import on pipeline
2023-03-02 09:45:42 +01:00
Arthur
43299c63ca
fix checkpoint (#21874) 2023-03-02 08:47:20 +01:00
Yih-Dar
89359e4c63
Fix test_load_default_pipelines_pt for ClapModel (#21886)
* fix tests

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-01 21:52:26 +01:00
Yih-Dar
36ee128375
Fix WhisperModelTest (#21883)
* force on the same device

* fix tests

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-03-01 20:41:27 +01:00
saswatmeher
4edfd2d4d2
Fix Gradient checkpointing bug BigBird (#21882)
Co-authored-by: saswatmeher <saswatmeher@cse.iitb.ac.in>
2023-03-01 19:10:03 +00:00
Alara Dirik
269b054939
Add ALIGN to transformers (#21741)
Adds the ALIGN model to transformers. ALIGN is introduced in "Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision" by Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc V. Le, Yunhsuan Sung, Zhen Li, Tom Duerig.
2023-03-01 21:23:31 +03:00
Matt
f7c618e3b0
Add TFVisionTextDualEncoder (#21873)
* Temporary commit to stash everything so far

* Temporary commit to stash everything so far

* stash commit

* Refactor from_pretrained

* Fix final test, make fixup

* Update dummies

* Add model to TEST_FILES_WITH_NO_COMMON_TESTS

* Update src/transformers/models/vision_text_dual_encoder/modeling_tf_vision_text_dual_encoder.py

Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>

* Update src/transformers/models/vision_text_dual_encoder/modeling_tf_vision_text_dual_encoder.py

Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>

* Update src/transformers/models/vision_text_dual_encoder/modeling_tf_vision_text_dual_encoder.py

Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>

* Update src/transformers/models/vision_text_dual_encoder/modeling_tf_vision_text_dual_encoder.py

Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>

* Add TFVisionTextDualEncoder to utils/documentation_tests.txt

* make fixup

---------

Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
2023-03-01 18:00:48 +00:00