Skip to content

Commit 682995b

Browse files
apsdehalArthurZucker
authored andcommitted
[feat] Add FLAVA model (huggingface#16654)
* [WIP] Add FLAVA model This PR aims to add [FLAVA](ihttps://arxiv.org/abs/2112.04482) model to the transformers repo. Following checklist delineates the list of things to be done for this PR to be complete: [x] Flava init [x] Flava base models [x] Flava layers [x] Flava Configs [x] Flava encoders [x] Flava pretraining models [ ] Flava classification/retrieval models (To be added in a separate PR) [x] Documentation updates [x] Imports updates [x] Argstring updates [x] Flava pretrained checkpoints [x] Flava tests [x] Flava processors [x] Sanity check [x] Lint
1 parent b591cfb commit 682995b

27 files changed

+5543
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih.
265265
1. **[EncoderDecoder](https://huggingface.co/docs/transformers/model_doc/encoder-decoder)** (from Google Research) released with the paper [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) by Sascha Rothe, Shashi Narayan, Aliaksei Severyn.
266266
1. **[ELECTRA](https://huggingface.co/docs/transformers/model_doc/electra)** (from Google Research/Stanford University) released with the paper [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555) by Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning.
267267
1. **[FlauBERT](https://huggingface.co/docs/transformers/model_doc/flaubert)** (from CNRS) released with the paper [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372) by Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab.
268+
1. **[FLAVA](https://huggingface.co/docs/transformers/main/model_doc/flava)** (from Facebook AI) released with the paper [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela.
268269
1. **[FNet](https://huggingface.co/docs/transformers/model_doc/fnet)** (from Google Research) released with the paper [FNet: Mixing Tokens with Fourier Transforms](https://arxiv.org/abs/2105.03824) by James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon.
269270
1. **[Funnel Transformer](https://huggingface.co/docs/transformers/model_doc/funnel)** (from CMU/Google Brain) released with the paper [Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing](https://arxiv.org/abs/2006.03236) by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.
270271
1. **[GLPN](https://huggingface.co/docs/transformers/main/model_doc/glpn)** (from KAIST) released with the paper [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436) by Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim.

README_ko.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ Flax, PyTorch, TensorFlow 설치 페이지에서 이들을 conda로 설치하는
244244
1. **[ELECTRA](https://huggingface.co/docs/transformers/model_doc/electra)** (from Google Research/Stanford University) released with the paper [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555) by Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning.
245245
1. **[EncoderDecoder](https://huggingface.co/docs/transformers/model_doc/encoder-decoder)** (from Google Research) released with the paper [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) by Sascha Rothe, Shashi Narayan, Aliaksei Severyn.
246246
1. **[FlauBERT](https://huggingface.co/docs/transformers/model_doc/flaubert)** (from CNRS) released with the paper [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372) by Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab.
247+
1. **[FLAVA](https://huggingface.co/docs/transformers/main/model_doc/flava)** (from Facebook AI) released with the paper [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela.
247248
1. **[FNet](https://huggingface.co/docs/transformers/model_doc/fnet)** (from Google Research) released with the paper [FNet: Mixing Tokens with Fourier Transforms](https://arxiv.org/abs/2105.03824) by James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon.
248249
1. **[Funnel Transformer](https://huggingface.co/docs/transformers/model_doc/funnel)** (from CMU/Google Brain) released with the paper [Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing](https://arxiv.org/abs/2006.03236) by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.
249250
1. **[GLPN](https://huggingface.co/docs/transformers/main/model_doc/glpn)** (from KAIST) released with the paper [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436) by Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim.

README_zh-hans.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ conda install -c huggingface transformers
268268
1. **[ELECTRA](https://huggingface.co/docs/transformers/model_doc/electra)** (来自 Google Research/Stanford University) 伴随论文 [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555) 由 Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning 发布。
269269
1. **[EncoderDecoder](https://huggingface.co/docs/transformers/model_doc/encoder-decoder)** (来自 Google Research) 伴随论文 [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) 由 Sascha Rothe, Shashi Narayan, Aliaksei Severyn 发布。
270270
1. **[FlauBERT](https://huggingface.co/docs/transformers/model_doc/flaubert)** (来自 CNRS) 伴随论文 [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372) 由 Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab 发布。
271+
1. **[FLAVA](https://huggingface.co/docs/transformers/main/model_doc/flava)** (来自 Facebook AI) 伴随论文 [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) 由 Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela 发布。
271272
1. **[FNet](https://huggingface.co/docs/transformers/model_doc/fnet)** (来自 Google Research) 伴随论文 [FNet: Mixing Tokens with Fourier Transforms](https://arxiv.org/abs/2105.03824) 由 James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon 发布。
272273
1. **[Funnel Transformer](https://huggingface.co/docs/transformers/model_doc/funnel)** (来自 CMU/Google Brain) 伴随论文 [Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing](https://arxiv.org/abs/2006.03236) 由 Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le 发布。
273274
1. **[GLPN](https://huggingface.co/docs/transformers/main/model_doc/glpn)** (来自 KAIST) 伴随论文 [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436) 由 Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim 发布。

README_zh-hant.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ conda install -c huggingface transformers
280280
1. **[ELECTRA](https://huggingface.co/docs/transformers/model_doc/electra)** (from Google Research/Stanford University) released with the paper [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555) by Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning.
281281
1. **[EncoderDecoder](https://huggingface.co/docs/transformers/model_doc/encoder-decoder)** (from Google Research) released with the paper [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) by Sascha Rothe, Shashi Narayan, Aliaksei Severyn.
282282
1. **[FlauBERT](https://huggingface.co/docs/transformers/model_doc/flaubert)** (from CNRS) released with the paper [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372) by Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab.
283+
1. **[FLAVA](https://huggingface.co/docs/transformers/main/model_doc/flava)** (from Facebook AI) released with the paper [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela.
283284
1. **[FNet](https://huggingface.co/docs/transformers/model_doc/fnet)** (from Google Research) released with the paper [FNet: Mixing Tokens with Fourier Transforms](https://arxiv.org/abs/2105.03824) by James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon.
284285
1. **[Funnel Transformer](https://huggingface.co/docs/transformers/model_doc/funnel)** (from CMU/Google Brain) released with the paper [Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing](https://arxiv.org/abs/2006.03236) by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.
285286
1. **[GLPN](https://huggingface.co/docs/transformers/main/model_doc/glpn)** (from KAIST) released with the paper [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436) by Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim.

docs/source/en/_toctree.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@
216216
title: Encoder Decoder Models
217217
- local: model_doc/flaubert
218218
title: FlauBERT
219+
- local: model_doc/flava
220+
title: FLAVA
219221
- local: model_doc/fnet
220222
title: FNet
221223
- local: model_doc/fsmt

docs/source/en/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ The library currently contains JAX, PyTorch and TensorFlow implementations, pret
8686
1. **[EncoderDecoder](model_doc/encoder-decoder)** (from Google Research) released with the paper [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) by Sascha Rothe, Shashi Narayan, Aliaksei Severyn.
8787
1. **[ELECTRA](model_doc/electra)** (from Google Research/Stanford University) released with the paper [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555) by Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning.
8888
1. **[FlauBERT](model_doc/flaubert)** (from CNRS) released with the paper [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372) by Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab.
89+
1. **[FLAVA](model_doc/flava)** (from Facebook AI) released with the paper [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela.
8990
1. **[FNet](model_doc/fnet)** (from Google Research) released with the paper [FNet: Mixing Tokens with Fourier Transforms](https://arxiv.org/abs/2105.03824) by James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon.
9091
1. **[Funnel Transformer](model_doc/funnel)** (from CMU/Google Brain) released with the paper [Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing](https://arxiv.org/abs/2006.03236) by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.
9192
1. **[GLPN](model_doc/glpn)** (from KAIST) released with the paper [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436) by Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim.
@@ -204,6 +205,7 @@ Flax), PyTorch, and/or TensorFlow.
204205
| Encoder decoder | | | | | |
205206
| FairSeq Machine-Translation | | | | | |
206207
| FlauBERT | | | | | |
208+
| Flava | | | | | |
207209
| FNet | | | | | |
208210
| Funnel Transformer | | | | | |
209211
| GLPN | | | | | |

docs/source/en/model_doc/flava.mdx

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
4+
the License. You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
9+
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
10+
specific language governing permissions and limitations under the License.
11+
-->
12+
13+
# FLAVA
14+
15+
## Overview
16+
17+
The FLAVA model was proposed in [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela and is accepted at CVPR 2022.
18+
19+
The paper aims at creating a single unified foundation model which can work across vision, language
20+
as well as vision-and-language multimodal tasks.
21+
22+
The abstract from the paper is the following:
23+
24+
*State-of-the-art vision and vision-and-language models rely on large-scale visio-linguistic pretraining for obtaining good performance on a variety
25+
of downstream tasks. Generally, such models are often either cross-modal (contrastive) or multi-modal
26+
(with earlier fusion) but not both; and they often only target specific modalities or tasks. A promising
27+
direction would be to use a single holistic universal model, as a "foundation", that targets all modalities
28+
at once -- a true vision and language foundation model should be good at vision tasks, language tasks, and
29+
cross- and multi-modal vision and language tasks. We introduce FLAVA as such a model and demonstrate
30+
impressive performance on a wide range of 35 tasks spanning these target modalities.*
31+
32+
33+
This model was contributed by [aps](https://huggingface.co/aps). The original code can be found [here](https://github.com/facebookresearch/multimodal/tree/main/examples/flava).
34+
35+
36+
## FlavaConfig
37+
38+
[[autodoc]] FlavaConfig
39+
40+
## FlavaTextConfig
41+
42+
[[autodoc]] FlavaTextConfig
43+
44+
## FlavaImageConfig
45+
46+
[[autodoc]] FlavaImageConfig
47+
48+
## FlavaMultimodalConfig
49+
50+
[[autodoc]] FlavaMultimodalConfig
51+
52+
## FlavaImageCodebookConfig
53+
54+
[[autodoc]] FlavaImageCodebookConfig
55+
56+
## FlavaProcessor
57+
58+
[[autodoc]] FlavaProcessor
59+
60+
## FlavaFeatureExtractor
61+
62+
[[autodoc]] FlavaFeatureExtractor
63+
64+
## FlavaForPreTraining
65+
66+
[[autodoc]] FlavaForPreTraining
67+
- forward
68+
69+
## FlavaModel
70+
71+
[[autodoc]] FlavaModel
72+
- forward
73+
- get_text_features
74+
- get_image_features
75+
76+
## FlavaImageCodebook
77+
78+
[[autodoc]] FlavaImageCodebook
79+
- forward
80+
- get_codebook_indices
81+
- get_codebook_probs
82+
83+
## FlavaTextModel
84+
85+
[[autodoc]] FlavaTextModel
86+
- forward
87+
88+
## FlavaImageModel
89+
90+
[[autodoc]] FlavaImageModel
91+
- forward
92+
93+
## FlavaMultimodalModel
94+
95+
[[autodoc]] FlavaMultimodalModel
96+
- forward

src/transformers/__init__.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,14 @@
198198
"models.electra": ["ELECTRA_PRETRAINED_CONFIG_ARCHIVE_MAP", "ElectraConfig", "ElectraTokenizer"],
199199
"models.encoder_decoder": ["EncoderDecoderConfig"],
200200
"models.flaubert": ["FLAUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "FlaubertConfig", "FlaubertTokenizer"],
201+
"models.flava": [
202+
"FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP",
203+
"FlavaConfig",
204+
"FlavaImageCodebookConfig",
205+
"FlavaImageConfig",
206+
"FlavaMultimodalConfig",
207+
"FlavaTextConfig",
208+
],
201209
"models.fnet": ["FNET_PRETRAINED_CONFIG_ARCHIVE_MAP", "FNetConfig"],
202210
"models.fsmt": ["FSMT_PRETRAINED_CONFIG_ARCHIVE_MAP", "FSMTConfig", "FSMTTokenizer"],
203211
"models.funnel": ["FUNNEL_PRETRAINED_CONFIG_ARCHIVE_MAP", "FunnelConfig", "FunnelTokenizer"],
@@ -569,6 +577,7 @@
569577
_import_structure["models.deit"].append("DeiTFeatureExtractor")
570578
_import_structure["models.detr"].append("DetrFeatureExtractor")
571579
_import_structure["models.dpt"].append("DPTFeatureExtractor")
580+
_import_structure["models.flava"].extend(["FlavaFeatureExtractor", "FlavaProcessor"])
572581
_import_structure["models.glpn"].append("GLPNFeatureExtractor")
573582
_import_structure["models.imagegpt"].append("ImageGPTFeatureExtractor")
574583
_import_structure["models.layoutlmv2"].append("LayoutLMv2FeatureExtractor")
@@ -1039,6 +1048,18 @@
10391048
"FlaubertWithLMHeadModel",
10401049
]
10411050
)
1051+
_import_structure["models.flava"].extend(
1052+
[
1053+
"FLAVA_PRETRAINED_MODEL_ARCHIVE_LIST",
1054+
"FlavaForPreTraining",
1055+
"FlavaImageCodebook",
1056+
"FlavaImageModel",
1057+
"FlavaModel",
1058+
"FlavaMultimodalModel",
1059+
"FlavaPreTrainedModel",
1060+
"FlavaTextModel",
1061+
]
1062+
)
10421063
_import_structure["models.fnet"].extend(
10431064
[
10441065
"FNET_PRETRAINED_MODEL_ARCHIVE_LIST",
@@ -2672,6 +2693,14 @@
26722693
from .models.electra import ELECTRA_PRETRAINED_CONFIG_ARCHIVE_MAP, ElectraConfig, ElectraTokenizer
26732694
from .models.encoder_decoder import EncoderDecoderConfig
26742695
from .models.flaubert import FLAUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, FlaubertConfig, FlaubertTokenizer
2696+
from .models.flava import (
2697+
FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP,
2698+
FlavaConfig,
2699+
FlavaImageCodebookConfig,
2700+
FlavaImageConfig,
2701+
FlavaMultimodalConfig,
2702+
FlavaTextConfig,
2703+
)
26752704
from .models.fnet import FNET_PRETRAINED_CONFIG_ARCHIVE_MAP, FNetConfig
26762705
from .models.fsmt import FSMT_PRETRAINED_CONFIG_ARCHIVE_MAP, FSMTConfig, FSMTTokenizer
26772706
from .models.funnel import FUNNEL_PRETRAINED_CONFIG_ARCHIVE_MAP, FunnelConfig, FunnelTokenizer
@@ -2993,6 +3022,7 @@
29933022
from .models.deit import DeiTFeatureExtractor
29943023
from .models.detr import DetrFeatureExtractor
29953024
from .models.dpt import DPTFeatureExtractor
3025+
from .models.flava import FlavaFeatureExtractor, FlavaProcessor
29963026
from .models.glpn import GLPNFeatureExtractor
29973027
from .models.imagegpt import ImageGPTFeatureExtractor
29983028
from .models.layoutlmv2 import LayoutLMv2FeatureExtractor, LayoutLMv2Processor
@@ -3391,6 +3421,16 @@
33913421
FlaubertModel,
33923422
FlaubertWithLMHeadModel,
33933423
)
3424+
from .models.flava import (
3425+
FLAVA_PRETRAINED_MODEL_ARCHIVE_LIST,
3426+
FlavaForPreTraining,
3427+
FlavaImageCodebook,
3428+
FlavaImageModel,
3429+
FlavaModel,
3430+
FlavaMultimodalModel,
3431+
FlavaPreTrainedModel,
3432+
FlavaTextModel,
3433+
)
33943434
from .models.fnet import (
33953435
FNET_PRETRAINED_MODEL_ARCHIVE_LIST,
33963436
FNetForMaskedLM,

src/transformers/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
electra,
5555
encoder_decoder,
5656
flaubert,
57+
flava,
5758
fnet,
5859
fsmt,
5960
funnel,

src/transformers/models/auto/configuration_auto.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
("canine", "CanineConfig"),
6767
("roformer", "RoFormerConfig"),
6868
("clip", "CLIPConfig"),
69+
("flava", "FlavaConfig"),
6970
("bigbird_pegasus", "BigBirdPegasusConfig"),
7071
("deit", "DeiTConfig"),
7172
("luke", "LukeConfig"),
@@ -172,6 +173,7 @@
172173
("canine", "CANINE_PRETRAINED_CONFIG_ARCHIVE_MAP"),
173174
("roformer", "ROFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP"),
174175
("clip", "CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP"),
176+
("flava", "FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP"),
175177
("bigbird_pegasus", "BIGBIRD_PEGASUS_PRETRAINED_CONFIG_ARCHIVE_MAP"),
176178
("deit", "DEIT_PRETRAINED_CONFIG_ARCHIVE_MAP"),
177179
("luke", "LUKE_PRETRAINED_CONFIG_ARCHIVE_MAP"),
@@ -270,6 +272,7 @@
270272
("canine", "Canine"),
271273
("roformer", "RoFormer"),
272274
("clip", "CLIP"),
275+
("flava", "Flava"),
273276
("bigbird_pegasus", "BigBirdPegasus"),
274277
("deit", "DeiT"),
275278
("luke", "LUKE"),

0 commit comments

Comments
 (0)