transformers/tests/models
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
..
albert
auto Further reduce the number of alls to head for cached objects (#18871) 2022-09-06 12:34:37 -04:00
bart TF: TF 2.10 unpin + related onnx test skips (#18995) 2022-09-12 19:30:27 +01:00
barthez
bartpho
beit skip some test_multi_gpu_data_parallel_forward (#18188) 2022-07-20 15:54:44 +02:00
bert TF: TF 2.10 unpin + related onnx test skips (#18995) 2022-09-12 19:30:27 +01:00
bert_generation
bert_japanese
bertweet
big_bird Use higher value for hidden_size in Flax BigBird test (#17822) 2022-06-24 19:31:30 +02:00
bigbird_pegasus
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 Update BLOOM parameter counts (#18531) 2022-08-12 19:36:18 +02:00
bort
byt5 Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
camembert
canine Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -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
convnext Run tests if skip condition not met (#18764) 2022-08-30 14:03:28 +02:00
cpm
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
deformable_detr Add Deformable DETR (#17281) 2022-09-14 11:45:21 +02:00
deit Add TF DeiT implementation (#17806) 2022-07-13 18:04:08 +01:00
detr [DETR] Add num_channels attribute (#18714) 2022-08-31 18:04:42 +02:00
distilbert
dit
donut remvoe _create_and_check_torch_fx_tracing in specific test files (#18667) 2022-09-07 16:22:09 +02:00
dpr Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
dpt
electra
encoder_decoder TF: use the correct config with (...)EncoderDecoder models (#18097) 2022-07-22 13:31:45 +01:00
ernie add task_type_id to BERT to support ERNIE-2.0 and ERNIE-3.0 models (#18686) 2022-09-09 07:36:46 -04:00
flaubert
flava has_attentions - consistent test skipping logic and tf tests (#17495) 2022-06-09 09:50:03 +02:00
fnet
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
gpt2 TF: TF 2.10 unpin + related onnx test skips (#18995) 2022-09-12 19:30:27 +01: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
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
hubert Fix train_step, test_step and tests for CLIP (#18684) 2022-09-09 20:01:02 +01:00
ibert fix train_new_from_iterator in the case of byte-level tokenizers (#17549) 2022-06-08 15:30:41 +02:00
imagegpt
layoutlm TF: TF 2.10 unpin + related onnx test skips (#18995) 2022-09-12 19:30:27 +01:00
layoutlmv2 add warning to let the user know that the __call__ method is faster than encode + pad for a fast tokenizer (#18693) 2022-08-24 06:27:56 -04:00
layoutlmv3 Fix test_tf_encode_plus_sent_to_model for LayoutLMv3 (#18898) 2022-09-06 14:51:03 +02:00
layoutxlm LayoutXLMProcessor: ensure 1-to-1 mapping between samples and images, and add test for it (#18774) 2022-08-30 14:43:14 +02:00
led Fix tflongformer int dtype (#18907) 2022-09-12 17:51:10 +01:00
levit Add skip logic for attentions test - Levit (#17633) 2022-06-10 12:46:30 +02:00
longformer Fix tflongformer int dtype (#18907) 2022-09-12 17:51:10 +01:00
longt5 Mark slow test as such 2022-07-11 12:48:57 -04:00
luke Adding fine-tuning models to LUKE (#18353) 2022-08-01 11:09:47 -04:00
lxmert Update serving code to enable saved_model=True (#18153) 2022-07-22 18:05:38 +01:00
m2m_100 Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
marian Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
maskformer Fix test_inference_instance_segmentation_head (#17872) 2022-06-24 19:36:45 +02:00
mbart Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
mbart50 Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
mctct Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
megatron_bert
megatron_gpt2
mluke
mobilebert Fix train_step, test_step and tests for CLIP (#18684) 2022-09-09 20:01:02 +01:00
mobilevit TensorFlow MobileViT (#18555) 2022-09-01 10:35:15 -04:00
mpnet
mt5 Fix expected loss values in some (m)T5 tests (#18177) 2022-07-18 15:26:21 +02:00
mvp Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
nezha speed up test (#18106) 2022-07-12 04:28:28 -04:00
nllb Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
nystromformer
openai
opt add missing require_tf for TFOPTGenerationTest (#19010) 2022-09-13 18:10:11 +02:00
owlvit fix owlvit tests, update docstring examples (#18586) 2022-08-11 19:10:25 +03:00
pegasus Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
pegasus_x Correct naming pegasus x (#18896) 2022-09-05 11:25:00 +02:00
perceiver Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
phobert
plbart Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
poolformer has_attentions - consistent test skipping logic and tf tests (#17495) 2022-06-09 09:50:03 +02:00
prophetnet
qdqbert
rag Avoid GPU OOM for a TF Rag test (#17638) 2022-06-10 18:50:29 +02:00
realm
reformer
regnet Run tests if skip condition not met (#18764) 2022-08-30 14:03:28 +02:00
rembert
resnet Add TF prefix to TF-Res test class (#18481) 2022-08-05 13:59:55 +02:00
retribert
roberta fix train_new_from_iterator in the case of byte-level tokenizers (#17549) 2022-06-08 15:30:41 +02:00
roformer
segformer Run tests if skip condition not met (#18764) 2022-08-30 14:03:28 +02:00
sew
sew_d
speech_encoder_decoder send model to the correct device (#18800) 2022-08-29 18:46:30 +02:00
speech_to_text remvoe _create_and_check_torch_fx_tracing in specific test files (#18667) 2022-09-07 16:22:09 +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
swin remvoe _create_and_check_torch_fx_tracing in specific test files (#18667) 2022-09-07 16:22:09 +02:00
swinv2 Add swin transformer v2 (#17469) 2022-07-27 11:14:47 -04:00
t5 Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
tapas Fix train_step, test_step and tests for CLIP (#18684) 2022-09-09 20:01:02 +01:00
tapex Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
trajectory_transformer
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
unispeech_sat
van has_attentions - consistent test skipping logic and tf tests (#17495) 2022-06-09 09:50:03 +02:00
videomae Add VideoMAE (#17821) 2022-08-04 18:02:55 +02:00
vilt Add ViltForTokenClassification e.g. for Named-Entity-Recognition (NER) (#17924) 2022-07-26 10:11:32 +02:00
vision_encoder_decoder send model to the correct device (#18800) 2022-08-29 18:46:30 +02:00
vision_text_dual_encoder
visual_bert
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 TF: TF 2.10 unpin + related onnx test skips (#18995) 2022-09-12 19:30:27 +01:00
wav2vec2_conformer
wav2vec2_phoneme
wav2vec2_with_lm [Wav2vec2 + LM Test] Improve wav2vec2 with lm tests and make torch version dependent for now (#18749) 2022-08-26 14:11:55 +02:00
wavlm
x_clip Add X-CLIP (#18852) 2022-09-08 14:50:30 +02:00
xglm remvoe _create_and_check_torch_fx_tracing in specific test files (#18667) 2022-09-07 16:22:09 +02:00
xlm
xlm_prophetnet
xlm_roberta
xlm_roberta_xl
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