Commit Graph

11371 Commits

Author SHA1 Message Date
Steven Liu
b0a2c3a2d6
add resources for bart (#19928) 2022-10-28 13:15:43 -07:00
എതിരാളിക്കൊരു പോരാളി
98c9c5add9
Update Code of Conduct to Contributor Covenant v2.1 (#19935)
* Update Code of Conduct to Contributor Covenant v2.1

* Update CODE_OF_CONDUCT.md
2022-10-28 11:03:38 -04:00
Raghav Prabhakar
0d4c45c585
Add Onnx Config for ImageGPT (#19868)
* add Onnx Config for ImageGPT

* add generate_dummy_inputs for onnx config

* add TYPE_CHECKING clause

* Update doc for generate_dummy_inputs

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

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-10-28 09:39:53 -04:00
Yang Yu
9b1dcba94a
Use self._trial to generate trial_name for Trainer. (#19874)
* Do not generate trial_name when trail is None

* Use (trial or self._trial) to generate trial_name

* Follow comments
2022-10-28 08:47:47 -04:00
donguk.lim
347ba38cb4
Support segformer fx (#19924)
* Support segformer fx

* Add fx_compatible attribute to test_modeling_segformer.py

* Update glpn model (fx support)

glpn model was copied from segformer.

* Update utils/fx.py | add semantic-segmentation

for SegformerForSemanticSegmentation model

* Fix minor import order(isort)

* Add random input generation for segformer fx

Co-authored-by: noelbird <lduldu00228@gmail.com>
2022-10-28 08:44:38 -04:00
Yih-Dar
dcca71be61
Create dummy models (#19901)
* create dummy models

* quality

* update

* update

* Make Wav2Vec2Conformer work

* style

* deal with models with text_config and vision_config

* apply suggestions

* Composite models

* style

* style

* fix shape issue

* fix shape issue

* For VisionTextDualEncoderModel

* show_progress=False when converting tokenizers

* Fix for OwlViT

* Fix for VisualBert

* Update

* final

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-28 13:05:41 +02:00
Younes Belkada
4cef546ffc
Add accelerate support for BART-like models (#19927)
* forward contrib credits from suggestion

* add `accelerate` support for BART-like models

Co-authored-by: sgugger <sgugger@users.noreply.github.com>
2022-10-27 23:14:53 +02:00
Sylvain Gugger
ebfd7229d2
Let inputs of fast tokenizers be tuples as well as lists (#19898)
* Let inputs of fast tokenizers be tuples as well as lists

* Update src/transformers/tokenization_utils_fast.py

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

* Style

Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>
2022-10-27 16:03:11 -04:00
Sylvain Gugger
6c24443ff5
Safetensors tf (#19900)
* Wip

* Add safetensors support for TensorFlow

* First tests

* Add final test for now

* Retrigger CI like this

* Update src/transformers/modeling_tf_utils.py

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

Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>
2022-10-27 15:56:29 -04:00
Steven Liu
e4132952a1
Add GPT2 resources (#19879)
* add resources for gpt2

* add pipeline icons and community resources
2022-10-27 11:34:00 -07:00
Steven Liu
d818dd3a41
Add BLOOM resources (#19881)
* add bloom resources

* add pipeline icon
2022-10-27 11:33:52 -07:00
Steven Liu
50f5266b2c
Add T5 resources (#19878)
* add resources for t5

* add pipeline icons and community resources
2022-10-27 11:33:37 -07:00
Steven Liu
536a8ae6ad
Add RoBERTa resources (#19911)
* add roberta resources

* fix typo
2022-10-27 11:33:15 -07:00
Younes Belkada
d56d723fad
Add accelerate support for M2M100 (#19912)
* add `accelerate` support for M2M100

* fix device set nit
2022-10-27 18:06:55 +02:00
Matt
c766a2d70a
Remove embarrassing debug print() in save_pretrained (#19922) 2022-10-27 10:56:48 -04:00
Edoardo Abati
1e6141c3d4
Add type hints to TFPegasusModel (#19858)
* added typing to call in TFPegasusModel and TFPegasusForConditionalGeneration

* fixed type for TFPegasusForConditionalGeneration call
2022-10-27 15:43:58 +01:00
Sylvain Gugger
ecf29db0e5
Fix warning when collating list of numpy arrays (#19846) 2022-10-27 09:00:39 -04:00
Antonio Carlos Falcão Petri
ea118ae2e1
Fix bug in Wav2Vec2's GPU tests (#19803)
* Fix tests when running on GPU

* Fix tests that require mp.set_start_method
2022-10-27 09:00:03 -04:00
Yih-Dar
f1e42bc50e
Some fixes regarding auto mappings and test class names (#19923)
* Add pegasus_x

* ViTMSN

* ESM

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-27 14:38:59 +02:00
Chandler May
bec78ba154
Convert None logits processor/stopping criteria to empty list. (#19880)
* Convert None logits processor/stopping criteria to empty list.

* Initialize stopping_criteria, logits_processor in generate.

* Default stopping_criteria, logits_processor to None.

Co-authored-by: Chandler May <chandler.j.may@gmail.com>
2022-10-27 08:00:18 -04:00
Joao Gante
568e578310
Generate: contrastive search uses existing abstractions and conventions (#19896) 2022-10-27 12:20:14 +01:00
Yih-Dar
803475fb69
Add checkpoint links in a few config classes (#19910)
* For CLIP

* Others

* update

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-27 09:26:10 +02:00
Younes Belkada
7629656926
accelerate support for RoBERTa family (#19906) 2022-10-26 22:41:53 +02:00
Patrick von Platen
6d023270f6
Allow flax subfolder (#19902)
* add first generation tutorial

* [Flax] Add subfolder functionality

* [Flax] Add subfolder functionality

* up

* finish

* delete file and re-add test
2022-10-26 18:33:23 +02:00
Younes Belkada
7a1c68a845
Add flan-t5 documentation page (#19892)
* add `flan-t5` documentation page

* Update README.md

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

* add more content

* revert `_toctree` modif

* revert `toctree` modif - 2

* Update README.md

* Revert "Update README.md"

This reverts commit 5660714429.

* Update README_es.md

* Update README_zh-hans.md

* Update README_zh-hant.md

* Update README_ko.md

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-10-26 17:22:57 +02:00
Yih-Dar
688c3e8e40
Update max_diff in test_save_load_fast_init_to_base (#19849)
* Fix test_save_load_fast_init_to_base

* Fix test_save_load_fast_init_to_base

* update

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-26 17:09:47 +02:00
raghavanone
7829c890db
Change the import of kenlm from github to pypi (#19770)
* Change the import of kenlm from github to pypi

* Change the import of kenlm from github to pypi in circleci config

* Fix code quality issues

* Fix isort issue, add kenlm in extras for audio

* Add kenlm to deps

* Add kenlm to deps

* Commit 'make fixup' changes

* Remove version from kenlm deps

* commit make fixup changes

* Remove manual installation of kenlm

* Remove manual installation of kenlm

* Remove manual installation of kenlm
2022-10-26 17:06:46 +02:00
raghavanone
aeae97829f
Add missing information on token_type_ids for roberta model (#19766)
* Add missing information on token_type_ids for roberta model

* Fix code format issues

* Fix code format issues

* Add more explicit document for token_type_ids for roberta

* Fix flake8 issues

* Fix flake8 issues

* Fix flake8 issues

* Fix flake8 issues

* Fix flake8 issues
2022-10-26 10:44:34 -04:00
Sander Land
fdffee8a60
No conv bn folding in ipex to avoid warning (#19870)
* no conv bn folding in ipex

* no flag in training

* comment

Co-authored-by: Sander Land <sander@chatdesk.com>
2022-10-26 08:58:52 -04:00
Kaylee L. Davis
802b98c72b
Correct README image text (#19883)
swap "right" and "left" so description is correct.
2022-10-26 08:38:01 -04:00
regisss
5d2d51a0fb
Fix LR (#19875) 2022-10-26 08:35:53 -04:00
Revanth09
1f1cc09df6
[DOCTEST] Config doctest for MCTCT, MBart and LayoutLM (#19889)
* Update documentation_tests.txt

* Update configuration_mbart.py

* Update configuration_mctct.py

* Update configuration_layoutlm.py

* Update configuration_layoutlmv2.py

* Update configuration_layoutlmv3.py

* Update documentation_tests.txt
2022-10-26 12:05:44 +02:00
Nicolas Patry
5fd5990dce
Factored out some code in the image-segmentation pipeline. (#19727)
* Factored out some code in the image-segmentation pipeline

Re-enable `small_model_pt`.

Re-enable `small_model_pt`.

Enabling the current test with the current values.

Debugging the values on the CI.

More logs ? Printing doesn't work ?

Using the CI values instead. Seems to be a Pillow sensitivity.

Added a test showcasing that models not supporting some tasks get a
clear error.

Factored out code.

Further factor out.

Fixup.

Bad rebase.

Put `panoptic` before `instance` as it should be a superset.

* Fixing tests.

* Adding subtasks tests

+ Fixes `instance` segmentation which was broken due to default and
non kwargs arguments.

* Fix bad replace.
2022-10-26 10:44:36 +02:00
Sylvain Gugger
2447672269
Update doc for revision and token (#19793)
* Update doc for revision and token

* Update src/transformers/configuration_utils.py

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

* Push changes on other from_pretrained methods

Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>
2022-10-25 12:32:15 -04:00
Yih-Dar
f9257843b5
Fix incorrect model<->tokenizer mapping in tokenization testing (#19872)
* Fix model-tokenizer mapping

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-25 16:02:13 +02:00
Lysandre Debut
eedaba682f
[Past CI] Vilt only supports PT >= v1.10 (#19851)
* Support for Vilt in v1.9

* Skip if not higher or equal than 1.10

* Move test :)

* I am bad at python
2022-10-25 15:59:35 +02:00
Joao Gante
d39f794eda
Generate: contrastive search cosmetic tweaks (#19871) 2022-10-25 14:43:06 +01:00
Davi Alves
0a77249178
Added translation of serialization.mdx to Portuguese Issue #16824 (#19869)
* [ custom_models.mdx ] - Translated to Portuguese the custom models tutorial.

* [ run_scripts.mdx ] - Translated to Portuguese the run scripts tutorial.

* [ converting_tensorflow_models.mdx ] - Translated to Portuguese the converting tensorflow models tutorial.

* [ converting_tensorflow_models.mdx ] - Translated to Portuguese the converting tensorflow models tutorial.

* [ serialization.mdx ] - Translated to Portuguese the serialization tutorial.
2022-10-25 09:34:28 -04:00
Guillaume Klein
ab108a0e31
Add missing lang tokens in M2M100Tokenizer.get_vocab (#18416) 2022-10-25 09:18:24 -04:00
Yih-Dar
0bd6d9340e
Fix doctest for GenerationMixin.contrastive_search (#19863)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-25 14:51:16 +02:00
Alberto Mario Ceballos-Arroyo
371337a95b
Spanish translation of multiple_choice.mdx, question_answering.mdx. (#19821)
* Translated multiple_choice.mdx, question_answering.mdx. Added them to _toctree.yml

* Added translation for a missed line.

* Update _toctree.yml as per Omar's suggestions

* Update multiple_choice.mdx as per Omar's comments

* Updt question_answering.mdx as per Omar's comments
2022-10-24 20:11:34 -04:00
Sylvain Gugger
d4eb52d13d
Refactor conversion function (#19799)
* Refactor conversion function

* Remove dupe line

* Fixes

* Fixes

* Use the right variable...

* Fix last test
2022-10-24 13:48:40 -04:00
Steven Liu
9ecb13d63a
add small updates only (#19847) 2022-10-24 10:18:20 -07:00
Yih-Dar
072ed01c38
Fix doctest for MarkupLM (#19845)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-24 17:54:23 +02:00
Rak Alexey
1f7e40d04f
Improve check copies (#19829)
* print first diff line intead of first code part line

* fix style
2022-10-24 11:24:18 -04:00
Yih-Dar
8b2501b4b9
Update LEDModelIntegrationTests expected values (#19841)
* Update expected values

* fix style

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-24 16:05:26 +02:00
Dhruv Singal
5cbf1fa8ca
fixed typo in fp16 training section for perf_train_gpu_one (#19736) 2022-10-24 10:04:28 -04:00
Yih-Dar
8db92dbe26
Fix nightly CircleCI (#19837)
* Fix nightly CircleCI

* update

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-10-24 16:00:02 +02:00
Davi Alves
743995e0e6
Added translation of converting_tensorflow_models.mdx to Portuguese Issue #16824 (#19824)
* [ custom_models.mdx ] - Translated to Portuguese the custom models tutorial.

* [ run_scripts.mdx ] - Translated to Portuguese the run scripts tutorial.

* [ converting_tensorflow_models.mdx ] - Translated to Portuguese the converting tensorflow models tutorial.

* [ converting_tensorflow_models.mdx ] - Translated to Portuguese the converting tensorflow models tutorial.
2022-10-24 09:50:16 -04:00
Rak Alexey
d3f4cef74d
fix image2test args forwarding (#19648)
* fix image2test args forwarding

* fix issues

* Proposing the update to the PR.

* Fixup.

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
2022-10-24 09:49:24 -04:00