Commit Graph

9347 Commits

Author SHA1 Message Date
Omar Sanseviero
62cbd8423b
Fix code repetition in serialization guide (#16346) 2022-03-22 16:57:19 -04:00
Patrick von Platen
4f6c938342
[Bug template] Shift responsibilities for long-range (#16344) 2022-03-22 21:55:22 +01:00
Jacob Dineen
ec3aace0ae
Add type annotations for Rembert/Splinter and copies (#16338)
* undo black autoformat

* minor fix to rembert forward with default

* make fix-copies, make quality

* Adding types to template model

* Removing List from the template types

* Remove `Optional` from a couple of types that don't accept `None`

Co-authored-by: matt <rocketknight1@gmail.com>
2022-03-22 20:07:48 +00:00
Francesco Saverio Zuppichini
c30798ec9d
done (#16340) 2022-03-22 18:06:17 +01:00
Clémentine Fourrier
d49f8d3189
Added type hints for Pytorch Marian calls (#16200)
* Added type hinting for forward functions in pytorch marian

* typo correction

* Removed type hints on functions from BART per Suraj Patil request

* fix import pb

* fix typo

* corrected tuple call

* ran black

* after fix-copies
Some optional tags on primitives were removed, past_key_values in MarianForCausalLM changed from Tuple of Tuple to List

* Fixing copies to roformer and pegasus

Co-authored-by: Clementine Fourrier <cfourrie@inria.fr>
Co-authored-by: matt <rocketknight1@gmail.com>
2022-03-22 14:45:59 +00:00
NielsRogge
a2379b9257
[GLPN] Improve docs (#16331)
* Add link to notebook

* Add link

* Fix bug

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-03-22 15:45:29 +01:00
Dan Tegzes
87a9af533c
Add type hints for ProphetNet PyTorch (#16272) 2022-03-22 13:55:58 +00:00
Adam Montgomerie
7b262b9692
Funnel type hints (#16323)
* add pt funnel type hints

* add tf funnel type hints
2022-03-22 13:52:29 +00:00
Dan Tegzes
deb61e5f07
Add type hints for Pegasus (#16324) 2022-03-22 13:17:55 +00:00
Beomseok Lee
7cc2c9c6b0
Fix bugs of s2t fairseq model converting (#15593)
* Fix bugs for argument typo and positional embedding weight loading

* Reflect code review suggestion to cover different missing keys cases
2022-03-22 12:09:51 +01:00
Suraj Patil
7865f4d01f
add xglm conversion script (#16305)
* add xglm conversion script

* style

* update script
2022-03-22 11:45:50 +01:00
NielsRogge
0c55d47cde
Add GLPN (#16199)
* First draft

* Fix logits calculation

* Improve tests

* Add copied from statements

* Fix base_model_prefix

* Improve implementation, upload new models

* Update design

* Fix integration test

* Add model to README and toctree

* Add document image

* Apply suggestions from code review

* Apply suggestions from code review

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

* Add decoder_hidden_size attribute

* Update design of decoder

* Add DepthEstimatorOutput class

* Rename in_index to head_in_index and add feature extractor tests

* Apply suggestions from code review

* Apply suggestions from code review

* Update pretrained model name and add to doc tests

* Remove test.py script

* Update copied from statements and clean up

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-03-22 08:51:13 +01:00
Johnny Greco
df32b5d89b
TFLongformer: Add missing type hints and unpack inputs decorator (#16228)
* Add type annotations for TF Longformer

* Update docstring data types to include numpy array

* Implement unpack_inputs decorator

* fixup after decorator updates

* Numpy array -> np.ndarray in docstring

Co-authored-by: Johnny Greco <johnny.greco@radpartners.com>
2022-03-21 22:56:17 +00:00
Thomas Chaigneau
0aac9ba2da
Add Flaubert OnnxConfig to Transformers (#16279)
* Add Flaubert to ONNX to make it available for conversion.

* Fixed features for FlauBERT. fixup command remove flaubert to docs list.

Co-authored-by: ChainYo <t.chaigneau.tc@gmail.com>
2022-03-21 21:46:31 +01:00
Joao Gante
9fef668338
TF - update (vision_)encoder_decoder past variable (#16260) 2022-03-21 19:55:41 +00:00
Gunjan Chhablani
f9387c948d
Update Makefile Phonies (#16306) 2022-03-21 15:28:23 -04:00
ivanllt
96cd5bcbb9
added type hints for blenderbot and blenderbot_small (#16307) 2022-03-21 19:13:58 +00:00
Anton Lozhkov
e226a24f84
[xtreme-s] Update Minds14 results (#16241)
* update results

* per-language metrics

* Format the per-language metrics
2022-03-21 19:33:59 +01:00
Gunjan Chhablani
6f1727d83a
Fix Seq2SeqTrainingArguments docs (#16295)
* Indent Seq2Seq Train Args docs

* Add Args keyword to Seq2Seq Train Args docs
2022-03-21 13:48:07 -04:00
Johnny Greco
7643b1caa6
Added type hints to PyTorch Longformer models (#16244) 2022-03-21 17:09:03 +00:00
Suraj Patil
c77092a5ed
[FlaxGPTJ] Fix bug in rotary embeddings (#16298) 2022-03-21 18:07:56 +01:00
Yih-Dar
4b2774832d
fix last element in hidden_states for XGLM (#16301)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-21 17:38:52 +01:00
Steven Liu
5a42bb431e
Update troubleshoot with more content (#16243)
* 📝 first draft

* 🖍 apply feedback
2022-03-21 11:37:18 -05:00
NielsRogge
fbb454307d
[SegFormer] Remove unused attributes (#16285)
* Remove unused attributes

* Add link to blog and add clarification about input size

* Improve readability of the code

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-03-21 17:34:10 +01:00
Suraj Patil
f0c00d8ca9
Fix Marian conversion script (#16300) 2022-03-21 17:23:40 +01:00
Yi Heng Lim
94be424308
Added type hints for PyTorch T5 model (#16257)
* Added type hints for PyTorch T5 model

* removed a type hint

* ran make style
2022-03-21 16:17:52 +00:00
Christopher Akiki
250b478a2c
GPT2 TensorFlow Type Hints (#16261)
* Add typing hints for base model class

* Add typing hints for causal LM model class

* Add typing hints for double heads model class

* Add typing hints for sequence classification model class

* Add typing hints for Main Layer

* Run fixup
2022-03-21 16:11:03 +00:00
Francesco Saverio Zuppichini
9ad77affee
test (#16294) 2022-03-21 16:59:47 +01:00
Robot Jelly
d50f62f2de
added type hints for BART model (#16270)
* added type hints for BART model

* make fixup, adding imports to copied files

* Adding some missing types to cookiecutter

* Adding some missing types to cookiecutter

* Adding some missing types to cookiecutter

Co-authored-by: matt <rocketknight1@gmail.com>
2022-03-21 15:18:01 +00:00
Jack McDonald
460f36d352
Add type hints transfoxl (#16267)
* Add type hint for pt transfo_xl model

* Add type hint for tf transfo_xl model
2022-03-21 15:04:13 +00:00
Xia
2afe9cd279
Add argument "cache_dir" for transformers.onnx (#16284)
* Add argument "cache_dir" for transformers.onnx

* Reformate files that can't pass CI.
2022-03-21 15:26:44 +01:00
Gunjan Chhablani
3f0f75e497
Remove disclaimer from Longformer docs (#16296) 2022-03-21 10:05:47 -04:00
Mowaninuola Osifeso
c6f7ea194b
Add type hints to xlnet (#16214)
* added type hints to xlnet PT

* added type hints to xlnet TF

* added type hints to xlnet TF
2022-03-21 13:04:18 +00:00
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