model documentation

#1
by nazneen - opened
Files changed (1) hide show
  1. README.md +206 -0
README.md ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - visual_bert
5
+ - transformers
6
+ - image-to-text
7
+ - image-captioning
8
+
9
+ ---
10
+
11
+ # Model Card for visualbert-vcr
12
+
13
+ # Model Details
14
+
15
+ ## Model Description
16
+
17
+ VisualBERT, a simple and flexible framework for modeling a broad range of vision-and-language (V&L) tasks on image-caption data.
18
+
19
+
20
+ - **Developed by:** UCLA NLP
21
+
22
+ - **Shared by [Optional]:** [Gunjan Chhablani](https://huggingface.co/gchhablani)
23
+
24
+ - **Model type:** Image to Text
25
+ - **Language(s) (NLP):** More information needed
26
+ - **License:** Apache 2.0
27
+ - **Parent Model:** More information needed
28
+ - **Resources for more information:**
29
+ - [GitHub Repo](https://github.com/uclanlp/visualbert)
30
+ - [Associated Paper](https://arxiv.org/abs/1908.03557)
31
+
32
+
33
+ # Uses
34
+
35
+
36
+ ## Direct Use
37
+ This model can be used for vision-and-language (V&L) tasks on image-caption data.
38
+
39
+ ## Downstream Use [Optional]
40
+
41
+ More information needed.
42
+
43
+ ## Out-of-Scope Use
44
+
45
+ The model should not be used to intentionally create hostile or alienating environments for people.
46
+
47
+ # Bias, Risks, and Limitations
48
+
49
+
50
+ Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups.
51
+
52
+
53
+
54
+ ## Recommendations
55
+
56
+
57
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
58
+
59
+ # Training Details
60
+
61
+ ## Training Data
62
+
63
+ The model creators note in the [associated paper](https://arxiv.org/pdf/1908.03557.pdf):
64
+ > We evaluate VisualBERT on four different types of vision-and-language applications:
65
+ (1) **Vi- sual Question Answering (VQA 2.0):**
66
+ Given an image and a question, the task is to correctly answer the question. We use the VQA 2.0 (Goyal et al., 2017), consisting of over 1 million questions about images from COCO. We train the model to predict the 3,129 most frequent answers and use image features from a ResNeXt-based
67
+ (2) **Visual Commonsense Reasoning (VCR):**
68
+ VCR consists of 290k questions derived from 110k movie scenes, where the questions focus on visual commonsense.
69
+ (3) **Natural Language for Visual Reasoning (NLVR2):**
70
+ NLVR2 is a dataset for joint reasoning about natural language and images, with a focus on semantic diversity, compositionality, and visual reasoning challenges. The task is to determine whether a natural language caption is true about a pair of images. The dataset consists of over 100k examples of English sentences paired with web images. We modify the segment embedding mechanism in VisualBERT and assign features from different images with different segment embeddings.
71
+ (4) **Region-to-Phrase Grounding (Flickr30K)**
72
+ Flickr30K Entities dataset tests the ability of systems to ground phrases in captions to bounding regions in the image. The task is, given spans from a sentence, selecting the bounding regions they correspond to. The dataset consists of 30k images and nearly 250k annotations.
73
+
74
+
75
+ ## Training Procedure
76
+
77
+
78
+ ### Preprocessing
79
+ The model creators note in the [associated paper](https://arxiv.org/pdf/1908.03557.pdf):
80
+ > The parameters are initializedfromthepre-trainedBERTBASE parameters
81
+
82
+
83
+
84
+ ### Speeds, Sizes, Times
85
+ The model creators note in the [associated paper](https://arxiv.org/pdf/1908.03557.pdf):
86
+ > The Transformer encoder in all models has the same configuration as BERTBASE: 12 layers, a hidden size of 768, and 12 self-attention heads. The parameters are initializedfromthepre-trainedBERTBASE parameters
87
+ > Batch sizes are chosen to meet hardware constraints and text sequences whose lengths are longer than 128 are capped.
88
+
89
+
90
+
91
+ # Evaluation
92
+
93
+
94
+ ## Testing Data, Factors & Metrics
95
+
96
+ ### Testing Data
97
+
98
+ More information needed
99
+
100
+ ### Factors
101
+ More information needed
102
+
103
+ ### Metrics
104
+
105
+ More information needed
106
+
107
+
108
+ ## Results
109
+
110
+ See [associated paper](https://arxiv.org/pdf/1908.03557.pdf) for more inforamtion.
111
+
112
+
113
+ # Model Examination
114
+
115
+ More information needed
116
+
117
+ # Environmental Impact
118
+
119
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
120
+
121
+ - **Hardware Type:** Tesla V100s and GTX 1080Tis
122
+ - **Hours used:**
123
+ The model creators note in the [associated paper](https://arxiv.org/pdf/1908.03557.pdf):
124
+ > Pre-training on COCO generally takes less than a day on 4 cards while task-specific pre-training and fine-tuning usually takes less
125
+ - **Cloud Provider:** More information needed
126
+ - **Compute Region:** More information needed
127
+ - **Carbon Emitted:** More information needed
128
+
129
+ # Technical Specifications [optional]
130
+
131
+ ## Model Architecture and Objective
132
+
133
+ More information needed
134
+
135
+ ## Compute Infrastructure
136
+
137
+ More information needed
138
+
139
+ ### Hardware
140
+
141
+ The model creators note in the [associated paper](https://arxiv.org/pdf/1908.03557.pdf):
142
+
143
+ > Experiments are conducted on Tesla V100s and GTX 1080Tis, and all experiments can be replicated on at most 4 Tesla V100s each with 16GBs of GPU memory.
144
+
145
+ ### Software
146
+
147
+ More information needed.
148
+
149
+ # Citation
150
+
151
+
152
+ **BibTeX:**
153
+
154
+
155
+ ```bibtex
156
+ @misc{https://doi.org/10.48550/arxiv.1908.03557,
157
+ doi = {10.48550/ARXIV.1908.03557},
158
+
159
+ url = {https://arxiv.org/abs/1908.03557},
160
+
161
+ author = {Li, Liunian Harold and Yatskar, Mark and Yin, Da and Hsieh, Cho-Jui and Chang, Kai-Wei},
162
+
163
+ keywords = {Computer Vision and Pattern Recognition (cs.CV), Computation and Language (cs.CL), Machine Learning (cs.LG), FOS: Computer and information sciences, FOS: Computer and information sciences},
164
+
165
+ title = {VisualBERT: A Simple and Performant Baseline for Vision and Language},
166
+
167
+ publisher = {arXiv},
168
+
169
+ year = {2019},
170
+
171
+ ```
172
+
173
+
174
+
175
+
176
+ # Glossary [optional]
177
+
178
+ More information needed
179
+
180
+ # More Information [optional]
181
+ More information needed
182
+
183
+ # Model Card Authors [optional]
184
+
185
+ UCLA NLP. in collaboration with Ezi Ozoani and the Hugging Face team
186
+
187
+ # Model Card Contact
188
+
189
+ More information needed
190
+
191
+ # How to Get Started with the Model
192
+
193
+ Use the code below to get started with the model.
194
+
195
+ <details>
196
+ <summary> Click to expand </summary>
197
+
198
+ ```python
199
+ from transformers import AutoTokenizer, AutoModelForMultipleChoice
200
+
201
+ tokenizer = AutoTokenizer.from_pretrained("uclanlp/visualbert-vcr")
202
+
203
+ model = AutoModelForMultipleChoice.from_pretrained("uclanlp/visualbert-vcr")
204
+
205
+ ```
206
+ </details>