transformers/tests/models
Ritik Nandwal e87ac9d18b
Add swin transformer v2 (#17469)
* Add files generated using transformer-cli add-new-model-like command

* Add changes for swinv2 attention and forward method

* Add fixes

* Add modifications for weight conversion and remaining args in swin model

* Add changes for patchmerging

* Add changes for SwinV2selfattention

* Update conversion script

* Add final fixes for the swin_v2 model

* Add changes for conversion script for pretrained window size case

* Add pretrained window size value from config in SwinV2Encoder class

* Make fixup

* Add swinv2 to models_not_in_readme to utils/check_copies.py

* Modify Swinv2v2 to Swin Transformer V2

* Remove copied from, to run make fixup command

* Add updates to swinv2tf from main branch

* Add pretrained_window_size to config, to make tests pass

* Add modified weights from nandwalritik profile for swinv2

* Update model weights from swinv2 from nandwalritik profile

* Add fix for build_pr_documentation CI fix

* Add fixes for weight conversion

* Add change to make input with padding work

* Add fixes for test cases

* Add few changes from swin to swinv2 to pass test cases

* Remove tests for tensorflow as swinv2 for TF is not added yet

* Overide test_pt_tf_model_equivalence function as TF implementation for swinv2 is not added yet

* Add modeling_tf_swinv2 to _ignore_modules as test file is removed for this one right now.

* Update docs url for swinv2 in README.md

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Undo changes for check_repo

* Update url in readme.md

* Remove overrided function to test pt_tf_model_equivalence

* Remove TF model imports for Swinv2 as its not implemented in this PR

* Add changes for index.mdx

* Add swinv2 papers link,abstract and contributors details

* Rename cpb_mlp to continous_position_bias_mlp

* Add tips for swinv2 model

* Update src/transformers/models/swinv2/configuration_swinv2.py

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Update src/transformers/models/swinv2/configuration_swinv2.py

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Fix indentation for docstring example in src/transformers/models/swinv2/configuration_swinv2.py

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Update import order in src/transformers/models/swinv2/configuration_swinv2.py

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Add copyright statements in weights conversion script.

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Remove Swinv2 from models_not_in_readme

* Reformat code

* Remove TF implementation file for swinv2

* Update start docstring.

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Add changes for docstring

* Update orgname for weights to microsoft

* Remove to_2tuple function

* Add copied from statements wherever applicable

* Add copied from to Swinv2ForMaskedImageModelling class

* Reformat code.

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Add unittest.skip(with reason.) for test_inputs_embeds test case.

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Add updates for test_modeling_swinv2.py

* Add @unittest.skip() annotation for clarity to create_and_test_config_common_properties function

* Add continuous_position_bias_mlp parameter to conversion script

* Add test for testing masked_image_modelling for swinv2

* Update Swinv2 to Swin Transformer v2 in docs/source/en/model_doc/swinv2.mdx

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Update Swinv2 to Swin Transformer v2 in docs/source/en/model_doc/swinv2.mdx

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Update docs/source/en/model_doc/swinv2.mdx

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Update docs/source/en/model_doc/swinv2.mdx

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>

* Add suggested changes

* Add copied from to forward methods of Swinv2Stage and Swinv2Encoder

* Add push_to_hub flag to weight conversion script

* Change order or Swinv2DropPath class

* Add id2label mapping for imagenet 21k

* Add updated url for SwinV2 functions and classes used in implementation

* Update input_feature dimensions format, mentioned in comments.

Co-authored-by: Alara Dirik <8944735+alaradirik@users.noreply.github.com>

* Add suggested changes for modeling_swin2.py

* Update docs

* Remove create_and_test_config_common_properties function, as test_model_common_attributes is sufficient.

* Fix indentation.

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Add changes for making Nit objects in code style

* Add suggested changes

* Add suggested changes for test_modelling_swinv2

* make fix-copies

* Update docs/source/en/model_doc/swinv2.mdx

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: Alara Dirik <8944735+alaradirik@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-07-27 11:14:47 -04:00
..
albert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
auto Prepare transformers for v0.8.0 huggingface-hub release (#17716) 2022-06-21 11:51:18 -04:00
bart Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
barthez Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
bartpho Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
beit skip some test_multi_gpu_data_parallel_forward (#18188) 2022-07-20 15:54:44 +02:00
bert Add a TF in-graph tokenizer for BERT (#17701) 2022-06-27 12:06:21 +01:00
bert_generation Black preview (#17217) 2022-05-12 16:25:55 -04:00
bert_japanese Black preview (#17217) 2022-05-12 16:25:55 -04:00
bertweet Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
big_bird Use higher value for hidden_size in Flax BigBird test (#17822) 2022-06-24 19:31:30 +02:00
bigbird_pegasus Black preview (#17217) 2022-05-12 16:25:55 -04:00
blenderbot Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
blenderbot_small Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
bloom BLOOM minor fixes small test (#18175) 2022-07-18 19:18:19 +02:00
bort Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
byt5 Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
camembert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
canine Black preview (#17217) 2022-05-12 16:25:55 -04:00
clip Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
codegen Update expected values in CodeGen tests (#17888) 2022-07-01 15:33:36 +02:00
convbert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
convnext has_attentions - consistent test skipping logic and tf tests (#17495) 2022-06-09 09:50:03 +02:00
cpm Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
ctrl Fix CTRL tests (#17508) 2022-06-01 16:27:23 +02:00
cvt has_attentions - consistent test skipping logic and tf tests (#17495) 2022-06-09 09:50:03 +02:00
data2vec skip some test_multi_gpu_data_parallel_forward (#18188) 2022-07-20 15:54:44 +02:00
deberta fix train_new_from_iterator in the case of byte-level tokenizers (#17549) 2022-06-08 15:30:41 +02:00
deberta_v2 Fx support for Deberta-v[1-2], Hubert and LXMERT (#17539) 2022-06-07 18:05:20 +02:00
decision_transformer Update expected values in DecisionTransformerModelIntegrationTest (#18016) 2022-07-05 14:53:43 +02:00
deit Add TF DeiT implementation (#17806) 2022-07-13 18:04:08 +01:00
detr Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
distilbert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
dit Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
dpr Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
dpt Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
electra Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
encoder_decoder TF: use the correct config with (...)EncoderDecoder models (#18097) 2022-07-22 13:31:45 +01:00
flaubert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
flava has_attentions - consistent test skipping logic and tf tests (#17495) 2022-06-09 09:50:03 +02:00
fnet Black preview (#17217) 2022-05-12 16:25:55 -04:00
fsmt Not use -1e4 as attn mask (#17306) 2022-06-20 16:16:16 +02:00
funnel Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
glpn Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
gpt_neo fix train_new_from_iterator in the case of byte-level tokenizers (#17549) 2022-06-08 15:30:41 +02:00
gpt_neox skip some gpt_neox tests that require 80G RAM (#17923) 2022-07-01 09:04:38 -04:00
gpt2 TF: XLA beam search + most generation-compatible models are now also XLA-generate-compatible (#17857) 2022-06-29 12:41:01 +01:00
gptj TF: GPT-J compatible with XLA generation (#17986) 2022-07-06 15:02:07 +01:00
groupvit Adding GroupViT Models (#17313) 2022-06-28 20:51:47 +02:00
herbert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
hubert Fx support for Deberta-v[1-2], Hubert and LXMERT (#17539) 2022-06-07 18:05:20 +02:00
ibert fix train_new_from_iterator in the case of byte-level tokenizers (#17549) 2022-06-08 15:30:41 +02:00
imagegpt Enabling imageGPT auto feature extractor. (#16871) 2022-05-24 12:30:46 +02:00
layoutlm Fx support for multiple model architectures (#17393) 2022-05-31 10:02:55 +02:00
layoutlmv2 Fixes torch jit tracing for LayoutLMv2 model (re-open) (#18313) 2022-07-27 06:38:40 -04:00
layoutlmv3 Fix some typos. (#17560) 2022-07-11 05:00:13 -04:00
layoutxlm Fix LayoutXLMProcessorTest (#17506) 2022-06-01 16:26:37 +02:00
led Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
levit Add skip logic for attentions test - Levit (#17633) 2022-06-10 12:46:30 +02:00
longformer Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
longt5 Mark slow test as such 2022-07-11 12:48:57 -04:00
luke Debug LukeForMaskedLM (#17499) 2022-06-01 10:03:06 -04:00
lxmert Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
m2m_100 Fx support for multiple model architectures (#17393) 2022-05-31 10:02:55 +02:00
marian Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
maskformer Fix test_inference_instance_segmentation_head (#17872) 2022-06-24 19:36:45 +02:00
mbart Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
mbart50 Black preview (#17217) 2022-05-12 16:25:55 -04:00
mctct M-CTC-T Model (#16402) 2022-06-08 00:33:07 +02:00
megatron_bert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
megatron_gpt2 Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
mluke Black preview (#17217) 2022-05-12 16:25:55 -04:00
mobilebert Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
mobilevit add MobileViT model (#17354) 2022-06-29 16:07:51 -04:00
mpnet Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
mt5 Fix expected loss values in some (m)T5 tests (#18177) 2022-07-18 15:26:21 +02:00
mvp Add MVP model (#17787) 2022-06-29 09:30:55 -04:00
nezha speed up test (#18106) 2022-07-12 04:28:28 -04:00
nllb NLLB tokenizer (#18126) 2022-07-18 08:12:34 -04:00
nystromformer Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
openai Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
opt Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
owlvit Owlvit test fixes (#18303) 2022-07-27 17:26:27 +03:00
pegasus Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
perceiver Black preview (#17217) 2022-05-12 16:25:55 -04:00
phobert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
plbart Fx support for multiple model architectures (#17393) 2022-05-31 10:02:55 +02:00
poolformer has_attentions - consistent test skipping logic and tf tests (#17495) 2022-06-09 09:50:03 +02:00
prophetnet Black preview (#17217) 2022-05-12 16:25:55 -04:00
qdqbert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
rag Avoid GPU OOM for a TF Rag test (#17638) 2022-06-10 18:50:29 +02:00
realm Black preview (#17217) 2022-05-12 16:25:55 -04:00
reformer Black preview (#17217) 2022-05-12 16:25:55 -04:00
regnet TF implementation of RegNets (#17554) 2022-06-29 13:45:14 +01:00
rembert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
resnet Add TF ResNet model (#17427) 2022-07-04 10:59:15 +01:00
retribert fix retribert's test_torch_encode_plus_sent_to_model (#17231) 2022-05-17 14:33:13 +02:00
roberta fix train_new_from_iterator in the case of byte-level tokenizers (#17549) 2022-06-08 15:30:41 +02:00
roformer Skip RoFormer ONNX test if rjieba not installed (#16981) 2022-05-04 10:04:10 +02:00
segformer [SegFormer] TensorFlow port (#17910) 2022-07-21 18:22:37 +01:00
sew Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
sew_d Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
speech_encoder_decoder Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
speech_to_text Fx support for multiple model architectures (#17393) 2022-05-31 10:02:55 +02:00
speech_to_text_2 Fx support for multiple model architectures (#17393) 2022-05-31 10:02:55 +02:00
splinter Fix Splinter test (#17854) 2022-06-24 16:26:14 +02:00
squeezebert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
swin Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
swinv2 Add swin transformer v2 (#17469) 2022-07-27 11:14:47 -04:00
t5 Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
tapas Add magic method to our TF models to convert datasets with column inference (#17160) 2022-06-06 15:53:49 +01:00
tapex Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
trajectory_transformer Add trajectory transformer (#17141) 2022-05-17 19:07:43 -04:00
transfo_xl Add magic method to our TF models to convert datasets with column inference (#17160) 2022-06-06 15:53:49 +01:00
trocr Fx support for multiple model architectures (#17393) 2022-05-31 10:02:55 +02:00
unispeech Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
unispeech_sat Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
van has_attentions - consistent test skipping logic and tf tests (#17495) 2022-06-09 09:50:03 +02:00
vilt Add ViltForTokenClassification e.g. for Named-Entity-Recognition (NER) (#17924) 2022-07-26 10:11:32 +02:00
vision_encoder_decoder Update TF(Vision)EncoderDecoderModel PT/TF equivalence tests (#18073) 2022-07-18 15:29:14 +02:00
vision_text_dual_encoder Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
visual_bert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
vit Improve vision models (#17731) 2022-06-24 11:34:51 +02:00
vit_mae Fix some typos. (#17560) 2022-07-11 05:00:13 -04:00
wav2vec2 Black preview (#17217) 2022-05-12 16:25:55 -04:00
wav2vec2_conformer [Test] Fix W2V-Conformer integration test (#17303) 2022-05-17 18:20:36 +02:00
wav2vec2_phoneme Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
wav2vec2_with_lm Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
wavlm Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
xglm Fx support for multiple model architectures (#17393) 2022-05-31 10:02:55 +02:00
xlm Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
xlm_prophetnet Black preview (#17217) 2022-05-12 16:25:55 -04:00
xlm_roberta Black preview (#17217) 2022-05-12 16:25:55 -04:00
xlm_roberta_xl Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
xlnet Return scalar losses instead of per-sample means (#18013) 2022-07-04 17:26:19 +01:00
yolos Improve vision models (#17731) 2022-06-24 11:34:51 +02:00
yoso fix train_new_from_iterator in the case of byte-level tokenizers (#17549) 2022-06-08 15:30:41 +02:00
__init__.py Move test model folders (#17034) 2022-05-03 14:42:02 +02:00