Wesley A. Cheng
875e07a9e3
[doc] Fix missing trainer import ( #16469 )
2022-03-29 18:57:43 +02:00
Yih-Dar
6358a4c8ec
Add TF vision model code samples ( #16477 )
...
* add code samples
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-29 18:57:16 +02:00
Wesley A. Cheng
3015d12bfb
fix wrong variable name ( #16467 )
2022-03-29 18:55:40 +02:00
Sylvain Gugger
b62ac4d240
Fix example test and test_fetcher for examples ( #16478 )
2022-03-29 12:21:19 -04:00
Yih-Dar
86cff21cf6
Fix some TF GPT-J CI testings ( #16454 )
...
* Fix for test_mixed_precision
* Fix test_saved_model_creation by using shape_list instead of shape
* skit test_model_from_pretrained on GPU for now to avoid GPU OOM
* skip test_gptj_sample_max_time for now
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-29 18:04:20 +02:00
Yih-Dar
aebca696af
Fix missing output_attentions in PT/Flax equivalence test ( #16271 )
...
* fix - set output_attentions to True
* Update tests/test_modeling_flax_common.py
* update for has_attentions
* overwrite check_outputs in FlaxBigBirdModelTest
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Suraj Patil <surajp815@gmail.com>
2022-03-29 17:51:48 +02:00
Steven Liu
45abb37ac9
Remove duplicate mLuke ( #16460 )
...
* Remove duplicate mLuke
* 🖍 apply feedback
2022-03-29 10:34:30 -05:00
Eldar Kurtic
5216607f8a
[MNLI example] Prevent overwriting matched with mismatched metrics ( #16475 )
...
* Prevent overwriting matched with mismatched metrics
* Fix style
2022-03-29 10:38:14 -04:00
Arnaud Stiegler
ed31ab3f10
Adding DocTest to TrOCR ( #16398 )
...
* docstring still WIP | adding to documentation_tests
* clean version | passes tests
* adding to documentation_test
* adding forward for training pass
* make fixup applied
* address comments
* fix doctest
* apply make fixup
* remove additional blank
* fix file to have correct split for prepare_for_doc_test
* Update src/transformers/models/trocr/modeling_trocr.py
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
* address comments
* changing text | adding loss check | make fixup
* make fixup
* Update src/transformers/models/trocr/modeling_trocr.py
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
* Update src/transformers/models/trocr/modeling_trocr.py
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
* Update src/transformers/models/trocr/modeling_trocr.py
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
* make fixup
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
2022-03-29 16:19:06 +02:00
Suraj Patil
85295621f1
Fix blenderbot conversion script ( #16472 )
2022-03-29 11:32:13 +02:00
lewtun
c85547af2b
Remove kwargs argument from IBERT MLM forward pass ( #16449 )
2022-03-28 16:37:56 +02:00
Fernando
da936942b0
Translation from english to spanish of file pipeline_tutorial.mdx ( #16149 )
...
* Add the translation from English to Spanish of the pipeline_tutorial.mdx file
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
* Update docs/source_es/pipeline_tutorial.mdx
Fix typo
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
Co-authored-by: fernando <fernando@gethitch.ai>
Co-authored-by: Omar U. Espejel <espejelomar@gmail.com>
2022-03-28 10:31:19 -04:00
NielsRogge
979b039c89
Add DPT ( #15991 )
...
* First draft
* More improvements
* Add fusion blocks
* Make conversion script work for dpt_large
* Make conversion script work
* Improve implementation
* Improve conversion script
* Add DPTForSemanticSegmentation
* Make conversion work for semantic segmentation
* Add tests
* Remove print statements
* First draft
* Redesign neck
* Improve tests
* Improve implementation some more
* Make neck output list of tensors
* Improve neck and feature extractor
* Fix integration tests
* Make more tests pass
* Make all tests pass
* Add missing config archive map
* Add in_index attribute to make heads accept list of tensors
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Apply some more suggestions
* Add copied from statements
* Remove assert
* Apply suggestions from code review
* Apply suggestions from code review
* Remove DPTInterpolate in favor of nn.Upsample
* Add comments
* Apply suggestions from code review
* Apply suggestions from code review
* Add proposed design
* Update design
* Add DPTReassembleLayer
* Add DPTFeatureFusionStage
* Apply more suggestions from code review
* Apply suggestions from code review
* Apply suggestions from code review
* Fix rebase
* Update in_index and out_indices
* Fix conversion script
* Fix code quality
* Add model to toctree and use DepthEstimatorOutput
* Fix rebase
* Fix code examples
* Improve code
* Fix copied from statements
* Apply suggestions from code review
* Remove compute_loss method
* Apply suggestions from code review
* Fix documentation tests file
* Remove test.py file
* Improve doc example
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Niels Rogge <nielsrogge@nielss-mbp.home>
2022-03-28 16:28:10 +02:00
Sanchit Gandhi
7ca4633555
[FlaxSpeechEncoderDecoderModel] Ensure Input and Output Word Embeddings Are **Not** Tied ( #16444 )
...
* [FlaxSpeechEncoderDecoderModel] Ensure Input and Output Word Embeddings Are **Not** Tied
* rebase
2022-03-28 14:14:10 +02:00
Jaesun Park
e0ac72b7bd
Fix PerceiverMLP and test ( #16405 )
...
Co-authored-by: Jaesun Park <jaesun.park1@navercorp.com>
2022-03-28 14:06:48 +02:00
Sylvain Gugger
473709fc76
Use doc builder styler ( #16412 )
...
* Config update
* Use doc-builder styler
* Cleanup
* Adapt import
* We need it there too!
2022-03-28 07:45:18 -04:00
Yongrae Jo
8049dfa427
Update run_t5_mlm_flax.py ( #16421 )
...
Fix typo in comment: proprocessed -> preprocessed
2022-03-28 06:00:53 -04:00
Sanchit Gandhi
925fc57b70
[Flax] Improve Robustness of Back-Prop Tests ( #16418 )
...
* [Flax] Improve Robustness of Back-Prop Tests
* check equality of logits/outputs
* make fixup
2022-03-28 11:56:54 +02:00
Shang Zhang
7ecbb9c5e4
QDQBert example update ( #16395 )
...
* update Dockerfile and utils_qa
* Update README.md
2022-03-28 05:47:52 -04:00
Julien Chaumond
f6f6866e9e
cached_download ∘ hf_hub_url
is hf_hub_download
(#16375 )
2022-03-28 05:43:39 -04:00
Kurian Benoy
c88ff66cc8
Fix broken links ( #16113 )
...
* Update marian.mdx
* Update marian.mdx
* Update docs/source/model_doc/marian.mdx
Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
* Update marian.mdx
Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
2022-03-28 05:38:17 -04:00
Jia
342ff6eb41
Update comments in class BatchEncoding ( #15932 )
2022-03-28 05:19:12 -04:00
Nathan Glenn
e02f95b229
remove references to PDF reading via PIL ( #15293 )
...
* fix confusing PIL instructions
As stated in the documentation
[here](https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html?highlight=pdf#write-only-formats ),
PIL can only write PDF's, not read them. Remove references to reading
PDF's via PIL from this page to avoid confusion.
* mention PDF in doc examples using PIL
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Be explicit: PDFs must be converted to images
* fix formatting
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
2022-03-28 05:00:29 -04:00
Shamima
3dc8242716
TF: removed inputs_processing and replaced with decorator in lxmert ( #16414 )
2022-03-27 18:09:15 +01:00
Steven Liu
b320d87ece
Create concept guide section ( #16369 )
...
* ✨ create concept guide section
* 🖍 make fixup
* 🖍 apply feedback
Co-authored-by: Steven <stevhliu@gmail.com>
2022-03-25 14:51:43 -05:00
Daniel Stancl
ed2ee373d0
Add TF implementation of GPT-J ( #15623 )
...
* Initial commit
* Add TFGPTJModel
* Fix a forward pass
* Add TFGPTJCausalLM
* Add TFGPTJForSequenceClassification
* Add TFGPTJForQuestionAnswering
* Fix docs
* Deal with TF dynamic shapes
* Add Loss parents to models
* Adjust split and merge heads to handle 4 and 5-dim tensors
* Update outputs for @tooslow tests
2022-03-25 19:27:19 +00:00
Sanchit Gandhi
aa4c0a86dc
Fix Typo in Argument of FlaxWav2Vec2ForPreTrainingModule ( #16084 )
2022-03-25 17:49:37 +01:00
Sanchit Gandhi
e231c72906
[FlaxSpeechEncoderDecoder] Fix feature extractor gradient test ( #16407 )
2022-03-25 17:46:53 +01:00
lewtun
a97f3150c4
Add ONNX support for Blenderbot and BlenderbotSmall ( #15875 )
...
* Add ONNX support for Blenderbot
* Add BlenderbotSmall ONNX configuration
* Update serialization table
2022-03-25 17:04:43 +01:00
Sylvain Gugger
b473617d63
Checkpoint sharding ( #16343 )
...
* Sharded checkpoint support
* Handle distant sharded checkpoints
* Add tests
* TODO is done
* Apply suggestions from code review
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
* Fix docstring
* Add example and format
* Address review comments
* More review comments
* End of merge
* Revert unintentional change
* VsCode what did you do?
* Style
* Changes
* Address final comments
* Quality
* Moar tests
* Move import beneath is_pt_available
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
2022-03-25 11:59:25 -04:00
Matt
7fa7408b26
Terminate previous pushes when we get to the final push ( #16409 )
2022-03-25 15:47:05 +00:00
Sylvain Gugger
867f3950fa
Rename master to main for notebooks links and leftovers ( #16397 )
2022-03-25 09:12:23 -04:00
Atharva Ingle
7e7490473e
fixed typo from enable to disable in disable_progress_bar function ( #16406 )
2022-03-25 09:07:43 -04:00
Sylvain Gugger
088c1880b7
Big file_utils cleanup ( #16396 )
...
* Big file_utils cleanup
* This one still needs to be treated separately
2022-03-25 07:25:20 -04:00
Michael Benayoun
2b23e0801a
Make FeaturesManager.get_model_from_feature a static method ( #16357 )
2022-03-25 11:35:48 +01:00
NielsRogge
aa6cfe9c4b
Rename to SemanticSegmenterOutput ( #15849 )
...
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-03-24 20:44:15 +01:00
Yi Heng Lim
70a9bc69a8
Added type hints ( #16389 )
...
* Added type hints for PyTorch T5 model
* removed a type hint
* ran make style
* added type hints for ibert pytorch
* added type hints for lxmert pytorch
* removed kwargs type hint and fixed arguments order
2022-03-24 19:14:34 +00:00
Sylvain Gugger
cae394c8fa
Adapt import to new structure
2022-03-24 14:40:05 -04:00
Robot Jelly
4e0f583eea
TF - variable naming for Distilbert model (unpack_inputs decorator) ( #16384 )
...
* variable naming for Distilbert model
* adding unpack inputs at top
* make style/quality
Co-authored-by: matt <rocketknight1@gmail.com>
2022-03-24 16:13:08 +00:00
Sylvain Gugger
3a0f1684c3
Fix readme links and add CI check ( #16392 )
...
* Fix doc links in README
* Fix name
* Fix links in READMEs and doc index
* Error if there is something wrong so the CI knows
2022-03-24 11:59:09 -04:00
Lysandre Debut
8cbd9b8fb1
Fix style ( #16391 )
2022-03-24 11:47:49 -04:00
Yih-Dar
9d88be5778
bump cookiecutter version ( #16387 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-24 11:08:31 -04:00
Yih-Dar
f571dc20ac
Update PT Flax equivalence tests in PT test file ( #16280 )
...
* update PT/Flax equivalence tests on PT side
* overwrite check_outputs in BigBirdModelTest
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-24 14:45:30 +01:00
Zehua Li
41bfc1e262
Add type hints for ConvBert model ( #16377 )
...
* Add missing type hints for ConvBERT flavored models.
* Update src/transformers/models/convbert/modeling_convbert.py
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
2022-03-24 13:23:54 +00:00
Dahlbomii
23a75a5338
Type hints and decorator for TF T5 ( #16376 )
...
* Type hints and TF decorator added
* Re-add XLA generation method
* Re-add lines that were deleted by conflicting updates
* Re-add lines that were deleted by conflicting updates
* Re-add lines that were deleted by conflicting updates
Co-authored-by: matt <rocketknight1@gmail.com>
2022-03-24 13:19:40 +00:00
Yih-Dar
2a27c80063
Fix BigBirdModelTester ( #16310 )
...
* fix
* update the expected value in test_fast_integration
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-24 13:43:52 +01:00
Nathan Cooper
f5e8c9bdea
Update readme with how to train offline and fix BPE command ( #15897 )
...
* Update readme with how to train offline and fix BPE command
* Update examples/research_projects/codeparrot/README.md
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>
* Update examples/research_projects/codeparrot/README.md
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>
Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>
2022-03-24 11:00:46 +01:00
Yih-Dar
9badcecf69
[Doctests] Make TFRoberta-like meaningfull ( #16370 )
...
* update doc examples for TFRoberta
* fix style
* fix style
* use TF ckpt
* apply suggestion
* add the code file to test here
* fix style
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-03-24 10:26:27 +01:00
Patrick von Platen
77c5a80536
[Doctests] Make roberta-like meaningfull ( #16363 )
...
* [Doctests] Make roberta-like meaningfull
* correct
* final correct
* Trigger test
* make style
* apply suggestion from sylvain
2022-03-24 00:17:00 +01:00
Xu Zhao
5f0d07b36b
Make BigBird model compatiable to fp16 dtype. ( #16034 )
...
* Make BigBird model compatiable to fp16 dtype.
* Use tree_map instead of map
* Reformat the code
* Fix import order
* Convert masks to the correct dtype
* Fix format issue
* Address comments.
2022-03-24 00:07:34 +01:00