Commit Graph

8486 Commits

Author SHA1 Message Date
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
NielsRogge
4c99e553c1
Improve documentation of some models (#14695)
* Migrate docs to mdx

* Update TAPAS docs

* Remove lines

* Apply suggestions from code review

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

* Apply some more suggestions from code review

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

* Add pt/tf switch to code examples

* More improvements

* Improve docstrings

* More improvements

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2021-12-13 13:24:36 +01:00
Yih-Dar
32eb29fef9
Fix doc examples: modify config before super().__init__ (#14697)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2021-12-13 12:50:02 +01:00
Nathan Cooper
48bf7e47a0
Code parrot minor fixes/niceties (#14666)
* Add some nicety flags for better controlling evaluation.

* Fix dependency issue with outdated requirement

* Add additional flag to example to ensure eval is done

* Wrap code into main function for accelerate launcher to find

* Fix valid batch size flag in readme

* Add note to install git-lfs when initializing/training the model

* Update examples/research_projects/codeparrot/scripts/arguments.py

Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>

* Update examples/research_projects/codeparrot/README.md

Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>

* Revert "Wrap code into main function for accelerate launcher to find"

This reverts commit ff11df1c81.

* Fix formatting issue

* Move git-lfs instructions to installation section

* Add a quick check before code generation for code evaluation

* Fix styling issue

* Update examples/research_projects/codeparrot/scripts/human_eval.py

Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>

* Make iterable dataset use passed in tokenizer rather than globally defined one

Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>
Co-authored-by: ncoop57 <nac33@students.uwf.edu>
2021-12-13 09:30:50 +01:00
Patrick von Platen
91f3dfbfdd
[Adafactor] Fix adafactor (#14713)
* correct changes

* add comment
2021-12-12 13:31:46 +01:00
Patrick von Platen
86dd23bb8b
Update bug-report.md (#14715) 2021-12-12 13:30:44 +01:00
Suraj Patil
6a025487a6
[Flax examples] remove dependancy on pytorch training args (#14636)
* use custom training arguments

* update tests
2021-12-12 09:19:12 +05:30
Stas Bekman
027074f4d0
[doc] document MoE model approach and current solutions (#14725)
* document MoE model approach

* additional info from Samyam

* fix
2021-12-10 18:24:38 -08:00
Nicolas Patry
7cb1fdd4d1
Fixing tests for perceiver (texts) (#14719)
* Fixing tests for perceiver (texts)

* For MaskedLM
2021-12-10 19:38:59 -05:00
Sylvain Gugger
39fbb068be Empty commit to retrigger build doc 2021-12-10 17:55:16 -05:00
Sylvain Gugger
5eca742f6c
Fix special character in MDX (#14721) 2021-12-10 16:02:48 -05:00
Sylvain Gugger
63c284c2d4 Prevent style_doc from tempering the config file 2021-12-10 15:31:43 -05:00
Sylvain Gugger
f46668282b Fix path for notebooks 2021-12-10 15:03:17 -05:00
Sylvain Gugger
3b2d1652e4 Fix typo in branch name 2021-12-10 14:38:21 -05:00
Sylvain Gugger
1b75d7238c
Automatically build doc notebooks (#14718)
* Test workflow

* Build doc

* Make a clean build

* Add doc config

* Restore other workflows

* Final job

* Print something in else statements

* Pull before making changes
2021-12-10 14:20:56 -05:00
Yih-Dar
ae82ee6a48
Fix doc examples: unexpected keyword argument (#14689)
* Fix doc examples: unexpected keyword argument

* Don't delete token_type_ids from inputs

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2021-12-10 11:44:08 -05:00
Nicolas Patry
5b00400198
Adding Perceiver to AutoTokenizer. (#14711) 2021-12-10 15:29:18 +01:00
Yih-Dar
59d684fa92
Fix examples: 'CausalLMOutputWithCrossAttentions' object has no attribute 'last_hidden_state' (#14678)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2021-12-10 14:55:54 +01:00
Yih-Dar
8395f14de6
Fix doc examples: KeyError (#14699)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2021-12-10 13:26:37 +05:30
Sylvain Gugger
bab1556456
Put back open in colab markers (#14684) 2021-12-09 12:00:06 -05:00
Tikeng Notsawo Pascal Junior
3bc7d70e9c
Fix : wrong link in the documentation (ConvBERT vs DistilBERT) (#14705) 2021-12-09 11:35:22 -05:00
Lysandre
4701a1a182 Patch release script 2021-12-09 17:21:08 +01:00
Lysandre
ab31b3e41b Docs for v4.14.0dev0 2021-12-09 17:09:23 +01:00
Lysandre
4da3a696e4 Release: v4.13.0 2021-12-09 16:55:21 +01:00
Mishig Davaadorj
60be4bf8ac
Fix typo in toctree (#14704) 2021-12-09 09:25:31 -05:00
Philipp Schmid
da7aabf2ca
add str hub token to repository when provided else fallback to default (#14682)
* add str hub token to repository when provided else fallback to default True

* make style
2021-12-09 08:42:23 -05:00
NielsRogge
7375758bee
Fix tests (#14703) 2021-12-09 08:32:35 -05:00
Sylvain Gugger
68e53e6fcd
Add a job to test doc building (for realsies this time) (#14662) 2021-12-09 07:01:03 -05:00
Sylvain Gugger
e9800122a6 Add kenlm dep to missing tests 2021-12-08 19:59:44 -05:00
Yih-Dar
ee6674d450
Fix doc examples: name '...' is not defined (#14687)
* Fix doc examples: name '...' is not defined

* remove >>> and ... in some docstrings in visual_bert

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2021-12-08 16:39:35 -05:00
Sylvain Gugger
e6219320b9
Make MLuke tokenizer tests slow (#14690) 2021-12-08 15:59:57 -05:00
Sylvain Gugger
13186d7152
Move pyctcdecode (#14686)
* Move pyctcdecode dep

* Fix doc and last objects

* Quality

* Style

* Ignore this black
2021-12-08 15:41:58 -05:00