Commit Graph

9015 Commits

Author SHA1 Message Date
Gunjan Chhablani
2c2a31ffbc
Add missing PLBart entry in README (#15721)
* Add missing PLBart entry in index

* Fix README

* Fix README

* Fix style

* Change to master model doc
2022-02-18 21:11:42 +01:00
Sanchit Gandhi
60ba48205e
fix bug in PT speech-encoder-decoder (#15699)
* fix bug in PT speech-encoder-decoder

* add pt test for `inputs is not None`

* fix test

* new pt test

* Update tests/test_modeling_speech_encoder_decoder.py

* make fixup

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-02-18 18:20:24 +01:00
Jake Tae
3de12906c8
fix: hfdeepspeed config argument (#15711)
`HfDeepSpeedConfig` accepts a dictionary or path to `.json` file containing DS configurations, not `TrainingArguments`.
2022-02-18 12:00:02 -05:00
Lysandre Debut
83f45cd656
Fix auto (#15706) 2022-02-18 08:50:23 -05:00
Sylvain Gugger
d5083c333f
style_doc handles decorators in examples (#15719) 2022-02-18 14:49:53 +01:00
Gunjan Chhablani
ae1f835028
Add PLBart (#13269)
* Init PLBART

* Add missing configuration file

* Add conversion script and configurationf ile

* Fix style

* Update modeling and conversion scripts

* Fix scale embedding in config

* Add comment

* Fix conversion script

* Add classification option to conversion script

* Fix vocab size in config doc

* Add tokenizer files from MBart50

* Allow no lang code in regular tokenizer

* Add PLBart Tokenizer Converters

* Remove mask from multi tokenizer

* Remove mask from multi tokenizer

* Change from MBart-50 to MBart tokenizer

* Fix names and modify src/tgt behavior

* Fix imports for tokenizer

* Remove <mask> from multi tokenizer

* Fix style

* Change tokenizer_class to processor_class

* Add attribute map to config class

* Update modeling file to modified MBart code

* Update configuration file to MBart style configuration

* Fix tokenizer

* Separate tokenizers

* Fix error in tokenization auto

* Copy MBart tests

* Replace with MBart tokenization tests

* Fix style

* Fix language code in multi tokenizer

* Fix configuration docs

* Add entry for plbart_multi in transformers init

* Add dummy objects and fix imports

* Fix modeling tests

* Add TODO in config

* Fix copyright year

* Fix modeling docs and test

* Fix some tokenization tests and style

* Add changes from review

* Fix copies

* Fix docs

* Fix docs

* Fix style

* Fix year

* Add changes from review

* Remove extra changes

* Fix base tokenizer and doc

* Fix style

* Fix modeling and slow tokenizer tests

* Remove Multi-tokenizer Converter and Tests

* Delete QA model and Multi Tokenizer dummy objects

* Fix repo consistency and code quality issues

* Fix example documentation

* Fix style

* Remove PLBartTokenizer from type checking in init

* Fix consistency issue

* Add changes from review

* Fix style

* Remove PLBartTokenizerFast

* Remove FastTokenizer converter

* Fix AutoTokenzier mapping

* Add plbart to toctree and fix consistency issues

* Add language codes tokenizer test

* Fix styling and doc issues

* Add fixes for failing tests

* Fix copies

* Fix failing modeling test

* Change assert to assertTrue in modeling tests
2022-02-18 14:17:09 +01:00
Yih-Dar
2f2fefd6af
Fix LongformerModel hidden states (#15537)
* add undo padding

* fix

* fix tuple issue

* make style and quality

* move unpad logic to LongformerEncoder + unpad attentions + update tests

* move unpad logic to TFLongformerEncoder

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-02-18 13:56:53 +01:00
Gautier Dagan
68dec6bffd
Fix DETR model deprecation warnings for int div (#15702) 2022-02-18 15:14:44 +03:00
Yih-Dar
f8ff3fad87
TF: add initializer_std with a small value in TFFunnelModelTester (#15684) 2022-02-18 11:20:07 +00:00
Sylvain Gugger
416dff736c
Fix SiluActivation (#15718) 2022-02-18 11:57:39 +01:00
SaulLu
e93763d420
fix CLIP fast tokenizer and change some properties of the slow version (#15067)
Very big changes concerning the tokenizer fast of CLIP which did not correspond to the tokenizer slow of CLIP

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-02-18 10:21:30 +01:00
Francesco Saverio Zuppichini
240cc6cbdc
Adding a model, more doc for pushing to the hub (#15690)
* doc for adding a model to the hub

* run make style

* resolved conversation

* removed a line

* removed )

* Update docs/source/add_new_model.mdx

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

* Update docs/source/add_new_model.mdx

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

* make style

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-02-18 09:11:18 +01:00
NielsRogge
57882177be
Add SimMIM (#15586)
* Add first draft

* Make model importable

* Make SwinForMaskedImageModeling importable

* Fix imports

* Add missing inits

* Add support for Swin

* Fix bug

* Fix bug

* Fix another bug

* Fix Swin MIM implementation

* Fix default encoder stride

* Fix Swin

* Add print statements for debugging

* Add image_size data argument

* Fix Swin

* Fix image_size

* Add print statements for debugging

* Fix print statement

* Remove print statements

* Improve reshaping of bool_masked_pos

* Add support for DeiT, fix tests

* Improve docstrings

* Apply new black version

* Improve script

* Fix bug

* Improve README

* Apply suggestions from code review

* Remove DS_Store and add to gitignore

* Apply suggestions from code review + fix BEiT Flax

* Revert BEiT changes

* Improve README

* Fix code quality

* Improve README

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MBP.localdomain>
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-02-17 19:44:55 +01:00
Gunjan Chhablani
426b96230a
Fix shapes in model docstrings (#15696) 2022-02-17 08:42:14 -05:00
Yih-Dar
92a537d938
Minor fix on README.md (#15688)
* fix README

* fix more arxiv links

* make fix-copies

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-02-17 08:38:32 -05:00
Tanay Mehta
f84e0dbd2a
Add PoolFormer (#15531)
* Added all files, PoolFormerFeatureExtractor still failing tests

* Fixed PoolFormerFeatureExtractor not being able to import

* Completed Poolformer doc

* Applied Suggested fixes

* Fixed errors in modeling_auto.py

* Fix feature extractor, convert docs to Markdown, styling of code

* Remove PoolFormer from check_repo and fix integration test

* Remove Poolformer from check_repo

* Fixed configuration_poolformer.py docs and removed inference.py from poolformer

* Ran with black v22

* Added PoolFormer to _toctree.yml

* Updated poolformer doc

* Applied suggested fixes and added on README.md

* Did make fixup and make fix-copies, tests should pass now

* Changed PoolFormer weights conversion script name and fixed README

* Applied fixes in test_modeling_poolformer.py and modeling_poolformer.py

* Added PoolFormerFeatureExtractor to AutoFeatureExtractor API

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MBP.localdomain>
2022-02-17 13:16:37 +01:00
NielsRogge
0e91f885c3
Add image classification notebook (#15667)
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-02-17 13:14:01 +01:00
Eldar Kurtic
f65fe3663a
Implementation of activations as pytorch modules (#15616)
* Implement activations as pytorch modules

* Apply fixup

* Add missing tests for activations

* Update docstring

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

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-02-16 14:37:52 -05:00
Yih-Dar
66828a19b1
Fix Funnel configuration doc (#15686)
* fix doc

* make style

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-02-16 11:50:36 -05:00
Patrick von Platen
3a4376d008
[Wav2Vec2ProcessorWithLM] Fix auto processor with lm (#15683) 2022-02-16 17:33:33 +01:00
Sylvain Gugger
cdc51ffd27
Add register method to AutoProcessor (#15669)
* Add push_to_hub method to processors

* Fix test

* The other one too!

* Add register method to AutoProcessor

* Update src/transformers/models/auto/processing_auto.py

Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>

Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>
2022-02-16 09:13:33 -05:00
Eliott C
bc3379e12c
🔥 Remove build_doc_test github action (#15680) 2022-02-16 14:06:26 +01:00
Yih-Dar
d4692ad161
Fix dec_attn_mask in TFTransfoXLMainLayer (#15665)
* fix attn

* clean-up

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-02-16 11:53:26 +00:00
Francesco Saverio Zuppichini
b87c044c79
Usage examples for logger (#15657)
* logger

* Update docs/source/main_classes/logging.mdx

Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>

* Update docs/source/main_classes/logging.mdx

Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>

Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
2022-02-16 10:15:13 +01:00
Sylvain Gugger
2d02f7b29b
Add push_to_hub method to processors (#15668)
* Add push_to_hub method to processors

* Fix test

* The other one too!
2022-02-15 21:14:04 -05:00
Stas Bekman
bee361c6f1
[t5/t0/mt5 models] faster/leaner custom layer norm (#14656)
* [t5] faster/leaner custom layer norm

* wip

* apex.normalization.FusedRMSNorm

* cleanup

* cleanup

* add doc

* add catch all

* Trigger CI

* expand
2022-02-15 16:49:57 -08:00
Santiago Castro
e3d1a8dabc
Add a missing space in a deprecation message (#15651) 2022-02-15 19:12:30 -05:00
Lysandre Debut
1ddf3c2b74
Fix vit test (#15671) 2022-02-15 18:55:38 -05:00
Lysandre Debut
943e2aa036
Fix model equivalence tests (#15670)
* Fix model equivalence tests

* Apply suggestions from code review

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

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-02-15 18:55:22 -05:00
Yih-Dar
1690319217
Fix TFSequenceSummary's activation (#15643)
* fix TFSequenceSummary

* fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-02-15 19:15:42 +00:00
Stas Bekman
faf4ff5974
[pipeline doc] fix api (#15660)
* [pipeline doc] fix api

* remove duplicate
2022-02-15 10:13:08 -08:00
Patrick von Platen
2e12b907ae
TF generate refactor - Greedy Search (#15562)
* TF generate start refactor

* Add tf tests for sample generate

* re-organize

* boom boom

* Apply suggestions from code review

* re-add

* add all code

* make random greedy pass

* make encoder-decoder random work

* further improvements

* delete bogus file

* make gpt2 and t5 tests work

* finish logits tests

* correct logits processors

* correct past / encoder_outputs drama

* refactor some methods

* another fix

* refactor shape_list

* fix more shape list

* import shape
_list

* finish docs

* fix imports

* make style

* correct tf utils

* Fix TFRag as well

* Apply Lysandre's and Sylvais suggestions

* Update tests/test_generation_tf_logits_process.py

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>

* Update src/transformers/tf_utils.py

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>

* remove cpu according to gante

* correct logit processor

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
2022-02-15 17:54:43 +01:00
Nicolas Patry
a3dbbc3467
Add decoder_kwargs to send to LM on asr pipeline. (#15646)
Co-authored-by: Giuseppe Attanasio <giuseppeattanasio6@gmail.com>

Co-authored-by: Giuseppe Attanasio <giuseppeattanasio6@gmail.com>
2022-02-15 17:53:24 +01:00
Nicolas Patry
cdf19c501d
Re-export KeyDataset. (#15645)
* Re-export `KeyDataset`.

* Update the docs locations.
2022-02-15 17:49:38 +01:00
Stas Bekman
28e6155d8a
add a network debug script and document it (#15652)
* add a network debug script and document it

* doc
2022-02-15 08:48:00 -08:00
Sylvain Gugger
5d8be090e0 Fix quality 2022-02-15 11:32:26 -05:00
Patrick von Platen
f45ac11fb3
Add section about doc testing (#15659)
* Add doctesting section

* Improve

* Apply suggestions from code review

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

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-02-15 16:56:31 +01:00
Shamane Siri
80f1a59168
updated with latest PL and Ray (#15653) 2022-02-15 16:53:05 +01:00
Ngo Quang Huy
7bc4a01cb5
Update bad_words_ids usage (#15641)
* Improve the parameter `bad_word_ids' usage

* Update the bad_words_ids strategy
2022-02-15 16:44:34 +01:00
arampacha
67047b86ce
add scores to Wav2Vec2WithLMOutput (#15413)
* add scores to Wav2Vec2WithLMOutput

* style fixup
2022-02-15 16:40:50 +01:00
Sylvain Gugger
45f56580a7
Allow custom code for Processors (#15649)
* Allow custom code for Processors

* Add more test

* Test all auto_map configs are properly set
2022-02-15 09:44:35 -05:00
jonrbates
86a7845c0c
Fix typo in speech2text2 doc (#15617)
Forward looks for inputs, not input_ids
2022-02-15 13:54:34 +01:00
Javier de la Rosa
9eb7e9ba1d
Fix ASR pipelines from local directories with wav2vec models that have language models attached (#15590)
* Fix loading pipelines with wav2vec models with lm when in local paths

* Adding tests

* Fix test

* Adding tests

* Flake8 fixes

* Removing conflict files :(

* Adding task type to test

* Remove unnecessary test and imports
2022-02-15 13:45:08 +01:00
Alex Hedges
e1cbc073bf
Require tokenizers>=0.11.1 (#15266)
`tokenizers` version that supports the feature to choose the direction of truncation
2022-02-15 11:46:12 +01:00
fra
05a8580964 Revert "logger doc"
This reverts commit 41168a49ce.
2022-02-15 10:46:45 +01:00
fra
41168a49ce logger doc 2022-02-15 10:03:28 +01:00
Patrick von Platen
041fdc4a7e
[SpeechEncoderDecoder] Make sure no EOS is generated in test (#15655) 2022-02-15 09:13:55 +01:00
muzhi1991
e314c19a3f
fix bug for the log of RNG states are not properly loaded exception. (#15638)
Co-authored-by: muz <muzhi1991@limuzhideMBP-2.lan>
2022-02-14 20:30:55 -05:00
Sylvain Gugger
2e11a04337
Register feature extractor (#15634)
* Rework AutoFeatureExtractor.from_pretrained internal

* Custom feature extractor

* Add more tests

* Add support for custom feature extractor code

* Clean up

* Add register API to AutoFeatureExtractor
2022-02-14 13:35:16 -05:00
lewtun
0f71c29053
Remove redundant error logging in from_pretrained() method (#15631)
* Remove error logging in from_pretrained() method
2022-02-14 18:03:07 +01:00