Commit Graph

8517 Commits

Author SHA1 Message Date
Patrick von Platen
84ea427f46
[ImageGPT] Deprecate pixel_values input name to input_ids (#14801)
* [ImageGPT] Deprecate pixel_values input name to input_ids

* up

* Apply suggestions from code review

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

* correct

* finish

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
2021-12-17 20:05:22 +01:00
Patrick von Platen
c4a96cecbc
Wav2Vec2 meets phonemes (#14353)
* up

* add tokenizer

* improve more

* finish tokenizer

* finish

* adapt speech recognition script

* adapt convert

* more fixes

* more fixes

* update phonemizer wav2vec2

* better naming

* fix more tests

* more fixes swedish

* correct tests

* finish

* improve script

* remove file

* up

* lets get those 100 model architectures until the end of the month

* make fix-copies

* correct more

* correct script

* more fixes

* more fixes

* add to docs

* Apply suggestions from code review

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

* replace assert

* fix copies

* fix docs

* new try docs

* boom boom

* update

* add phonemizer to audio tests

* make fix-copies

* up

* upload models

* some changes

* Update tests/test_tokenization_wav2vec2_phoneme.py

Co-authored-by: Anton Lozhkov <aglozhkov@gmail.com>

* more fixes

* remove @

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Anton Lozhkov <aglozhkov@gmail.com>
2021-12-17 19:56:44 +01:00
Lysandre Debut
77d6c826d8
Convert rst to mdx bert (#14806)
* BERT to mdx
mdx :)
c

* Update docs/source/model_doc/bert.mdx

Co-authored-by: Julien Chaumond <julien@huggingface.co>

* Remove all
Co-authored-by: sgugger <sylvain.gugger@gmail.com>

Co-authored-by: Julien Chaumond <julien@huggingface.co>
2021-12-17 11:13:34 -05:00
Sylvain Gugger
0b4ea79a0c Trigger doc building 2021-12-17 11:14:18 -05:00
Daniel Stancl
ff066119ca
Implement head_mask for Flax BERT and other models copied from BERT (#14620)
* Implement head_mask for Flax BERT and other models copied from BERT

* Remove `from jax._src.nn.functions import sigmoid`

Remove `from jax._src.nn.functions import sigmoid` unintentionally added by IDE

* Remove no more valid copy statement

* Apply patil-suraj's suggestions from code review

* Apply suggestions from the code review

* Update Flax template

* Fix a typo

* Also update template for CausalLM modules
2021-12-17 17:06:59 +01:00
Patrick von Platen
95119ad7b0
[Generate] Correct input_ids detection (#14815)
* [Generate] Correct input_ids detection

* correct
2021-12-17 16:08:54 +01:00
Patrick von Platen
bdbe3df869
[WavLM] Layerdrop is not allowed for first layer (#14811)
* [WavLM] Layerdrop is not allowed for first layer

* Apply suggestions from code review
2021-12-17 13:30:18 +01:00
NielsRogge
cbf036f7ae
Add test (#14810) 2021-12-17 04:33:27 -05:00
Patrick von Platen
c4a0fb5199
[WavLM] Correct position bias computation (#14805) 2021-12-16 22:42:57 +01:00
Lysandre Debut
d194d639ab
Remove datasets requirement (#14795) 2021-12-16 14:34:14 -05:00
Patrick von Platen
bef1e3e4a0
Add WavLM (#14354)
* first commit

* fix some stuff

* fix more readme

* Apply suggestions from code review

* update

* correct

* up

* attn layer works

* push code

* make modedls work

* Small change

* more refactor

* finish

* up

* fix convertsion

* fix position bias

* Fix style

* fix conversion

* make fix-copies

* add

* clean

* fix docs

* fix

* Apply suggestions from code review

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

* apply final changes

* make fix-copies

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2021-12-16 18:57:05 +01:00
Patrick von Platen
b18d8534ea
[Generate] Make generate multi-modal (#14784)
* finish refactor

* refactor

* add tests

* add more tests

* up

* finish tests

* finish

* up

* Apply suggestions from code review

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

* improve docstring

* fix docs

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2021-12-16 18:03:55 +01:00
Anton Lozhkov
48463ebb33
Add Speaker Diarization and Verification heads (#14723)
* Models

* Squashed commit of the following:

commit 72278e1e931a16d0879acc77f65762f3364833d0
Author: anton-l <aglozhkov@gmail.com>
Date:   Fri Dec 10 21:45:08 2021 +0300

* Add unispeech heads

* Add sd/sv automodels

* Docs cleanup

* Fix docstrings

* rename xvector classes

* examples

* Tests cleanup

* Style

* Better checkpoints for tests

* leftover docs

* apply review suggestions

* Style + init tests

* Update unispeech-sat tdnn downsampling
2021-12-16 19:22:14 +03:00
Matt
2e07180cba
Train step fix (#14796)
* Fix for TF train step when no "labels" key in input

* make style
2021-12-16 16:08:13 +00:00
Kamal Raj
465a8b8d10
Update CONTRIBUTING.md (#14800)
fix pip installation cmd
2021-12-16 10:40:56 -05:00
Kamal Raj
8ae24e19b2
Update CONTRIBUTING.md (#14799)
typo
2021-12-16 10:24:26 -05:00
Sylvain Gugger
12e1b4c6df
Fix the build documentation job (#14788)
* Fix the build documentation job

* Fix install

* Address review comment
2021-12-16 09:35:20 -05:00
Sylvain Gugger
5061a9fd55
Post sphinx-clean up and contributing guide updates (#14790)
* Clean up sphinx

* Update contributing guide

* Update docs README

* No example title

* Fix copies

* Update CONTRIBUTING.md

Co-authored-by: Lysandre Debut <lysandre@huggingface.co>

Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
2021-12-16 09:29:26 -05:00
Lysandre Debut
8010fda9bf
Removes images to put them in a dataset (#14781)
* First try

* Update instructions
2021-12-16 04:42:02 -05:00
Sylvain Gugger
459677aebe
PoC for conserving old links (#14754)
* PoC for conserving old links

* Do the same for other links

* remap the redirects section

* add instructions on how to move sections

* improve

Co-authored-by: Stas Bekman <stas@stason.org>
2021-12-15 11:40:47 -08:00
Sylvain Gugger
c40ecfd740
Move import (#14787) 2021-12-15 13:34:42 -05:00
Lysandre
7c9c41f43c Docs for v4.14.0 2021-12-15 18:29:53 +01:00
Lysandre
960d8cb41d Release: v4.14.0 2021-12-15 18:20:35 +01:00
NielsRogge
aece7badc1
Improve Perceiver docs (#14786)
* Fix docs

* Apply suggestions from code review

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

* Code quality

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Lysandre <lysandre.debut@reseau.eseo.fr>
2021-12-15 12:02:05 -05:00
NielsRogge
50bc57cef8
Update Perceiver code examples (#14783)
* Fix code examples

* Fix code example
2021-12-15 11:06:38 -05:00
Matt
48d4827697
TF model cards (#14720)
* Initial commit for Keras model cards

* Revert accidental change

* make style

* make style

* make style

* Fix PR comments

* Move repo creation to __init__

* Fixes to README.md creation

* Partial progress for proper card creation on `push_to_hub`

* Proper card creation from `push_to_hub` plus fixes for malformed model cards

* Fixes for model card creation outside the callback

* Adding a model card creation test

* Putting the model card creation test in the right file.
Good job, Matt.

* make style

* Fix model card test temp dir usage

* Fix model card creation when no optimizer present

* Fixes for when training history not present

* Fix accidental edit to test_modeling_common
2021-12-15 14:57:52 +00:00
Xing Han Lu
72c6e8b8bf
Update t5.rst (#14776) 2021-12-15 14:59:11 +01:00
Yih-Dar
a94105f95f
Fix preprocess_function in run_summarization_flax.py (#14769)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2021-12-15 11:36:28 +01:00
Sylvain Gugger
7e61d56a45
Fix the doc_build_test job (#14774)
* Fake new model

* Fix doc-building test job

* Is this the problem?

* Another try

* Typo

* Clean up

* Can we do without -e ?

* Clean setup
2021-12-15 03:40:17 -05:00
Stas Bekman
fdf3ce2827
[doc] performance: groups of operations by compute-intensity (#14757) 2021-12-14 19:01:23 -08:00
Amit Chaudhary
851a78978a
Fix broken links to distillation on index page of documentation (#14722)
* Fix broken links to distillation on index page of documentation

* Fix broken link for distillation in main README

* Run make fixup
2021-12-14 21:55:33 -05:00
Nicolas Patry
e7ed7ffdcb
Adding support for multiple mask tokens. (#14716)
* Adding support for multiple mask tokens.

- Original implem: https://github.com/huggingface/transformers/pull/10222

Co-authored-by: njafer <naveen.jafer@oracle.com>

* In order to accomodate optionally multimodal models like Perceiver

we add information to the tasks to specify tasks where we know for sure
if we need the tokenizer/feature_extractor or not.

* Adding info in the documentation about multi masks.

+ marked as experimental.

* Add a copy() to prevent overriding the same tensor over and over.

* Fixup.

* Adding small test for multi mask with real values..

Co-authored-by: njafer <naveen.jafer@oracle.com>
2021-12-14 16:46:16 +01:00
Benjamin Minixhofer
2a606f9974
Make data shuffling in run_clm_flax.py respect global seed (#13410)
* use jax and jnp instead of numpy in data_loader

* return batches as np.ndarray
2021-12-14 11:04:43 +01:00
Nicolas Patry
546a91abe9
Fixing tests for Perceiver (#14739)
* Adding some slow test to check for perceiver at least from a high level.

* Re-enabling fast tests for Perceiver ImageClassification.

* Perceiver might try to run without Tokenizer (Fast doesn't exist) and
with FeatureExtractor some text only pipelines.

* Oops.

* Adding a comment for `update_config_with_model_class`.

* Remove `model_architecture` to get `tiny_config`.

* Finalize rebase.

* Smarter way to handle undefined FastTokenizer.

* Remove old code.

* Addressing some nits.

* Don't instantiate `None`.
2021-12-14 09:43:07 +01:00
Sylvain Gugger
322d416916
Update Table of Contents (#14755) 2021-12-13 17:15:19 -05:00
Sylvain Gugger
7533d30acd
Convert Trainer doc page to MarkDown (#14753)
* Convert Trainer doc page to MarkDown

* Fix repo consistency

* Fix the doc build test job
2021-12-13 13:09:50 -05:00
NielsRogge
e926ea2bdd
Improve perceiver (#14750)
* First draft

* Improve docstring + clean up tests

* Remove unused code

* Add check in case one doesn't provide a preprocessor
2021-12-13 18:46:49 +01:00
Josué Nascimento
971e36667a
Change how to load config of XLNetLMHeadModel (#14746) 2021-12-13 12:34:26 -05:00
Yih-Dar
15a9d01519
Avoid using tf.tile in embeddings for TF models (#14735)
* avoid tf.tile in embeddings

* remove more tf.tile in embeddings

* clean

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2021-12-13 17:30:46 +00:00
Lysandre Debut
6ac0fac85a
Mention no images added to repository (#14738)
* Mention no images added to repository

* Update CONTRIBUTING.md

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

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
2021-12-13 12:21:26 -05:00
Sylvain Gugger
e4666bff06 Fix name 2021-12-13 12:01:37 -05:00
Sylvain Gugger
64e92ed224
Update transformers metadata (#14724)
* Wip on metadata update

* Most of the script

* Add a job to auto-update the transformers metadata

* Style
2021-12-13 11:46:03 -05:00
Sylvain Gugger
c3cd88a9ba
Small fixes for the doc (#14751) 2021-12-13 11:17:01 -05:00
Yih-Dar
12d9b95723
Fix: change tooslow to slow (#14734)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2021-12-13 16:12:58 +00:00
Yih-Dar
ca0b82bbd7
Fix doc examples: cannot import name (#14698)
* Fix doc examples: cannot import name

* remove copy because of some necessary minor changes (maybe add copy to the individual methods instead)

* Keep copy with some modifications

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2021-12-13 10:36:50 -05:00
Lucien
fc74c84537
Swap TF and PT code inside two blocks (#14742) 2021-12-13 10:31:11 -05:00
Stas Bekman
8362d07d63
[CI/pt-nightly] switch to cuda-11.3 (#14726) 2021-12-13 09:53:48 -05:00
Lysandre Debut
6e05bb1c96
Fix the perceiver docs (#14748) 2021-12-13 09:29:47 -05:00
Suzen Fylke
c17e7cde32
Add ability to get a list of supported pipeline tasks (#14732) 2021-12-13 08:31:50 -05:00
Lysandre Debut
3d66146afc
Fixing tests for Perceiver (#14745)
- Do not run image-classification pipeline (_CHECKPOINT_FOR_DOC uses the checkpoint for
langage, which cannot load a FeatureExtractor so current logic fails).
- Add a safeguard to not run tests when `tokenizer_class` or
`feature_extractor_class` **are** defined, but cannot be loaded
This happens for Perceiver for the "FastTokenizer" (which doesn't exist
so None) and FeatureExtractor (which does exist but cannot be loaded
because the checkpoint doesn't define one which is reasonable for the
said checkpoint)
- Added `get_vocab` function to `PerceiverTokenizer` since it is used by
`fill-mask` pipeline when the argument `targets` is used to narrow a
subset of possible values.

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
2021-12-13 08:13:39 -05:00