Kashif Rasul
5cd16f01db
time series forecasting model ( #17965 )
...
* initial files
* initial model via cli
* typos
* make a start on the model config
* ready with configuation
* remove tokenizer ref.
* init the transformer
* added initial model forward to return dec_output
* require gluonts
* update dep. ver table and add as extra
* fixed typo
* add type for prediction_length
* use num_time_features
* use config
* more config
* typos
* opps another typo
* freq can be none
* default via transformation is 1
* initial transformations
* fix imports
* added transform_start_field
* add helper to create pytorch dataloader
* added inital val and test data loader
* added initial distr head and loss
* training working
* remove TimeSeriesTransformerTokenizer
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/__init__.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/__init__.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fixed copyright
* removed docs
* remove time series tokenizer
* fixed docs
* fix text
* fix second
* fix default
* fix order
* use config directly
* undo change
* fix comment
* fix year
* fix import
* add additional arguments for training vs. test
* initial greedy inference loop
* fix inference
* comment out token inputs to enc dec
* Use HF encoder/decoder
* fix inference
* Use Seq2SeqTSModelOutput output
* return Seq2SeqTSPredictionOutput
* added default arguments
* fix return_dict true
* scale is a tensor
* output static_features for inference
* clean up some unused bits
* fixed typo
* set return_dict if none
* call model once for both train/predict
* use cache if future_target is none
* initial generate func
* generate arguments
* future_time_feat is required
* return SampleTSPredictionOutput
* removed unneeded classes
* fix when params is none
* fix return dict
* fix num_attention_heads
* fix arguments
* remove unused shift_tokens_right
* add different dropout configs
* implement FeatureEmbedder, Scaler and weighted_average
* remove gluonts dependency
* fix class names
* avoid _variable names
* remove gluonts dependency
* fix imports
* remove gluonts from configuration
* fix docs
* fixed typo
* move utils to examples
* add example requirements
* config has no freq
* initial run_ts_no_trainer
* remove from ignore
* fix output_attentions and removed unsued getters/setters
* removed unsed tests
* add dec seq len
* add test_attention_outputs
* set has_text_modality=False
* add config attribute_map
* make style
* make fix-copies
* add encoder_outputs to TimeSeriesTransformerForPrediction forward
* Improve docs, add model to README
* added test_forward_signature
* More improvements
* Add more copied from
* Fix README
* Fix remaining quality issues
* updated encoder and decoder
* fix generate
* output_hidden_states and use_cache are optional
* past key_values returned too
* initialize weights of distribution_output module
* fixed more tests
* update test_forward_signature
* fix return_dict outputs
* Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* removed commented out tests
* added neg. bin and normal output
* Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* move to one line
* Add docstrings
* Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* add try except for assert and raise
* try and raise exception
* fix the documentation formatting
* fix assert call
* fix docstring formatting
* removed input_ids from DOCSTRING
* Update input docstring
* Improve variable names
* Update order of inputs
* Improve configuration
* Improve variable names
* Improve docs
* Remove key_length from tests
* Add extra docs
* initial unittests
* added test_inference_no_head test
* added test_inference_head
* add test_seq_to_seq_generation
* make style
* one line
* assert mean prediction
* removed comments
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fix order of args
* make past_observed_mask optional as well
* added Amazon license header
* updated utils with new fieldnames
* make style
* cleanup
* undo position of past_observed_mask
* fix import
* typo
* more typo
* rename example files
* remove example for now
* Update docs/source/en/_toctree.yml
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update modeling_time_series_transformer.py
fix style
* fixed typo
* fix typo and grammer
* fix style
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: NielsRogge <niels.rogge1@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-09-30 15:32:59 -04:00
Yih-Dar
f33858d18a
Fix Encoder-Decoder testing issue about repo. names ( #19250 )
...
* Change "../gpt2" to "gpt2"
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-30 18:15:07 +02:00
Matt
368b649af6
Rebase ESM PR and update all file formats ( #19055 )
...
* Rebase ESM PR and update all file formats
* Fix test relative imports
* Add __init__.py to the test dir
* Disable gradient checkpointing
* Remove references to TFESM... FOR NOW >:|
* Remove completed TODOs from tests
* Convert docstrings to mdx, fix-copies from BERT
* fix-copies for the README and index
* Update ESM's __init__.py to the modern format
* Add to _toctree.yml
* Ensure we correctly copy the pad_token_id from the original ESM model
* Ensure we correctly copy the pad_token_id from the original ESM model
* Tiny grammar nitpicks
* Make the layer norm after embeddings an optional flag
* Make the layer norm after embeddings an optional flag
* Update the conversion script to handle other model classes
* Remove token_type_ids entirely, fix attention_masking and add checks to convert_esm.py
* Break the copied from link from BertModel.forward to remove token_type_ids
* Remove debug array saves
* Begin ESM-2 porting
* Add a hacky workaround for the precision issue in original repo
* Code cleanup
* Remove unused checkpoint conversion code
* Remove unused checkpoint conversion code
* Fix copyright notices
* Get rid of all references to the TF weights conversion
* Remove token_type_ids from the tests
* Fix test code
* Update src/transformers/__init__.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/__init__.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update README.md
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Add credit
* Remove _ args and __ kwargs in rotary embedding
* Assertively remove asserts
* Replace einsum with torch.outer()
* Fix docstring formatting
* Remove assertions in tokenization
* Add paper citation to ESMModel docstring
* Move vocab list to single line
* Remove ESMLayer from init
* Add Facebook copyrights
* Clean up RotaryEmbedding docstring
* Fix docstring formatting
* Fix docstring for config object
* Add explanation for new config methods
* make fix-copies
* Rename all the ESM- classes to Esm-
* Update conversion script to allow pushing to hub
* Update tests to point at my repo for now
* Set config properly for tests
* Remove the gross hack that forced loss of precision in inv_freq and instead copy the data from the model being converted
* make fixup
* Update expected values for slow tests
* make fixup
* Remove EsmForCausalLM for now
* Remove EsmForCausalLM for now
* Fix padding idx test
* Updated README and docs with ESM-1b and ESM-2 separately (#19221 )
* Updated README and docs with ESM-1b and ESM-2 separately
* Update READMEs, longer entry with 3 citations
* make fix-copies
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Tom Sercu <tsercu@fb.com>
Co-authored-by: Your Name <you@example.com>
2022-09-30 14:16:25 +01:00
NielsRogge
f3d2f7a6e0
Add MarkupLM ( #19198 )
...
* First draft
* Make basic test work
* Fix most tokenizer tests
* More improvements
* Make more tests pass
* Fix more tests
* Fix some code quality
* Improve truncation
* Implement feature extractor
* Improve feature extractor and add tests
* Improve feature extractor tests
* Fix pair_input test partly
* Add fast tokenizer
* Improve implementation
* Fix rebase
* Fix rebase
* Fix most of the tokenizer tests.
* propose solution for fast
* add: integration test for fasttokenizer, warning for decode, fix template in slow tokenizer
* add: modify markuplmconverter
* add: some modify on converter and tokenizerfast
* Fix style, copies
* Make fixup
* Update tokenization_markuplm.py
* Update test_tokenization_markuplm.py
* Update markuplm related
* Improve processor, add integration test
* Add processor test file
* Improve processor
* Improve processor tests
* Fix more processor tests
* Fix processor tests
* Update docstrings
* Add Copied from statements
* Add more Copied from statements
* Add code examples
* Improve code examples
* Add model to doc tests
* Adding dependency check
* Add dummy file
* Add requires_backends
* Add model to toctree
* Fix more things, disable dependency check for now
* Apply more suggestions
* Add soft dependency
* Add annotators to tests
* Fix style
* Remove from_slow=True
* Remove print statements
* Add sanity check
* Fix processor test
* Fix processor tests, add more docs
* Add doc tests for mdx file
* Add more tips
* Apply suggestions
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
Co-authored-by: lockon-n <45759388+lockon-n@users.noreply.github.com>
Co-authored-by: SaulLu <lucilesaul.com@gmail.com>
Co-authored-by: lockon-n <dd098309@126.com>
2022-09-30 08:25:43 +02:00
Aritra Roy Gosthipaty
0dc7b3a785
[TensorFlow] Adding GroupViT ( #18020 )
...
* chore: initial commit
* chore: adding util methods
yet to work on the nn.functional.interpolate port with align_corener=True
* chore: refactor the utils
* used tf.compat.v1.image.resize to align the F.interpolate function
* added type hints to the method signatures
* added references to the gists where one 2 one alignment of torch and tf has been shown
* chore: adding the layers
* chore: porting all the layers from torch to tf
This is the initial draft, nothing is tested yet.
* chore: aligning the layers with reference to tf clip
* chore: aligning the modules
* added demaraction comments
* added copied and adapted from comments
* chore: aligning with CLIP
* chore: wrangling the layers to keep it tf compatible
* chore: aligning the names of the layers for porting
* chore: style changes
* chore: adding docs and inits
* chore: adding tfp dependencis
the code is taken from TAPAS
* chore: initial commit for testing
* chore: aligning the vision embeddings with the vit implementatino
* chore: changing model prefix
* chore: fixing the name of the model and the layer normalization test case
* chore: every test passes but the slow ones
* chore: fix style and integration test
* chore: moving comments below decorators
* chore: make fixup and fix-copies changes
* chore: adding the Vision and Text Model to check_repo
* chore: modifying the prefix name to align it with the torch implementation
* chore: fix typo in configuration
* choer: changing the name of the model variable
* chore: adding segmentation flag
* chore: gante's review
* chore: style refactor
* chore: amy review
* chore: adding shape_list to parts that have been copied from other snippets
* chore: init batchnorm with torch defaults
* chore: adding shape_list to pass the tests
* test fix: adding seed as 0
* set seed
* chore: changing the straight through trick to fix -ve dimensinos
* chore: adding a dimension to the loss
* chore: adding reviewers and contributors names to the docs
* chore: added changes after review
* chore: code quality fixup
* chore: fixing the segmentation snippet
* chore: adding to the layer calls
* chore: changing int32 to int64 for inputs of serving
* chore: review changes
* chore: style changes
* chore: remove from_pt=True
* fix: repo consistency
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-29 10:48:04 +01:00
Gabriele Sarti
9d732fd2dd
XGLM - Fix Softmax NaNs when using FP16 ( #18057 )
...
* fix fp16 for xglm
* Removed misleading comment
* Fix undefined variable
Co-authored-by: Gabriele Sarti <gsarti@amazon.com>
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
2022-09-29 10:42:07 +02:00
Sylvain Gugger
c20b2c7e18
Use repo_type instead of deprecated datasets repo IDs ( #19202 )
...
* Use repo_type instead of deprecated datasets repo IDs
* Add missing one in doc
2022-09-26 09:50:48 -04:00
Yih-Dar
ea75e9f10e
Use assertAlmostEqual
in BloomEmbeddingTest.test_logits
( #19200 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-26 14:56:41 +02:00
Alara Dirik
7e84723fe4
Add semantic segmentation post-processing method to MobileViT ( #19105 )
...
* add post-processing method for semantic segmentation
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-09-23 16:24:28 +03:00
Sayak Paul
3a396c59b8
fix: ckpt paths. ( #19159 )
2022-09-22 11:03:01 -04:00
Sayak Paul
2d9853b226
MSN (Masked Siamese Networks) for ViT ( #18815 )
...
* feat: modeling and conversion scripts for msn.
* chore: change license year.
* chore: remove unneeded modules.
* feat: direct loading of state_dict from remote url.
* fix: import paths.
* add: rest of the files.
* add and fix rest of the files.
Co-authored-by: Niels <niels.rogge1@gmail.com>
* chore: formatting.
* code quality fix.
* chore: remove pooler.
* feat: add classification top.
* fix: configuration object.
* add: initial test cases (one failing).
* fix: basemodeloutput.
* add: caution on using the classification head.
* add: rest of the model related files.
* add: vit msn readme.
* fix: copied from statement.
* fix: dummy objects.
* add: ViTMSNPreTrainedModel to inits.
* fix: repo consistency.
* minor change in the model doc.
* fix: tests.
* Empty-Commit
* Update src/transformers/models/vit_msn/configuration_vit_msn.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* address PR comments.
* Update src/transformers/models/vit_msn/modeling_vit_msn.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* chore: put model in no_grad() and formatting.
Co-authored-by: Niels <niels.rogge1@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2022-09-22 07:15:03 -04:00
Younes Belkada
4d0f8c05f5
Add accelerate
support for ViLT ( #18683 )
2022-09-22 13:14:39 +02:00
NielsRogge
9393f966bc
[fix] Add DeformableDetrFeatureExtractor ( #19140 )
...
* Add DeformableDetrFeatureExtractor
* Fix post_process
* Fix name
* Add tests for feature extractor
* Fix doc tests
* Fix name
* Address comments
* Apply same fix to DETR and YOLOS as well
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-09-22 09:45:24 +02:00
DepuMeng
126a739058
Add support for conditional detr ( #18948 )
...
* added conditional_detr files
* checked copies
* checked copies
* fixed style and copies
* fixed style and copies
* fixed hub
* fixed style
* Update README.md
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/en/_toctree.yml
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/en/index.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/convert_conditional_detr_original_pytorch_checkpoint_to_pytorch.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/en/model_doc/conditional_detr.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fixed some doc issue
* changed prefix to ConditionalDetr
* fixed docs
* Update README_ko.md
* added spatial_model_name
* fixed fix-copies
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* added some copied from
* added some copied from
* added some copied from
* added some copied from
* fixed use_pretrained issue
* changed post-process
* added conditional_detr files
* checked copies
* checked copies
* fixed style and copies
* fixed style and copies
* fixed hub
* fixed style
* Update README.md
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/en/_toctree.yml
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/en/index.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/convert_conditional_detr_original_pytorch_checkpoint_to_pytorch.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fixed some doc issue
* Update docs/source/en/model_doc/conditional_detr.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* changed prefix to ConditionalDetr
* fixed docs
* Update README_ko.md
* added spatial_model_name
* fixed fix-copies
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* added some copied from
* added some copied from
* added some copied from
* added some copied from
* fixed use_pretrained issue
* changed post-process
* fix style quality and copies
* fix style quality and copies
* fix style quality and copies
* fix style quality and copies
* add more fix-copies
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fixed some variable names & added more fix-copies
* fixed some variable names & added more fix-copies
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* added more copied from
* fixed quality
* changed pretrained config
* added more copied-from and fixed the issue in feature_extraction_auto
* added conditional_detr files
* checked copies
* checked copies
* fixed style and copies
* fixed style and copies
* fixed hub
* fixed style
* Update README.md
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/en/_toctree.yml
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/en/index.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/convert_conditional_detr_original_pytorch_checkpoint_to_pytorch.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fixed some doc issue
* Update docs/source/en/model_doc/conditional_detr.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* changed prefix to ConditionalDetr
* fixed docs
* Update README_ko.md
* added spatial_model_name
* fixed fix-copies
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* added some copied from
* added some copied from
* added some copied from
* added some copied from
* fixed use_pretrained issue
* changed post-process
* added conditional_detr files
* checked copies
* fixed style and copies
* fixed some doc issue
* changed prefix to ConditionalDetr
* fixed docs
* added spatial_model_name
* fixed fix-copies
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* added some copied from
* added some copied from
* added some copied from
* added some copied from
* fix style quality and copies
* fix style quality and copies
* fix style quality and copies
* add more fix-copies
* fixed some variable names & added more fix-copies
* fixed some variable names & added more fix-copies
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* added more copied from
* fixed quality
* changed pretrained config
* added more copied-from and fixed the issue in feature_extraction_auto
* fixed style
* added conditional_detr files
* checked copies
* checked copies
* fixed style and copies
* fixed style and copies
* fixed hub
* fixed style
* Update README.md
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/en/_toctree.yml
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/en/index.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/convert_conditional_detr_original_pytorch_checkpoint_to_pytorch.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fixed some doc issue
* Update docs/source/en/model_doc/conditional_detr.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* changed prefix to ConditionalDetr
* fixed docs
* Update README_ko.md
* added spatial_model_name
* fixed fix-copies
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* added some copied from
* added some copied from
* added some copied from
* added some copied from
* fixed use_pretrained issue
* changed post-process
* added conditional_detr files
* checked copies
* fixed style and copies
* fixed some doc issue
* changed prefix to ConditionalDetr
* fixed docs
* added spatial_model_name
* fixed fix-copies
* Update src/transformers/models/conditional_detr/modeling_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* added some copied from
* added some copied from
* added some copied from
* added some copied from
* fix style quality and copies
* fix style quality and copies
* fix style quality and copies
* add more fix-copies
* fixed some variable names & added more fix-copies
* fixed some variable names & added more fix-copies
* Update src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/conditional_detr/configuration_conditional_detr.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* added more copied from
* fixed quality
* changed pretrained config
* added more copied-from and fixed the issue in feature_extraction_auto
* rebased
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: Depu Meng <depumeng@Depus-MacBook-Pro.local>
2022-09-22 09:45:04 +02:00
Alara Dirik
e7fdfc720a
Add post_process_semantic_segmentation method to DPTFeatureExtractor ( #19107 )
...
* add post-processing method for semantic segmentation
* add test for post-processing
2022-09-21 15:15:26 +03:00
Alara Dirik
9e95706648
Add post_process_semantic_segmentation method to SegFormer ( #19072 )
...
* add post_process_semantic_segmentation method to SegformerFeatureExtractor
* add test for semantic segmentation post-processing
2022-09-21 11:40:35 +03:00
Yih-Dar
18643ff29a
Skip test_export_to_onnx
for LongT5
if torch
< 1.11 ( #19122 )
...
* Skip if torch < 1.11
* fix quality
* fix import
* fix typo
* fix condition
* fix condition
* fix condition
* fix quality
* fix condition
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-20 21:52:18 +02:00
Alara Dirik
36b9a99433
Fix BeitFeatureExtractor postprocessing ( #19119 )
...
* return post-processed segmentations as list, add test
* use torch to resize logits
* fix assertion error if no target_size is specified
2022-09-20 18:53:40 +03:00
Joao Gante
658010c739
TF: tests for (de)serializable models with resized tokens ( #19013 )
...
* resized models that we can actually load
* separate embeddings check
* add test for embeddings out of bounds
* add fake slows
2022-09-16 16:38:08 +01:00
Michael Benayoun
c603c80f46
FX support for ConvNext, Wav2Vec2 and ResNet ( #19053 )
...
* Support for ConvNext
* Support for Wav2Vec2
* Support for Resnet
* Fix small issue in test_modeling_convnext
2022-09-16 10:57:41 +02:00
Shijie Wu
f3d3863255
fix arg name in BLOOM testing and remove unused arg document ( #18843 )
2022-09-15 20:25:32 +02:00
Nicolas Patry
68bb33d770
Fixing OPT fast tokenizer option. ( #18753 )
...
* Fixing OPT fast tokenizer option.
* Remove dependency on `pt`.
* Move it to GPT2 tokenization tests.
* Added a few tests.
2022-09-15 17:12:58 +02:00
Yih-Dar
0a42b61ede
Fix test_save_load
for TFViTMAEModelTest
( #19040 )
...
* Fix test_save_load for TFViTMAEModelTest
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-15 15:21:57 +02: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
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
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
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
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
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
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
Joao Gante
1182b945a6
TF: TF 2.10 unpin + related onnx test skips ( #18995 )
2022-09-12 19:30:27 +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
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
Joao Gante
00cbadb870
RFC: Replace custom TF embeddings by Keras embeddings ( #18939 )
2022-09-10 11:34:49 +01: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
HuYong
22f7218560
add task_type_id to BERT to support ERNIE-2.0 and ERNIE-3.0 models ( #18686 )
...
* add_ernie
* remove Tokenizer in ernie
* polish code
* format code style
* polish code
* fix style
* update doc
* make fix-copies
* change model name
* change model name
* fix dependency
* add more copied from
* rename ErnieLMHeadModel to ErnieForCausalLM
do not expose ErnieLayer
update doc
* fix
* make style
* polish code
* polish code
* fix
* fix
* fix
* fix
* fix
* final fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-09 07:36:46 -04:00
NielsRogge
bb6f6d5338
Add X-CLIP ( #18852 )
...
* First draft
* Improve conversion script
* Make vision encoder work
* More improvements
* Improve conversion script
* Fix quality
* Add MultiframeIntegrationTransformer
* More improvements
* Make MiT output work
* Fix quality
* Add prompts generator
* Add tests
* Fix some tests
* Fix some more tests
* Fix more tests
* Improve conversion script
* Fix model outputs
* Fix more tests
* Add XClipProcessor
* Use processor in conversion script
* Fix integration test
* Update README, fix docs
* Fix all tests
* Add MIT output to XClipOutput
* Create better variable names
* Rename XClip to XCLIP
* Extend conversion script
* Add support for large models
* Add support for 16 frame models
* Add another model'
* Fix module issue
* Apply suggestions from code review
* Add figure to docs
* Fix CLIPProcessor issue
* Apply suggestions from code review
* Delete file
* Convert more checkpoints
* Convert last checkpoint
* Update nielsr to microsoft
2022-09-08 14:50:30 +02:00
Ankur Goyal
2ef7742117
Add DocumentQuestionAnswering pipeline ( #18414 )
...
* [WIP] Skeleton of VisualQuestionAnweringPipeline extended to support LayoutLM-like models
* Fixup
* Use the full encoding
* Basic refactoring to DocumentQuestionAnsweringPipeline
* Cleanup
* Improve args, docs, and implement preprocessing
* Integrate OCR
* Refactor question_answering pipeline
* Use refactored QA code in the document qa pipeline
* Fix tests
* Some small cleanups
* Use a string type annotation for Image.Image
* Update encoding with image features
* Wire through the basic docs
* Handle invalid response
* Handle empty word_boxes properly
* Docstring fix
* Integrate Donut model
* Fixup
* Incorporate comments
* Address comments
* Initial incorporation of tests
* Address Comments
* Change assert to ValueError
* Comments
* Wrap `score` in float to make it JSON serializable
* Incorporate AutoModeLForDocumentQuestionAnswering changes
* Fixup
* Rename postprocess function
* Fix auto import
* Applying comments
* Improve docs
* Remove extra assets and add copyright
* Address comments
Co-authored-by: Ankur Goyal <ankur@impira.com>
2022-09-07 13:38:49 -04:00
Yih-Dar
10c774cf60
remvoe _create_and_check_torch_fx_tracing
in specific test files ( #18667 )
...
* remvoe _create_and_check_torch_fx_tracing defined in specific model test files
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-07 16:22:09 +02:00
Sylvain Gugger
71ff88fa4f
Further reduce the number of alls to head for cached objects ( #18871 )
...
* Further reduce the number of alls to head for cached models/tokenizers/pipelines
* Fix tests
* Address review comments
2022-09-06 12:34:37 -04:00
Yih-Dar
998a90bc7d
Fix test_tf_encode_plus_sent_to_model
for LayoutLMv3
( #18898 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-09-06 14:51:03 +02:00
Patrick von Platen
badb9d2aaa
Correct naming pegasus x ( #18896 )
...
* add first generation tutorial
* [Pegasus X] correct naming
* [Generation] Remove
2022-09-05 11:25:00 +02:00
Jason Phang
53e33e6f1b
PEGASUS-X ( #18551 )
...
* PegasusX Initial commit
* rename
* pegasus X implementation
* pegx update
* pegx fix
* pegasus-x fixes
* pegx updates
* cleanup
* cleanup
* cleanup
* tests
* stylefixes
* Documentation update
* Model hub fix
* cleanup
* update
* update
* testfix
* Check fix
* tweaks for merging
* style
* style
* updates for pr
* style
* change pegasus-x repo
2022-09-02 19:54:02 +02:00
Sayak Paul
954e18ab97
TensorFlow MobileViT ( #18555 )
...
* initial implementation.
* add: working model till image classification.
* add: initial implementation that passes intg tests.
Co-authored-by: Amy <aeroberts4444@gmail.com>
* chore: formatting.
* add: tests (still breaking because of config mismatch).
Coo-authored-by: Yih <2521628+ydshieh@users.noreply.github.com>
* add: corrected tests and remaning changes.
* fix code style and repo consistency.
* address PR comments.
* address Amy's comments.
* chore: remove from_pt argument.
* chore: add full-stop.
* fix: TFLite model conversion in the doc.
* Update src/transformers/models/mobilevit/modeling_tf_mobilevit.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/mobilevit/modeling_tf_mobilevit.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/mobilevit/modeling_tf_mobilevit.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/mobilevit/modeling_tf_mobilevit.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/mobilevit/modeling_tf_mobilevit.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* apply formatting.
* chore: remove comments from the example block.
* remove identation in the example.
Co-authored-by: Amy <aeroberts4444@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-09-01 10:35:15 -04:00
NielsRogge
3b6943e7a3
[DETR] Add num_channels attribute ( #18714 )
...
* Add num_channels attribute
* Fix code quality
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-08-31 18:04:42 +02:00
Ankur Goyal
5c4c869014
Add LayoutLMForQuestionAnswering model ( #18407 )
...
* Add LayoutLMForQuestionAnswering model
* Fix output
* Remove TF TODOs
* Add test cases
* Add docs
* TF implementation
* Fix PT/TF equivalence
* Fix loss
* make fixup
* Fix up documentation code examples
* Fix up documentation examples + test them
* Remove LayoutLMForQuestionAnswering from the auto mapping
* Docstrings
* Add better docstrings
* Undo whitespace changes
* Update tokenizers in comments
* Fixup code and remove `from_pt=True`
* Fix tests
* Revert some unexpected docstring changes
* Fix tests by overriding _prepare_for_class
Co-authored-by: Ankur Goyal <ankur@impira.com>
2022-08-31 10:05:33 +02:00
anthony2261
a98f6a1da0
LayoutXLMProcessor: ensure 1-to-1 mapping between samples and images, and add test for it ( #18774 )
2022-08-30 14:43:14 +02:00
amyeroberts
ef91a2d135
Run tests if skip condition not met ( #18764 )
...
* Run tests if skip condition not met
* Update comment - remove outdated ref to TF 2.8
2022-08-30 14:03:28 +02:00