Patrick von Platen
90cddfa824
Add variant to transformers ( #21332 )
...
* Bump onnx in /examples/research_projects/decision_transformer
Bumps [onnx](https://github.com/onnx/onnx ) from 1.11.0 to 1.13.0.
- [Release notes](https://github.com/onnx/onnx/releases )
- [Changelog](https://github.com/onnx/onnx/blob/main/docs/Changelog.md )
- [Commits](https://github.com/onnx/onnx/compare/v1.11.0...v1.13.0 )
---
updated-dependencies:
- dependency-name: onnx
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
* adapt
* finish
* Update examples/research_projects/decision_transformer/requirements.txt
* up
* add tests
* Apply suggestions from code review
Co-authored-by: Lucain <lucainp@gmail.com>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
* fix test
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lucain <lucainp@gmail.com>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
2023-02-01 09:21:52 +01:00
Yih-Dar
bc44e947f3
Update Graphormer
and fix its torchscript
test failures ( #21380 )
...
* fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-31 17:32:25 +01:00
Joao Gante
19d67bfecb
Generate: fix TF XLA tests on models with max_position_embeddings
or max_target_positions
( #21389 )
2023-01-31 15:49:34 +00:00
Yih-Dar
6342427353
Remove more unused attributes in config classes ( #21327 )
...
* remove unused classifier_dropout
* remove unused dropout
* remove unused pooler_fn
* remove unnecessary is_encoder_decoder
* remove unnecessary drop_rate
* remove unused classifier_dropout
* remove unused classifier_dropout
* remove unused dropout
* remove unused dropout
* remove unused summary_* attributes
* remove unused tie_word_embeddings
* remove unused summary_* attributes
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-31 16:35:38 +01:00
raghavanone
da2a4d95a2
Add support of backward_prefetch and forward_prefetch ( #21237 )
...
* Add support of backward_prefetch and forward_prefetch
* Fix format issue
* Fix isort issue
* Fix doc style issue
* Update src/transformers/trainer.py
Co-authored-by: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com>
* Update src/transformers/training_args.py
Co-authored-by: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com>
* Update src/transformers/training_args.py
Co-authored-by: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com>
* Update src/transformers/training_args.py
Co-authored-by: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com>
* Fix black issue
* Fix doc-style issue
* Make additional fsdp parameters into fsdp config
* Fix black issue
* Remove unused imports
* Fix doc style issues
* Incorporate PR feedbacks
* Remove unused imports
* Fix tests
* Fix tests
* Fix tests
* Fix tests
* Fix tests
* Update src/transformers/training_args.py
Co-authored-by: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com>
* Fix tests
* Incorporate PR feedbacks
* Incorporate PR feedbacks
* Fix black issues
---------
Co-authored-by: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com>
2023-01-31 09:51:35 -05:00
Quentin Lhoest
074d6b75fd
Simplify column_names in run_clm/mlm ( #21382 )
...
* simplify column_names in run_clm
* simplify column_names in run_mlm
* minor
2023-01-31 15:23:47 +01:00
NielsRogge
c21298a69b
[Docs] Minor fixes ( #21383 )
...
* Improve docs
* Add DETA resources
---------
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2023-01-31 15:13:12 +01:00
regisss
d31497b196
Do not log the generation config for each prediction step in TrainerSeq2Seq ( #21385 )
...
Do not log the generation config for each iteration
2023-01-31 09:05:22 -05:00
Yih-Dar
98d40fed3a
Cleanup the usage of layer_norm_eps
in some models ( #21336 )
...
* fix
* fix
* make style
* For CLIP
* For OwlViT
* For XCLIP
* For CLIPSeg
* For GroupViT
* fix docstrings
* fix docstrings
* For AltCLIP
* For ChineseCLIP
* For Blip
* For GiT
* make style
* update
* update
* update
* fix
* fix
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-31 13:54:16 +01:00
Joao Gante
623346ab18
Template for framework-agnostic tests ( #21348 )
2023-01-31 11:33:18 +00:00
NielsRogge
5451f8896c
Add DETA ( #20983 )
...
* First draft
* Add initial draft of conversion script
* Convert all weights
* Fix config
* Add image processor
* Fix DetaImageProcessor
* Run make fix copies
* Remove timm dependency
* Fix dummy objects
* Improve loss function
* Remove conv_encoder attribute
* Update conversion scripts
* Improve postprocessing + docs
* Fix copied from statements
* Add tests
* Improve postprocessing
* Improve postprocessing
* Update READMEs
* More improvements
* Fix rebase
* Add is_torchvision_available
* Add torchvision dependency
* Fix typo and README
* Fix bug
* Add copied from
* Fix style
* Apply suggestions
* Fix thanks to @ydshieh
* Fix another dependency check
* Simplify image processor
* Add scipy
* Improve code
* Add threshold argument
* Fix bug
* Set default threshold
* Improve integration test
* Add another integration test
* Update setup.py
* Address review
* Improve deformable attention function
* Improve copied from
* Use relative imports
* Address review
* Replace assertions
* Address review
* Update dummies
* Remove dummies
* Address comments, update READMEs
* Remove custom kernel code
* Add image processor tests
* Add requires_backends
* Add minor comment
* Update scripts
* Update organization name
* Fix defaults, add doc tests
* Add id2label for object 365
* Fix tests
* Update task guide
2023-01-31 10:43:10 +01:00
Stas Bekman
98d88b23f5
[run_(clm|mlm).py
examples] add streaming dataset support ( #21343 )
...
* [run_clm example] add streaming dataset support
* unrefactor kwargs
* fix
* fix
* require datasets>=2.0.0
* port to mlm
2023-01-30 14:01:35 -08:00
BFSS
95be242adc
translate index to zh( #20095 ) ( #21351 )
...
translate index to zh
Co-authored-by: bfss <bfss@bfss.com>
2023-01-30 16:50:57 -05:00
Adit Krishnan
914e5009fa
Adding resource section to GPT-J docs ( #21270 )
...
* Added resource section to GPT-J docs
* Added most of the links found
* Addressing review comments
* Fixing formatting
* Update docs/source/en/model_doc/gptj.mdx
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* Fixing one of the labels
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2023-01-30 16:48:04 -05:00
Clémentine Fourrier
14d989a91d
Fixes path for Graphormer checkpoint ( #21367 )
...
[FIX] path for Graphormer checkpoint
2023-01-30 21:48:04 +01:00
Joao Gante
42b60f8b02
Generate: Relaxed max_length
and max_new_tokens
coexistence ( #21347 )
...
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2023-01-30 17:53:54 +00:00
Sylvain Gugger
6eb3c66a96
Add cPython files in build ( #21372 )
2023-01-30 11:19:30 -05:00
amyeroberts
59611a0f3a
Fix DETR tests after #21144 ( #21365 )
...
* Fix annotation check
* Fix annotation check
* Update type annotations
2023-01-30 15:55:00 +00:00
Yichao 'Peak' Ji
7a2e13204f
Remove duplicate declarations in dummy inputs for TFLongformer ( #21352 )
...
Remove duplicate declarations
2023-01-30 10:03:19 -05:00
简律纯
96addecff8
Corrected ( #21350 )
2023-01-30 09:38:15 -05:00
Wang, Yi
f3a7befffa
fix the issue that the output dict of jit model could not get [0] ( #21354 )
2023-01-30 09:23:55 -05:00
Yih-Dar
c749bd405e
Pipeline testing - using tiny models on Hub ( #20426 )
...
* rework pipeline tests
* run pipeline tests
* fix
* fix
* fix
* revert the changes in get_test_pipeline() parameter list
* fix expected error message
* skip a test
* clean up
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-30 10:39:43 +01:00
Yih-Dar
a582cfce3c
Fix GitModelIntegrationTest.test_batched_generation
device issue ( #21362 )
...
fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-30 10:37:56 +01:00
Maria Khalusova
73a2ff6974
Automated compatible models list for task guides ( #21338 )
...
* initial commit. added tip placeholders and a script
* removed unused imports, fixed paths
* fixed generated links
* make style
* split language modeling doc into two: causal language modeling and masked language modeling
* added check_task_guides.py to make fix-copies
* review feedback addressed
2023-01-27 13:19:28 -05:00
Lucain
8f3b4a1d5b
Little cleanup: let huggingface_hub manage token retrieval ( #21333 )
...
* Let huggingface_hub manage token retrieval
* flake8
* code quality
* adapt in every PushToHubMixin children
* add explicit return type
2023-01-27 12:09:49 -05:00
Arthur
0dff407d71
[Whisper] another patch ( #21324 )
...
* another patch
* fix timestamp test modeling
* let it be negative when the token is None
2023-01-27 16:35:16 +01:00
Yih-Dar
e5eb3e22ea
Fix RobertaPreLayerNorm
doctest ( #21337 )
...
* add mask="<mask>"
* update
* update
* fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-27 16:20:25 +01:00
dependabot[bot]
36b668fa06
Bump onnx from 1.11.0 to 1.13.0 in /examples/research_projects/decision_transformer ( #21331 )
...
Bump onnx in /examples/research_projects/decision_transformer
Bumps [onnx](https://github.com/onnx/onnx ) from 1.11.0 to 1.13.0.
- [Release notes](https://github.com/onnx/onnx/releases )
- [Changelog](https://github.com/onnx/onnx/blob/main/docs/Changelog.md )
- [Commits](https://github.com/onnx/onnx/compare/v1.11.0...v1.13.0 )
---
updated-dependencies:
- dependency-name: onnx
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-27 10:13:13 -05:00
Michael Benayoun
938f437c53
Fix M2M100 positional embedding creation for ONNX ( #21328 )
...
* Fix M2M100 positional embedding creation for ONNX
* Restore READMEs
* Trigger CI
2023-01-27 10:43:19 +01:00
altryne
7d2a5fa749
Update Hebrew language code to he per IANA registry ( #21310 )
...
Here's my original PR into whisper that changes the same:
https://github.com/openai/whisper/pull/401
Per [IANA registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry ), `iw` was deprecated as the code for Hebrew in 1989 and the preferred code is `he`
The correct subtag:
```
%%
Type: language
Subtag: he
Description: Hebrew
Added: 2005-10-16
Suppress-Script: Hebr
%%
```
And the deprecation
```
%%
Type: language
Subtag: iw
Description: Hebrew
Added: 2005-10-16
Deprecated: 1989-01-01
Preferred-Value: he
Suppress-Script: Hebr
%%
```
2023-01-26 13:34:39 -05:00
Younes Belkada
b225ee6ea0
[Doctest] Fix Perceiver
doctest ( #21318 )
...
fix `Perceiver` doctest
2023-01-26 17:16:37 +01:00
Joao Gante
2b8feffad5
Generate: better compute_transition_scores
examples ( #21323 )
2023-01-26 16:06:05 +00:00
Yih-Dar
449df41f01
Fix TFEncoderDecoder
tests ( #21301 )
...
remove max_length=None
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-26 16:56:42 +01:00
Yih-Dar
857bad6e53
check paths in utils/documentation_tests.txt
( #21315 )
...
* check paths in utils/documentation_tests.txt
* check paths in utils/documentation_tests.txt
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-26 15:33:47 +01:00
Nicolas Patry
fd0ef8b66d
Small QoL for qa. ( #21316 )
2023-01-26 14:50:09 +01:00
Wonhyeong Seo
a01dd3818f
[i18n-KO] Translated quicktour page to Korean ( #20946 )
...
docs: ko: quicktour page
review by @ArthurZucker
docs: fix: remove duplicate
Co-Authored-By: Arthur <48595927+ArthurZucker@users.noreply.github.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2023-01-26 14:10:02 +01:00
Yih-Dar
31336dcf3f
Fix 2 paths in the doctest list ( #21314 )
...
fix the list
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-26 12:07:08 +01:00
Yih-Dar
4e41b87e3d
Use model_class.__name__
and compare against XXX_MAPPING_NAMES
( #21304 )
...
* update
* update all
* clean up
* make quality
* clean up
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-26 11:31:31 +01:00
amyeroberts
d18a1cba24
Accept batched tensor of images as input to image processor ( #21144 )
...
* Accept a batched tensor of images as input
* Add to all image processors
* Update oneformer
2023-01-26 10:15:26 +00:00
Arthur
6f3faf3863
[WHISPER] Small patch ( #21307 )
...
* add small patch
* update tests, forced decoder ids is not prioritary against generation config
* fix two new tests
2023-01-25 22:49:23 +01:00
Nick Hill
140c6edeb9
Small fix to ExponentialDecayLengthPenalty docstring ( #21308 )
...
Currently, it incorrectly states that the exponential_decay_length_penalty tuple parameter is optional.
Also changed the corresponding type hint to be more specific.
2023-01-25 14:46:08 -05:00
Anahita Bhiwandiwalla
3a6e4a221c
Add BridgeTower model ( #20775 )
...
* Commit with BTModel and latest HF code
* Placeholder classes for BTForMLM and BTForITR
* Importing Bert classes from transformers
* Removed objectives.py and dist_utils.py
* Removed swin_transformer.py
* Add image normalization, BridgeTowerForImageAndTextRetrieval
* Add center_crop
* Removing bert tokenizer and LCI references
* Tested config loading from HF transformers hub
* Removed state_dict updates and added path to hub
* Enable center crop
* Getting image_size from config, renaming num_heads and num_layers
* Handling max_length in BridgeTowerProcessor
* Add BridgeTowerForMaskedLM
* Add doc string for BridgeTowerConfig
* Add doc strings for BT config, processor, image processor
* Adding docs, removed swin
* Removed convert_bridgetower_original_to_pytorch.py
* Added doc files for bridgetower, removed is_vision
* Add support attention_mask=None and BridgeTowerModelOutput
* Fix formatting
* Fixes with 'make style', 'make quality', 'make fixup'
* Remove downstream tasks from BridgeTowerModel
* Formatting fixes, add return_dict to BT models
* Clean up after doc_test
* Update BTModelOutput return type, fix todo in doc
* Remove loss_names from init
* implement tests and update tuples returned by models
* Add image reference to bridgetower.mdx
* after make fix-copies, make fixup, make style, make quality, make repo-consistency
* Rename class names with BridgeTower prefix
* Fix for image_size in BTImageProcessor
* implement feature extraction bridgetower tests
* Update image_mean and image_std to be list
* remove unused import
* Removed old comments
* Rework CLIP
* update config in tests followed config update
* Formatting fixes
* Add copied from for BridgeTowerPredictionHeadTransform
* Update bridgetower.mdx
* Update test_feature_extraction_bridgetower.py
* Update bridgetower.mdx
* BridgeTowerForMaskedLM is conditioned on image too
* Add BridgeTowerForMaskedLM
* Fixes
* Call post_init to init weights
* Move freeze layers into method
* Remove BTFeatureExtractor, add BT under multimodal models
* Remove BTFeatureExtractor, add BT under multimodal models
* Code review feedback - cleanup
* Rename variables
* Formatting and style to PR review feedback
* Move center crop after resize
* Use named parameters
* Style fix for modeling_bridgetower.py
* Update docs/source/en/model_doc/bridgetower.mdx
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update docs/source/en/model_doc/bridgetower.mdx
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update docs/source/en/model_doc/bridgetower.mdx
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/models/bridgetower/modeling_bridgetower.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/models/bridgetower/modeling_bridgetower.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update docs/source/en/model_doc/bridgetower.mdx
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
* Update src/transformers/models/bridgetower/modeling_bridgetower.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Rename config params, copy BERT classes, clean comments
* Cleanup irtr
* Replace Roberta imports, add BTTextConfig and Model
* Update docs, add visionconfig, consistent arg names
* make fixup
* Comments for forward in BTModel and make fixup
* correct tests
* Remove inconsistent roberta copied from
* Add BridgeTowerTextModel to dummy_pt_objects.py
* Add BridgeTowerTextModel to IGNORE_NON_TESTED
* Update docs for BT Text and Vision Configs
* Treat BridgeTowerTextModel as a private model
* BridgeTowerTextModel as private
* Run make fix-copies
* Adding BTTextModel to PRIVATE_MODELS
* Fix for issue with BT Text and Image configs
* make style changes
* Update README_ja.md
Add から to BridgeTower's description
* Clean up config, .mdx and arg names
* Fix init_weights. Remove nn.Sequential
* Formatting and style fixes
* Re-add tie_word_embeddings in config
* update test implementation
* update style
* remove commented out
* fix style
* Update README with abs for BridgeTower
* fix style
* fix mdx file
* Update bridgetower.mdx
* Update img src in bridgetower.mdx
* Update README.md
* Update README.md
* resolve style failed
* Update _toctree.yml
* Update README_ja.md
* Removed mlp_ratio, rename feats, rename BTCLIPModel
* Replace BTCLIP with BTVisionModel,pass in vision_config to BTVisionModel
* Add test_initialization support
* Add support for output_hidden_states
* Update support for output_hidden_states
* Add support for output_attentions
* Add docstring for output_hidden_states
* update tests
* add bridgetowervisionmodel as private model
* rerun the PR test
* Remove model_type, pass configs to classes, renames
* Change self.device to use weight device
* Remove image_size
* Style check fixes
* Add hidden_size and num_hidden_layers to BridgeTowerTransformer
* Update device setting
* cosmetic update
* trigger test again
* trigger tests again
* Update test_modeling_bridgetower.py
trigger tests again
* Update test_modeling_bridgetower.py
* minor update
* re-trigger tests
* Update docs/source/en/model_doc/bridgetower.mdx
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Remove pad, update max_text_len, doc cleanup, pass eps to LayerNorm
* Added copied to, some more review feedback
* make fixup
* Use BridgeTowerVisionEmbeddings
* Code cleanup
* Fixes for BridgeTowerVisionEmbeddings
* style checks
* re-tests
* fix embedding
* address comment on init file
* retrigger tests
* update import prepare_image_inputs
* update test_image_processing_bridgetower.py to reflect test_image_processing_common.py
* retrigger tests
Co-authored-by: Shaoyen Tseng <shao-yen.tseng@intel.com>
Co-authored-by: Tiep Le <tiep.le@intel.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
Co-authored-by: Tiep Le <97980157+tileintel@users.noreply.github.com>
2023-01-25 14:04:32 -05:00
Arthur
39799fbf85
[CI-Daily] replace past
in prepare inputs for generation ( #21296 )
...
replace `past` in prepare inputs for generation
2023-01-25 18:25:59 +01:00
Maria Khalusova
238449414f
Documentation code sample fixes ( #21302 )
...
* Fixed the following:
pipe -> pipeline
out in pipe(data()) is a list of dict, not a dict
* Fixed the TypeError: __init__() missing 1 required positional argument: 'key'
* Added a tip: code sample requires additional libraries to run
* Fixed custom config's name
* added seqeval to the required libraries
* fixed a missing dependency,
fixed metric naming,
added checkpoint to fix the datacollator
* added checkpoint to fix the datacollator,
added missing dependency
2023-01-25 11:33:39 -05:00
Younes Belkada
015443f42b
[Doctest] Fix Blenderbot
doctest ( #21297 )
...
fix blenderbot doctest
- add correct expected value
2023-01-25 17:28:29 +01:00
Yih-Dar
cc714d74c4
Update OneFormerModelIntegrationTest
expected values ( #21295 )
...
* update values
* update values
* update values
* Update tests/models/oneformer/test_modeling_oneformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2023-01-25 17:27:02 +01:00
Younes Belkada
63b204eadd
[Hubert] Fix Hubert processing auto ( #21299 )
...
* fix Hubert processing auto
* remove unneeded space
2023-01-25 16:36:31 +01:00
Yih-Dar
de2d793e83
Fix EfficientFormer
( #21294 )
...
* fix
* fix checkpoint
* fix style
* tiny update
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-25 16:09:15 +01:00
Nicolas Patry
8788fd0ceb
Moving to cleaner tokenizer version or oneformer
. ( #21292 )
...
Moving to cleaner tokenizer version.
2023-01-25 15:46:10 +01:00
Arthur
255257f3ea
[Whisper] Refactor whisper ( #21252 )
...
* update whisper logit processor
* add generate for whisper
* remove part of the whisper specific code from pipeline
* update logit processes
* major update
* enforce first timestamp
* update generate
* add more tests
* update new decoding strategy
* Apply suggestions from code review
* update docstring
* fixup
* default config will not have multilingual ar
* update expected tokenizer size, see pull on the hub for whisper-tiny
2023-01-25 13:09:43 +01:00