transformers/tests/models
NielsRogge 2ab790e82d
Add Donut (#18488)
* First draft

* Improve script

* Update script

* Make conversion work

* Add final_layer_norm attribute to Swin's config

* Add DonutProcessor

* Convert more models

* Improve feature extractor and convert base models

* Fix bug

* Improve integration tests

* Improve integration tests and add model to README

* Add doc test

* Add feature extractor to docs

* Fix integration tests

* Remove register_buffer

* Fix toctree and add missing attribute

* Add DonutSwin

* Make conversion script work

* Improve conversion script

* Address comment

* Fix bug

* Fix another bug

* Remove deprecated method from docs

* Make Swin and Swinv2 untouched

* Fix code examples

* Fix processor

* Update model_type to donut-swin

* Add feature extractor tests, add token2json method, improve feature extractor

* Fix failing tests, remove integration test

* Add do_thumbnail for consistency

* Improve code examples

* Add code example for document parsing

* Add DonutSwin to MODEL_NAMES_MAPPING

* Add model to appropriate place in toctree

* Update namespace to appropriate organization

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
2022-08-12 16:40:58 +02:00
..
albert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
auto Use commit hash to look in cache instead of calling head (#18534) 2022-08-10 11:55:18 -04:00
bart Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04: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 [FX] Symbolic trace for Bloom (#18356) 2022-07-29 16:12:27 +02:00
bort Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
byt5 Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
camembert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
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 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
donut Add Donut (#18488) 2022-08-12 16:40:58 +02:00
dpr Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04: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 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 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 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 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 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
perceiver Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
phobert Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
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 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 prefix to TF-Res test class (#18481) 2022-08-05 13:59:55 +02: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 Add TF_MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING (#18469) 2022-08-04 20:41:15 +02: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 Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04: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 Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04: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 Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04: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
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 Add Donut (#18488) 2022-08-12 16:40:58 +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 Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -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 Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04: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