Commit Graph

15053 Commits

Author SHA1 Message Date
Lysandre
16913b3c92 Dev version 2022-09-14 14:58:20 -04:00
Sylvain Gugger
3774010161
Automate check for new pipelines and metadata update (#19029)
* Automate check for new pipelines and metadata update

* Add Datasets to quality extra
2022-09-14 14:06:49 -04:00
SaulLu
0efbb6e93e
fix GPT2 token's special_tokens_mask when used with add_bos_token=True (#19036) 2022-09-14 19:32:12 +02:00
Sylvain Gugger
0e24548081
Add safeguards for CUDA kernel load in Deformable DETR (#19037) 2022-09-14 13:28:40 -04:00
Joao Gante
31be02f14b
TF: tf.debugging assertions without tf.running_eagerly() protection (#19030) 2022-09-14 18:19:15 +01:00
lewtun
693ba2cc79
Fix GPT-NeoX doc examples (#19033) 2022-09-14 17:53:42 +02:00
Sylvain Gugger
4eb36f2921
Mark right save_load test as slow (#19031) 2022-09-14 10:38:39 -04:00
Shinya Otani
f5f430e5c8
Add support for Japanese GPT-NeoX-based model by ABEJA, Inc. (#18814)
* add gpt-neox-japanese model and tokenizer as new model

* Correction to PR's comment for GPT NeoX Japanese
- Fix to be able to use gpu
- Add comment # Copied... at the top of RotaryEmbedding
- Implement nn.Linear instead of original linear class
- Add generation test under @slow

* fix bias treatment for gpt-neox-japanese

* Modidy gpt-neox-japanese following PR
- add doc for bias_dropout_add
- style change following a PR comment

* add document for gpt-neox-japanese

* remove unused import from gpt-neox-japanese

* fix README for gpt-neox-japanese
2022-09-14 10:17:40 -04:00
Yih-Dar
6a9726ec0e
Fix DocumentQuestionAnsweringPipelineTests (#19023)
* Fix DocumentQuestionAnsweringPipelineTests

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-14 16:13:20 +02:00
Sylvain Gugger
1207deb806 Typo fix 2022-09-14 10:02:14 -04:00
Sylvain Gugger
e1224a2a0f Making save_load test slow as it times out 2022-09-14 10:01:22 -04:00
Sylvain Gugger
0b567aa430
Add Document QA pipeline metadata (#19028) 2022-09-14 09:25:15 -04:00
Yih-Dar
77b18783c2
Fix CI for PegasusX (#19025)
* Skip test_torchscript_output_attentions for PegasusXModelTest

* fix test_inference_no_head

* fix test_inference_head

* fix test_seq_to_seq_generation

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-14 14:45:00 +02:00
Partho
77ea35b93a
added type hints (#19015) 2022-09-14 12:58:05 +01:00
NielsRogge
fc21c9be62
[CookieCutter] Clarify questions (#18959)
* Clarify cookiecutter questions

* Update first question

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-09-14 13:52:54 +02:00
Sylvain Gugger
6f8f2f6a77
Make AutoProcessor a magic loading class for all modalities (#18963)
* Make AutoProcessor a magic loading class for all modalities

* Quality
2022-09-14 07:36:12 -04:00
Sylvain Gugger
a2a3afbc8d
PyTorch >= 1.7.0 and TensorFlow >= 2.4.0 (#19016) 2022-09-14 07:19:02 -04:00
Ekagra Ranjan
9f4acd059f
Generate: add missing comments after refactoring of generate() (#18981) 2022-09-14 11:06:29 +01:00
NielsRogge
59407bbeb3
Add Deformable DETR (#17281)
* First draft

* More improvements

* Improve model, add custom CUDA code

* Import torch before

* Add script that imports custom layer

* Add everything in new ops directory

* Import custom layer in modeling file

* Fix ARCHIVE_MAP typo

* Creating the custom kernel on the fly.

* Import custom layer in modeling file

* More improvements

* Fix CUDA loading

* More improvements

* Improve conversion script

* Improve conversion script

* Make it work until encoder_outputs

* Make forward pass work

* More improvements

* Make logits match original implementation

* Make implementation also support single_scale model

* Add support for single_scale and dilation checkpoint

* Add support for with_box_refine model

* Support also two stage model

* Improve tests

* Fix more tests

* Make more tests pass

* Upload all models to the hub

* Clean up some code

* Improve decoder outputs

* Rename intermediate hidden states and reference points

* Improve model outputs

* Move tests to dedicated folder

* Improve model outputs

* Fix retain_grad test

* Improve docs

* Clean up and make test_initialization pass

* Improve variable names

* Add copied from statements

* Improve docs

* Fix style

* Improve docs

* Improve docs, move tests to model folder

* Fix rebase

* Remove DetrForSegmentation from auto mapping

* Apply suggestions from code review

* Improve variable names and docstrings

* Apply some more suggestions from code review

* Apply suggestion from code review

* better docs and variables names

* hint to num_queries and two_stage confusion

* remove asserts and code refactor

* add exception if two_stage is True and with_box_refine is False

* use f-strings

* Improve docs and variable names

* Fix code quality

* Fix rebase

* Add require_torch_gpu decorator

* Add pip install ninja to CI jobs

* Apply suggestion of @sgugger

* Remove DeformableDetrForObjectDetection from auto mapping

* Remove DeformableDetrModel from auto mapping

* Add model to toctree

* Add model back to mappings, skip model in pipeline tests

* Apply @sgugger's suggestion

* Fix imports in the init

* Fix copies

* Add CPU implementation

* Comment out GPU function

* Undo previous change

* Apply more suggestions

* Remove require_torch_gpu annotator

* Fix quality

* Add logger.info

* Fix logger

* Fix variable names

* Fix initializaztion

* Add missing initialization

* Update checkpoint name

* Add model to doc tests

* Add CPU/GPU equivalence test

* Add Deformable DETR to pipeline tests

* Skip model for object detection pipeline

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
Co-authored-by: Nouamane Tazi <nouamane98@gmail.com>
Co-authored-by: Sylvain Gugger <Sylvain.gugger@gmail.com>
2022-09-14 11:45:21 +02:00
Ahmed Elnaggar
5a70a77bfa
Add Support to Gradient Checkpointing for LongT5 (#18977)
FlaxLongT5PreTrainedModel is missing "enable_gradient_checkpointing" function. This gives an error if someone tries to enable gradient checkpointing for longt5.
This pull request fixes it.
2022-09-14 09:12:51 +01:00
Joao Gante
4157e3cd7e
new length penalty docstring (#19006) 2022-09-13 13:16:36 -04:00
Sylvain Gugger
f89f16a51e
Re-add support for single url files in objects download (#19014) 2022-09-13 13:11:24 -04:00
Yih-Dar
ad5045e3e3
add missing require_tf for TFOPTGenerationTest (#19010)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-13 18:10:11 +02:00
Wang, Yi
d14af22c5c
add DDP HPO support for optuna (#19002)
only main_process will have HPO, and pass argument to other process

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
2022-09-13 17:56:20 +02:00
Rahul A R
00fc9217d1
Fixed bug which caused overwrite_cache to always be True (#19000)
* fixed bug which caused overwrite_cache to always be True (#18967).

* reformatting changes
2022-09-13 11:29:48 -04:00
Ankur Goyal
420f6c5ee3
Update default revision for document-question-answering (#18938)
Co-authored-by: Ankur Goyal <ankur@impira.com>
2022-09-13 10:04:03 -04:00
Yih-Dar
2886f7f08a
Fix tokenizer for XLMRobertaXL (#19004)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-13 14:04:14 +02:00
Partho
2848c9ce42
Add type hints for M2M (#18998)
* added type hints

* fixed typo
2022-09-13 12:58:46 +01:00
Joao Gante
4bd36f1853
Generate: add model class validation (#18902) 2022-09-13 09:19:43 +01:00
Alara Dirik
69df33f180
Fix MaskFormerFeatureExtractor instance segmentation preprocessing bug (#18997)
* fix preprocessing for instance segmentation maps

* add support for per-image instance2class_id mapping

* edit docstrings for clarity
2022-09-13 09:36:03 +03:00
Chris Emezue
470799b3a6
Removed issue in wav2vec link (#18945)
Fix connected to [this issue](https://github.com/huggingface/transformers/issues/18944)
2022-09-12 21:59:19 +02:00
Tobias Nusser
4c2e983f44
Fixed typo (#18921)
Fixed typo itmes --> items
2022-09-12 21:03:48 +02:00
Joao Gante
1182b945a6
TF: TF 2.10 unpin + related onnx test skips (#18995) 2022-09-12 19:30:27 +01:00
Partho
7f4708e1a2
added type hints (#18996) 2022-09-12 19:11:40 +01:00
Yih-Dar
39b5bb79d9
fix checkpoint name for wav2vec2 conformer (#18994)
* fix checkpoint name for wav2vec2 conformer

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-12 19:39:01 +02:00
Joao Gante
8a6928e28b
TF: correct TFBart embeddings weights name when load_weight_prefix is passed (#18993) 2022-09-12 18:35:45 +01:00
Matt
c126a239bc
Fix tflongformer int dtype (#18907)
* Use int64 throughout TFLongFormer

* make style

* Do some more fixed casting in TFLongFormer

* Fix some wonky "is None" conditionals

* Cast all the dtypes, salt the earth

* Fix copies to TFLED as well and do some casting there

* dtype fix in TFLongformer test

* Make fixup

* Expand tolerances on the LED tests too (I think this is a TF32 thing)

* Expand test tolerances for LED a tiny bit (probably a Tensorfloat thing again)
2022-09-12 17:51:10 +01:00
Sylvain Gugger
f7ceda345d
Align try_to_load_from_cache with huggingface_hub (#18966)
* Align try_to_load_from_cache with huggingface_hub

* Fix tests
2022-09-12 12:09:37 -04:00
Matt
cf450b776f
Fix TF start docstrings (#18991)
* Update our TF 2.0 input format tip across all models

* make style
2022-09-12 16:33:56 +01:00
Shijie Wu
adbf3a40de
Remove dropout in embedding layer of OPT (#18845) 2022-09-12 16:32:38 +02:00
Yih-Dar
367026000b
create Past CI results as tables for GitHub issue (#18953)
* create Past CI results as tables for GitHub issue

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-12 15:20:31 +02:00
Yih-Dar
0b36970371
Remove decoder_position_ids from check_decoder_model_past_large_inputs (#18980)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-12 15:19:48 +02:00
Wang, Yi
a86acb75ad
add DDP HPO support for sigopt (#18931)
only main_process will have HPO, and pass argument to other process

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
2022-09-12 07:37:25 -04:00
Shijie Wu
9faa9f9dac
remove unused activation dropout (#18842) 2022-09-12 11:00:24 +02:00
Sylvain Gugger
a26114777e
Revert "TF: unpin maximum TF version (#18917)" (#18972)
This reverts commit d8cf3b2087.
2022-09-10 09:11:46 -04:00
Joao Gante
d8cf3b2087
TF: unpin maximum TF version (#18917) 2022-09-10 13:33:01 +01:00
Joao Gante
00cbadb870
RFC: Replace custom TF embeddings by Keras embeddings (#18939) 2022-09-10 11:34:49 +01:00
Bram Vanroy
855dcae8bb
update black target version (#18955)
* update black target version

* add comment

as per https://github.com/huggingface/transformers/pull/18955#issuecomment-1242081649

* revert change

Will only update to 3.7 after black 2023 upgrade in January
2022-09-09 17:30:05 -04:00
Sylvain Gugger
645f174286
Exit early in load if no weights are in the sharded state dict (#18937) 2022-09-09 15:07:09 -04:00
Matt
660e0b97bd
Fix train_step, test_step and tests for CLIP (#18684)
* Fix train_step and test_step, correctly enable CLIP fit test

* Stop using get_args on older Python versions

* Don't use get_origin either

* UnionType is actually even newer, don't use that either

* Apply the same fix to test_loss_computation

* Just realized I was accidentally skipping a bunch of tests!

* Fix test_loss_computation for models without separable labels

* Fix scalar losses in test_step and train_step

* Stop committing your breakpoints

* Fix Swin loss shape

* Fix Tapas loss shape

* Shape fixes for TAPAS, DeIT, HuBERT and ViTMAE

* Add loss computation to TFMobileBertForPreTraining

* make fixup and move copied from statement

* make fixup and move copied from statement

* Correct copied from

* Add labels and next_sentence_label inputs to TFMobileBERT

* Make sure total_loss is always defined

* Update tests/test_modeling_tf_common.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Fix copied from

* Ensure CTC models get labels in tests

* Ensure CTC models get labels in tests

* Fix tests for vit_mae

* Fix tests for vit_mae

* Fix tests for vit_mae

* Reduce batch size for wav2vec2 testing because it was causing OOM

* Skip some TAPAS tests that are failing

* Skip a failing HuBERT test

* make style

* Fix mobilebertforpretraining test

* Skip Wav2Vec2 tests that use huge amounts of mem

* Skip keras_fit for Wav2Vec2 as well

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2022-09-09 20:01:02 +01:00