Commit Graph

9314 Commits

Author SHA1 Message Date
PolarisRisingWar
abf3cc7064
Fix a typo (add a coma) (#16291)
As mentioned: https://github.com/huggingface/transformers/issues/16277
2022-03-21 12:10:24 +00:00
Suraj Patil
641e5f3f55
Fix XGLM cross attention (#16290) 2022-03-21 13:07:28 +01:00
Aflah
f393868073
Fixed Error Raised Due to Wrongly Accessing Training Sample (#16115)
* Update training.mdx

Fixed Error Raised Due to Wrongly Accessing Training Sample

* Ran make style

* Revert to Old Commit

* Apply suggestions from code review

Co-authored-by: Suraj Patil <surajp815@gmail.com>
2022-03-21 12:54:54 +01:00
Sylvain Gugger
4ecb022eb1
Draft a guide with our code quirks for new models (#16237)
* Draft a guide with our code quirks for new models

* Apply suggestions from code review

Co-authored-by: Suraj Patil <surajp815@gmail.com>
Co-authored-by: Joao Gante <joao@huggingface.co>

* Apply suggestions from code review

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

Co-authored-by: Suraj Patil <surajp815@gmail.com>
Co-authored-by: Joao Gante <joao@huggingface.co>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-03-21 07:44:03 -04:00
Dinesh Kumar Gnanasekaran
8bbd41369f
removed the 'optional' string (#16266)
Co-authored-by: dinesh-GDK <dinesh.gna111@gmail.com1>
2022-03-21 07:39:45 -04:00
Omar U. Espejel
c36b856580
Framework split for Spanish version of doc quicktour.mdx (#16215)
* Apply framework changes

* Fix italics

* Fix nits

* correct syntax

Co-authored-by: Omar Espejel <espejelomar@Omars-MacBook-Air.local>
2022-03-21 07:37:45 -04:00
Patrick von Platen
c1af180dfe
Add Slack notification support for doc tests (#16253)
* up

* up

* up

* fix

* yeh

* ups

* Empty test commit

* correct quicktour

* correct

* correct

* up

* up

* uP

* uP

* up

* up

* uP

* up

* up

* up

* up

* up

* up

* up

* up

* up

* up

* Update src/transformers/models/van/modeling_van.py

* finish

* apply suggestions

* remove folder

* revert to daily testing
2022-03-21 11:33:18 +01:00
guillaume-be
319cbbe191
Deberta v2 code simplification (#15732)
* Removed spurious substraction

* Fixed condition checking for attention type

* Fixed sew_d copy of DeBERTa v2 attention

* Removed unused `p2p` attention type from DebertaV2-class models

* Fixed docs style
2022-03-21 05:15:38 -04:00
Sylvain Gugger
0a5ef036e6
Make add-new-model-like work in an env without all frameworks (#16239)
* Make add-new-model-like work without all frameworks installed

* A few fixes

* Last default frameworks
2022-03-21 04:29:04 -04:00
Yih-Dar
f466936476
Add has_attentions to TFModelTesterMixin as done on PyTorch side (#16259)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-19 11:44:17 +01:00
Sylvain Gugger
8d7420768c
Small fixes to the documentation (#16180) 2022-03-18 17:48:27 -04:00
Steven Liu
ffc319e7b8
Fix links in guides (#16182)
* 🖍 fix links in guides

* 🖍 apply feedback
2022-03-18 16:16:16 -05:00
Dan Tegzes
277fc2cc78
Update flaubert with tf decorator (#16258) 2022-03-18 17:57:55 +00:00
Yih-Dar
75c666b4a8
Aggressive PT/TF equivalence test on PT side (#16250)
* Aggressive PT/TF equivalence test on PT side

* Ugly fix for `TFTapasForQuestionAnswering`

* apply review suggestions

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-18 18:51:24 +01:00
Yih-Dar
d481b6414d
Make Flax pt-flax equivalence test more aggressive (#15841)
* Make test_equivalence_pt_to_flax more aggressive

* Make test_equivalence_flax_to_pt more aggressive

* don't use to_tuple

* clean-up

* fix missing test cases + testing on GPU

* fix conversion

* fix `ValueError: assignment destination is read-only`

* Add type checking

* commit to revert later

* Fix

* fix

* fix device

* better naming

* clean-up

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-18 18:15:36 +01:00
Clara Meister
c03b6e4259
value check for typical sampling (#16165)
* value check for typical sampling

* value check for typical sampling

* change from float to int comparison

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-03-18 17:05:27 +01:00
Chan Woo Kim
fdc2e643c3
added cbs to notebooks, made copy-paste error fix in generation_utils (#16246) 2022-03-18 17:04:43 +01:00
Suraj Patil
b25b92ac4f
update jax version and re-enable some tests (#16254) 2022-03-18 16:45:39 +01:00
Johannes Kolbe
5709a20416
Add unpack_inputs decorator for ctrl (#16242)
* add unpack_inputs decorator for ctrl

* replace "past" with "past_key_values"

Co-authored-by: Johannes Kolbe <johannes.kolbe@tech.better.team>
2022-03-18 15:33:24 +00:00
Louis Owen
ddbc9ae00b
Update XLM with TF decorator (#16247)
* update XLM with tf decorator

* move to top decorator

* set unpack_inputs as top decorator

Co-authored-by: Louis Owen <yellow@Louis-Owen.local>
2022-03-18 14:07:02 +00:00
Yih-Dar
a6271967c9
Override _pad in LEDTokenizer to deal with global_attention_mask (#15940)
* Override _pad in LEDTokenizer

* Override _pad in LEDTokenizerFast

* add Copied from

* calling the super method

* add comment about -1

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-18 13:30:08 +01:00
Zhaofeng Wu
cb2b0276b6
Change assertion to warning when passing past_key_value to T5 encoder (#16153)
* Change assertion to warning when passing past_key_value to T5 encoder

* lint
2022-03-18 12:52:55 +01:00
Nicolas Patry
ecb4662d17
Attention mask is important in the case of batching... (#16222)
* Attention mask is important in the case of batching...

* Improve the fix.

* Making the sentence different enough that they exhibit different
predictions.
2022-03-18 10:02:12 +01:00
NielsRogge
ec4e421b7d
Update expected slices for pillow > 9 (#16117)
* Update expected slices for pillow > 9

* Add expected slices depending on pillow version

* Add different slices depending on pillow version for other models

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-03-18 09:46:45 +01:00
Kshitiz Sharma
12d1f07770
integrations: mlflow: skip start_run() if a run is already active and sanity check on enabling integration (#16131)
* integrations: mlflow: skip start_run() call if a run is already active

* integrations: typo fix

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

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-03-17 16:39:57 -04:00
Stas Bekman
47cccb5318
[Deepspeed] non-HF Trainer doc update (#16238) 2022-03-17 13:33:55 -07:00
Patrick von Platen
8a96b0f10a
[Generate Docs] Correct docs (#16133)
* [Generate Docs] Correct docs

* 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-03-17 20:05:28 +01:00
Suraj Patil
632ff3c39e
[FlaxSpeechEncoderDecoderModel] Skip from_encoder_decoder_pretrained (#16236)
* skip the test

* fix

* fix skip
2022-03-17 20:05:14 +01:00
Boris Dayma
b6e06c845f
fix(flax): generate with logits processor/warper (#16231) 2022-03-17 19:39:16 +01:00
Johannes Kolbe
1c1e377e99
TF - add unpack_inputs decorator for marian (#16226)
* add unpack_inputs decorator

* small fix for attn_mask string

Co-authored-by: Johannes Kolbe <johannes.kolbe@tech.better.team>
2022-03-17 18:23:40 +00:00
罗崚骁(LUO Lingxiao)
81643edda5
Support PEP 563 for HfArgumentParser (#15795)
* Support PEP 563 for HfArgumentParser

* Fix issues for Python 3.6

* Add test for string literal annotation for HfArgumentParser

* Remove wrong comment

* Fix typo

* Improve code readability

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

* Use `isinstance` to compare types to pass quality check

* Fix style

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-03-17 13:51:37 -04:00
Suraj Patil
93d3fd8645
remove jax.ops.index (#16220) 2022-03-17 17:51:43 +01:00
Ulaş "Sophylax" Sert
8481ecefbd
Fix Type Hint of Nan/Inf Logging Filter Arg (#16227) 2022-03-17 11:05:38 -04:00
Lysandre Debut
5a6b3ccd28
Skip equivalence test for TransfoXL (#16224)
* Skip test for TransfoXL

* Single list
2022-03-17 09:03:07 -04:00
Rahul
abd503d939
TF - Adding Unpack Decorator For DPR model (#16212)
* Adding Unpack Decorator

* Adding Unpack Decorator-moved it on top
2022-03-17 12:33:02 +00:00
Francesco Saverio Zuppichini
d9b8d1a9f5
update test (#16219) 2022-03-17 08:11:55 -04:00
Li-Huai (Allan) Lin
7e0d04bed1
Fix readmes (#16217) 2022-03-17 07:47:01 -04:00
Sylvain Gugger
e1da89ccb8
Fix reproducibility in Training for PyTorch 1.11 (#16209) 2022-03-17 07:42:58 -04:00
Dayyan Smith
e5101c2e27
Fix typo (#16208) 2022-03-17 07:21:20 -04:00
Yih-Dar
25b8f9a85b
Fix FlaxRoFormerClassificationHead activation (#16168)
* fix activation

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-17 11:45:50 +01:00
NielsRogge
03c14a515f
[Tests] Fix DiT test (#16218)
* Fix device

* Clean up

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-03-17 10:53:57 +01:00
Lysandre Debut
73f0a5d1f6
Fixes Loss for TransfoXL when using Trainer API v2 (#16140)
* fix(transfo_xl): Fixes TransfoXL support when using Trainer.

* fix(tests): Uses losses_1 and losses_2 pattern with TransfoXL test.

* fix(transfo_xl): Adds requested changes to allow for backward compatibility.

fix(transfo_xl): Adds requested changes to allow for backward compatibility.

fix(transfo_xl): Fixes code styling.

* Backward compatibility

* Update src/transformers/models/transfo_xl/modeling_transfo_xl.py

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

Co-authored-by: Gustavo de Rosa <gth.rosa@uol.com.br>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-03-17 05:49:24 -04:00
Francesco Saverio Zuppichini
76c74b37c1
VAN: update modules names (#16201)
* done

* done
2022-03-17 10:25:09 +01:00
João Gustavo A. Amorim
99e2982f3e
Add/type annotations/model vision (#16151)
* add types annotations for Beit (PyTorch)

* add types annotations for ViT (PyTorch)

* add types annotations for Deit (PyTorch)

* change Optional[bool] to bool into some places at Beit

* change Optional[bool] to bool into some places at ViT
2022-03-16 20:27:54 +00:00
Patrick von Platen
2410d0f8ed
Fix generation min length (#16206)
* up

* fix min lengths
2022-03-16 18:49:23 +01:00
Francesco Saverio Zuppichini
667b823b89
Swin support for any input size (#15986)
* padding done

* correctly return one attention per layer

* almost correct, attentions are not flatten one tuple per stage

* tests green

* doc

* conversations

* reshaping hidden_states

* view in the test

* reshape_hidden_states in Encoder and Model

* new outputs with reshaped_hidden_states

* conversations

* doc

* Update docs/source/model_doc/swin.mdx

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

* Apply suggestions from code review

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

* conversations

* fix tests

* minor changes

* resolved conversations

* attentions one per stage

* typo

* typos

* typos

* function signature

* CI

* clean up tests

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
2022-03-16 18:38:25 +01:00
Joao Gante
204c54d411
TF: add beam search tests (#16202) 2022-03-16 15:44:33 +00:00
Suraj Patil
190994573a
Fix loading CLIPVisionConfig and CLIPTextConfig (#16198)
* override from_pretrained

* add tests

* remove docstrings

* fix typo

* Trigger CI
2022-03-16 16:24:01 +01:00
Yih-Dar
09013efdf1
Update step name (#16189)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-16 11:19:38 -04:00
Francesco Saverio Zuppichini
36f8c42519
ResNet: update modules names (#16196)
* updated names

* fit in one line

* typo
2022-03-16 15:59:56 +01:00