Patrick von Platen
5439cda7f0
Update README.md
2022-01-19 15:19:57 +01:00
Li-Huai (Allan) Lin
841d979190
Add FastTokenizer to REALM ( #15211 )
...
* Remove BertTokenizer abstraction
* Add FastTokenizer to REALM
* Fix config archive map
* Fix copies
* Update realm.mdx
* Apply suggestions from code review
2022-01-19 15:19:36 +01:00
Yih-Dar
021b52e7a8
fix name 'TFFunnelTokenizer' is not defined ( #15225 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-01-19 09:06:00 -05:00
Lysandre Debut
653379c094
Build dev documentation ( #15210 )
...
* Wrap up
* Remove secret
* Fix path
* Typo
Revert image switch
* Specific token for comments
* Cleaner comments
* Correct PR number
* Explicit master install
* Force uninstall
2022-01-19 08:47:34 -05:00
Matt
2708bfa127
Rename compute_loss in TF models ( #15207 )
...
* Rename compute_loss to hf_compute_loss to avoid conflicts with the new Keras method
* make style
* Adding deprecation warning to `compute_loss`
* Fix sneaky reference to compute_loss
* Replace logger.warning with warnings.warn
* Clarifying warning and deprecation timeline
2022-01-19 13:29:07 +00:00
Kamal Raj
d1f5ca1afd
[FLAX] glue training example refactor ( #13815 )
...
* refactor run_flax_glue.py
* updated readme
* rm unused import and args typo fix
* refactor
* make consistent arg name across task
* has_tensorboard check
* argparse -> argument dataclasses
* refactor according to review
* fix
2022-01-19 12:04:51 +01:00
Sylvain Gugger
db3503949d
Finish conversion of REALM doc to MDX
2022-01-18 18:00:30 -05:00
Jake Tae
fe78fe98ca
Enable tqdm toggling ( #15167 )
...
* feature: enable tqdm toggle
* test: add tqdm unit test
* style: run linter
* Update tests/test_tqdm_utils.py
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
* refactor: use tiny model, run linter
* docs: add tqdm to logging
* docs: add tqdm reference to `http_get`
* style: run linter
* Update docs/source/main_classes/logging.mdx
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
* fix: use `AutoConfig` for framework agnostic testing
* chore: mv tqdm test to `test_logging.py`
* feature: implement enable/disable functions
* docs: mv docstring to comment
* chore: mv tqdm functions to `logging.py`
* docs: update docs to reference `enable/disable` funcs
* test: update test to use `enable/disable` func
* chore: update function reference in comment
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
2022-01-18 17:52:35 -05:00
Sylvain Gugger
2c335037bd
Trigger doc build
2022-01-18 17:46:29 -05:00
Patrick von Platen
e118e085ea
[Robust Speech Event] Add guides ( #15155 )
...
* up
* improve readme
* up
* up
* more info
* up
* up
* Apply suggestions from code review
Co-authored-by: Anton Lozhkov <aglozhkov@gmail.com>
* add more stuff for eval
* update
* up
* Update README.md
* Update examples/research_projects/xls_r/README.md
Co-authored-by: Omar Sanseviero <osanseviero@users.noreply.github.com>
* apply omar's suggestions
Co-authored-by: Anton Lozhkov <aglozhkov@gmail.com>
Co-authored-by: Omar Sanseviero <osanseviero@users.noreply.github.com>
2022-01-18 18:44:48 +01:00
matt
1a354d53c4
Revert previous change - that was meant to be in a branch!
2022-01-18 17:34:26 +00:00
matt
2085f20901
Fix a sneaky reference to compute_loss in the tests
2022-01-18 17:33:38 +00:00
Yih-Dar
979ca24e39
[Fix doc example] Wrong checkpoint name ( #15079 )
...
* fix doc example - MarianForCausalLM example
* try to keep copies
* fix copies
* fix more similar doc examples
* fix more
* fix style
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-01-18 10:43:21 -05:00
PaulLerner
7b3d4df47a
fix : #14486 do not use BertPooler in DPR ( #15068 )
...
* fix : #14486 do not use BertPooler in DPR
* fix tf dpr as well
* finish
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-01-18 16:36:12 +01:00
NielsRogge
74bec9865c
Add MAE ( #15120 )
...
* First draft
* More improvements
* More improvements
* More improvements
* Fix embeddings
* Add conversion script
* Finish conversion script
* More improvements
* Fix forward pass
* Remove print statements
* Add weights initialization
* Add initialization of decoder weights
* Add support for other models in the conversion script
* Fix patch_size for huge model
* Fix most of the tests
* Fix integration test
* Fix docs
* Fix archive_list
* Apply suggestions from code review
* Improve documentation
* Apply more suggestions
* Skip some tests due to non-deterministic behaviour
* Fix test_initialization
* Remove unneccessary initialization of nn.Embedding
* Improve docs
* Fix dummies
* Remove ViTMAEFeatureExtractor from docs
* Add model to README and table of contents
* Delete inference file
2022-01-18 16:21:32 +01:00
Suraj Patil
2ae3be5442
[MBartTokenizer] remove dep on xlm-roberta tokenizer ( #15201 )
2022-01-18 16:02:56 +01:00
Sylvain Gugger
84c60a7b50
Ignore empty subfolders when identifying submodules ( #15204 )
...
* Ignore empty subfolders when identifying submodules
* Update utils/check_inits.py
2022-01-18 09:48:46 -05:00
Sylvain Gugger
6f0a9b41ef
Remove dependency to quiet Dependabot ( #15205 )
2022-01-18 09:44:35 -05:00
Patrick von Platen
497346d07e
[ASR pipeline] correct with lm pipeline ( #15200 )
...
* [ASR pipeline] correct with lm pipeline
* improve error
2022-01-18 15:36:22 +01:00
Sylvain Gugger
1144d336b6
Copies and docstring styling ( #15202 )
...
* Style docstrings when making/checking copies
* Polish
2022-01-18 09:16:55 -05:00
Sylvain Gugger
531336bbfd
Fix deprecation warnings for int div ( #15180 )
...
* Fix deprecation warnings for int div
Co-authored-by: mgoldey <matthew.goldey@gmail.com>
* Fix import
* ensure that tensor output is python scalar
* make backward compatible
* make code more readable
* adapt test functions
Co-authored-by: mgoldey <matthew.goldey@gmail.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-01-18 07:28:53 -05:00
Sylvain Gugger
f6d3fee855
Error when code examples are improperly closed ( #15186 )
2022-01-18 07:27:34 -05:00
Li-Huai (Allan) Lin
22454ae492
Add REALM ( #13292 )
...
* REALM initial commit
* Retriever OK (Update new_gelu).
* Encoder prediction score OK
* Encoder pretrained model OK
* Update retriever comments
* Update docs, tests, and imports
* Prune unused models
* Make embedder as a module `RealmEmbedder`
* Add RealmRetrieverOutput
* Update tokenization
* Pass all tests in test_modeling_realm.py
* Prune RealmModel
* Update docs
* Add training test.
* Remove completed TODO
* Style & Quality
* Prune `RealmModel`
* Fixup
* Changes:
1. Remove RealmTokenizerFast
2. Update docstrings
3. Add a method to RealmTokenizer to handle candidates tokenization.
* Fix up
* Style
* Add tokenization tests
* Update `from_pretrained` tests
* Apply suggestions
* Style & Quality
* Copy BERT model
* Fix comment to avoid docstring copying
* Make RealmBertModel private
* Fix bug
* Style
* Basic QA
* Save
* Complete reader logits
* Add searcher
* Complete searcher & reader
* Move block records init to constructor
* Fix training bug
* Add some outputs to RealmReader
* Add finetuned checkpoint variable names parsing
* Fix bug
* Update REALM config
* Add RealmForOpenQA
* Update convert_tfrecord logits
* Fix bugs
* Complete imports
* Update docs
* Update naming
* Add brute-force searcher
* Pass realm model tests
* Style
* Exclude RealmReader from common tests
* Fix
* Fix
* convert docs
* up
* up
* more make style
* up
* upload
* up
* Fix
* Update src/transformers/__init__.py
* adapt testing
* change modeling code
* fix test
* up
* up
* up
* correct more
* make retriever work
* update
* make style
* finish main structure
* Resolve merge conflict
* Make everything work
* Style
* Fixup
* Fixup
* Update training test
* fix retriever
* remove hardcoded path
* Fix
* Fix modeling test
* Update model links
* Initial retrieval test
* Fix modeling test
* Complete retrieval tests
* Fix
* style
* Fix tests
* Fix docstring example
* Minor fix of retrieval test
* Update license headers and docs
* Apply suggestions from code review
* Style
* Apply suggestions from code review
* Add an example to RealmEmbedder
* Fix
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-01-18 07:24:13 -05:00
Yih-Dar
b25067d807
[Fix doc example] TFRagModel ( #15187 )
...
* fix doc example - NameError: name 'PATH' is not defined
* fix name 'TFRagModel' is not defined
* correct TFRagRagSequenceForGeneration
* fix name 'tf' is not defined
* fix style
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-01-18 07:16:30 -05:00
Nicolas Patry
dea563c943
is_ctc
needs to be updated to `self.type == "ctc". (#15194 )
...
* `is_ctc` needs to be updated to `self.type == "ctc".
* Adding fast test for this functionality.
2022-01-18 12:20:10 +01:00
Yih-Dar
32090c729f
[Fix doc example] UniSpeechSatForPreTraining ( #15152 )
...
* fix doc example - cannot import name 'UniSpeechSatFeatureEncoder'
* fix ckpt name
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-01-18 00:34:05 +01:00
Sylvain Gugger
6f8e644f09
Mark bad tokenizers version ( #15188 )
2022-01-17 15:20:58 -05:00
Stas Bekman
edd3fce2f7
[doc] new MoE paper ( #15184 )
...
add new paper
2022-01-17 09:10:51 -08:00
Matt
9a2dabae70
Fix dtype issue in TF BART ( #15178 )
2022-01-17 14:02:55 +00:00
MrinalTyagi
0167edc854
Added forward pass of test_inference_image_classification_head with torch.no_grad() ( #14777 )
2022-01-17 07:22:41 -05:00
Patrick von Platen
7a787c68c6
[Speech models] Disable non-existing chunking in tests ( #15163 )
2022-01-16 17:15:19 +01:00
Stas Bekman
669e3c50c9
[doc] performance: Efficient Software Prebuilds ( #15147 )
...
* Efficient Software Prebuilds
* improve
2022-01-14 18:25:20 -08:00
Joao Gante
ebc4edfe7a
update from keras2onnx to tf2onnx ( #15162 )
2022-01-14 17:35:39 +00:00
Sylvain Gugger
1b730c3d11
Better dummies ( #15148 )
...
* Better dummies
* See if this fixes the issue
* Fix quality
* Style
* Add doc for DummyObject
2022-01-14 10:59:41 -05:00
Nicolas Patry
b212ff9f49
Fixing flaky test (hopefully). ( #15154 )
...
* Fixing flaky test (hopefully).
* tf compliant.
2022-01-14 16:47:03 +01:00
Joao Gante
7d9a33fb5c
TF Bert inference - support np.ndarray
optional arguments ( #15074 )
...
* TF Bert inference - support np.ndarray optional arguments
* apply np input tests to all TF architectures
2022-01-14 15:19:04 +00:00
AK391
4663c609b9
Add "open in hf spaces" gradio button issue #73 ( #15106 )
...
* update XLMProphetNet link
* update DPR link
* change prophetnet link
* change link MBART
* change link GPT
* update gpt2 link
* ctrl update link
* update Transformer-XL link
* Update Reformer link
* update xlnet link
* bert update link
* udpate albert link
* roberta update link
* update distilbert link
* update convbert link
* update XLM link
* xlm roberta update link
* update Flaubert link
* update electra link
* update funnel transformer and longformer
* bart update link
* pegasus update link
* udpate marianmt link
* t5 update link
* mt5 update link
2022-01-14 10:12:30 -05:00
novice
735d2bb69b
Update test_configuration_common.py ( #15160 )
2022-01-14 08:54:01 -05:00
SaulLu
51d7ebf260
fix BertTokenizerFast tokenize_chinese_chars
arg ( #15158 )
...
* add new test
* fix in init
* more relevant test
2022-01-14 14:22:03 +01:00
Yih-Dar
4aa16fce6c
fix doc example - object has no attribute 'lm_logits' ( #15143 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-01-14 13:42:13 +01:00
Sylvain Gugger
7cbf8429d9
Make sure all submodules are properly registered ( #15144 )
...
* Make sure all submodules are properly registered
* Try to fix tests
* Fix tests
2022-01-14 07:37:51 -05:00
Joao Gante
c4f7eb124b
add TF glu activation function ( #15146 )
2022-01-14 10:42:08 +00:00
Sylvain Gugger
5f3c57fc84
Check the repo consistency in model templates test ( #15141 )
...
* Check the repo consistency in model templates test
* Fix doc template
* Fix docstrings
* Fix last docstring
2022-01-14 04:52:38 -05:00
Sylvain Gugger
96881729ce
Remove assert on optional arg
2022-01-13 17:34:41 -05:00
Stas Bekman
1eb40338ac
[deepspeed tests] fix summarization ( #15149 )
2022-01-13 13:48:51 -08:00
Yanming Wang
6e058e84fd
Enable AMP for xla:gpu device in trainer class ( #15022 )
...
* Multiple fixes of trainer class with XLA GPU
* Make fp16 valid for xla:gpu
* Add mark_step in should_log to reduce compilation overhead
2022-01-13 15:21:00 -05:00
Carlos Aguayo
3fc221d077
Update model_sharing.mdx ( #15142 )
...
Fix typo
2022-01-13 12:26:02 -05:00
Manuel R. Ciosici
7b83feb50a
Deprecates AdamW and adds --optim
( #14744 )
...
* Add AdamW deprecation warning
* Add --optim to Trainer
* Update src/transformers/optimization.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/optimization.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/optimization.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/optimization.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/training_args.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/training_args.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/training_args.py
* fix style
* fix
* Regroup adamws together
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
* Change --adafactor to --optim adafactor
* Use Enum for optimizer values
* fixup! Change --adafactor to --optim adafactor
* fixup! Change --adafactor to --optim adafactor
* fixup! Change --adafactor to --optim adafactor
* fixup! Use Enum for optimizer values
* Improved documentation for --adafactor
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
* Add mention of no_deprecation_warning
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
* Rename OptimizerOptions to OptimizerNames
* Use choices for --optim
* Move optimizer selection code to a function and add a unit test
* Change optimizer names
* Rename method
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
* Rename method
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
* Remove TODO comment
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
* Rename variable
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
* Rename variable
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
* Rename function
* Rename variable
* Parameterize the tests for supported optimizers
* Refactor
* Attempt to make tests pass on CircleCI
* Add a test with apex
* rework to add apex to parameterized; add actual train test
* fix import when torch is not available
* fix optim_test_params when torch is not available
* fix optim_test_params when torch is not available
* re-org
* small re-org
* fix test_fused_adam_no_apex
* Update src/transformers/training_args.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/training_args.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/training_args.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Remove .value from OptimizerNames
* Rename optimizer strings s|--adam_|--adamw_|
* Also rename Enum options
* small fix
* Fix instantiation of OptimizerNames. Remove redundant test
* Use ExplicitEnum instead of Enum
* Add unit test with string optimizer
* Change optimizer default to string value
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
Co-authored-by: Stas Bekman <stas@stason.org>
2022-01-13 08:14:51 -08:00
Stas Bekman
762416ffa8
[examples/flax/language-modeling] set loglevel ( #15129 )
2022-01-13 15:17:28 +01:00
Yih-Dar
74837171ab
fix doc example - AssertionError: has to be configured as a decoder. ( #15124 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-01-13 06:45:30 -05:00