Utkarshg02 commited on
Commit
be745ae
·
1 Parent(s): 5aed398

Mirror facebook/wav2vec2-xls-r-300m

Browse files
Files changed (3) hide show
  1. README.md +155 -184
  2. config.json +4 -36
  3. pytorch_model.bin +3 -0
README.md CHANGED
@@ -1,199 +1,170 @@
1
  ---
2
- library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
9
 
 
10
 
 
11
 
12
- ## Model Details
13
 
14
- ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
 
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
 
19
 
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
 
28
- ### Model Sources [optional]
29
 
30
- <!-- Provide the basic links for the model. -->
31
 
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
 
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- 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).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
1
  ---
2
+ language:
3
+ - multilingual
4
+ - ab
5
+ - af
6
+ - sq
7
+ - am
8
+ - ar
9
+ - hy
10
+ - as
11
+ - az
12
+ - ba
13
+ - eu
14
+ - be
15
+ - bn
16
+ - bs
17
+ - br
18
+ - bg
19
+ - my
20
+ - yue
21
+ - ca
22
+ - ceb
23
+ - km
24
+ - zh
25
+ - cv
26
+ - hr
27
+ - cs
28
+ - da
29
+ - dv
30
+ - nl
31
+ - en
32
+ - eo
33
+ - et
34
+ - fo
35
+ - fi
36
+ - fr
37
+ - gl
38
+ - lg
39
+ - ka
40
+ - de
41
+ - el
42
+ - gn
43
+ - gu
44
+ - ht
45
+ - cnh
46
+ - ha
47
+ - haw
48
+ - he
49
+ - hi
50
+ - hu
51
+ - is
52
+ - id
53
+ - ia
54
+ - ga
55
+ - it
56
+ - ja
57
+ - jv
58
+ - kb
59
+ - kn
60
+ - kk
61
+ - rw
62
+ - ky
63
+ - ko
64
+ - ku
65
+ - lo
66
+ - la
67
+ - lv
68
+ - ln
69
+ - lt
70
+ - lm
71
+ - mk
72
+ - mg
73
+ - ms
74
+ - ml
75
+ - mt
76
+ - gv
77
+ - mi
78
+ - mr
79
+ - mn
80
+ - ne
81
+ - no
82
+ - nn
83
+ - oc
84
+ - or
85
+ - ps
86
+ - fa
87
+ - pl
88
+ - pt
89
+ - pa
90
+ - ro
91
+ - rm
92
+ - rm
93
+ - ru
94
+ - sah
95
+ - sa
96
+ - sco
97
+ - sr
98
+ - sn
99
+ - sd
100
+ - si
101
+ - sk
102
+ - sl
103
+ - so
104
+ - hsb
105
+ - es
106
+ - su
107
+ - sw
108
+ - sv
109
+ - tl
110
+ - tg
111
+ - ta
112
+ - tt
113
+ - te
114
+ - th
115
+ - bo
116
+ - tp
117
+ - tr
118
+ - tk
119
+ - uk
120
+ - ur
121
+ - uz
122
+ - vi
123
+ - vot
124
+ - war
125
+ - cy
126
+ - yi
127
+ - yo
128
+ - zu
129
+ language_bcp47:
130
+ - zh-HK
131
+ - zh-TW
132
+ - fy-NL
133
+ datasets:
134
+ - common_voice
135
+ - multilingual_librispeech
136
+ tags:
137
+ - speech
138
+ - xls_r
139
+ - xls_r_pretrained
140
+ license: apache-2.0
141
  ---
142
 
143
+ # Wav2Vec2-XLS-R-300M
144
 
145
+ [Facebook's Wav2Vec2 XLS-R](https://ai.facebook.com/blog/wav2vec-20-learning-the-structure-of-speech-from-raw-audio/) counting **300 million** parameters.
146
 
147
+ ![model image](https://raw.githubusercontent.com/patrickvonplaten/scientific_images/master/xls_r.png)
148
 
149
+ XLS-R is Facebook AI's large-scale multilingual pretrained model for speech (the "XLM-R for Speech"). It is pretrained on 436k hours of unlabeled speech, including VoxPopuli, MLS, CommonVoice, BABEL, and VoxLingua107. It uses the wav2vec 2.0 objective, in 128 languages. When using the model make sure that your speech input is sampled at 16kHz.
150
 
151
+ **Note**: This model should be fine-tuned on a downstream task, like Automatic Speech Recognition, Translation, or Classification. Check out [**this blog**](https://huggingface.co/blog/fine-tune-xlsr-wav2vec2) for more information about ASR.
152
 
153
+ [XLS-R Paper](https://arxiv.org/abs/2111.09296)
154
 
155
+ Authors: Arun Babu, Changhan Wang, Andros Tjandra, Kushal Lakhotia, Qiantong Xu, Naman Goyal, Kritika Singh, Patrick von Platen, Yatharth Saraf, Juan Pino, Alexei Baevski, Alexis Conneau, Michael Auli
156
 
157
+ **Abstract**
158
+ This paper presents XLS-R, a large-scale model for cross-lingual speech representation learning based on wav2vec 2.0. We train models with up to 2B parameters on 436K hours of publicly available speech audio in 128 languages, an order of magnitude more public data than the largest known prior work. Our evaluation covers a wide range of tasks, domains, data regimes and languages, both high and low-resource. On the CoVoST-2 speech translation benchmark, we improve the previous state of the art by an average of 7.4 BLEU over 21 translation directions into English. For speech recognition, XLS-R improves over the best known prior work on BABEL, MLS, CommonVoice as well as VoxPopuli, lowering error rates by 20%-33% relative on average. XLS-R also sets a new state of the art on VoxLingua107 language identification. Moreover, we show that with sufficient model size, cross-lingual pretraining can outperform English-only pretraining when translating English speech into other languages, a setting which favors monolingual pretraining. We hope XLS-R can help to improve speech processing tasks for many more languages of the world.
159
 
160
+ The original model can be found under https://github.com/pytorch/fairseq/tree/master/examples/wav2vec#wav2vec-20.
 
 
 
 
 
 
161
 
162
+ # Usage
163
 
164
+ See [this google colab](https://colab.research.google.com/github/patrickvonplaten/notebooks/blob/master/Fine_Tune_XLS_R_on_Common_Voice.ipynb) for more information on how to fine-tune the model.
165
 
166
+ You can find other pretrained XLS-R models with different numbers of parameters:
 
 
167
 
168
+ * [300M parameters version](https://huggingface.co/facebook/wav2vec2-xls-r-300m)
169
+ * [1B version version](https://huggingface.co/facebook/wav2vec2-xls-r-1b)
170
+ * [2B version version](https://huggingface.co/facebook/wav2vec2-xls-r-2b)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
config.json CHANGED
@@ -1,16 +1,11 @@
1
  {
2
  "activation_dropout": 0.0,
3
- "adapter_attn_dim": null,
4
- "adapter_kernel_size": 3,
5
- "adapter_stride": 2,
6
- "add_adapter": false,
7
  "apply_spec_augment": true,
8
  "architectures": [
9
- "Wav2Vec2Model"
10
  ],
11
  "attention_dropout": 0.1,
12
  "bos_token_id": 1,
13
- "classifier_proj_size": 256,
14
  "codevector_dim": 768,
15
  "contrastive_logits_temperature": 0.1,
16
  "conv_bias": true,
@@ -45,7 +40,6 @@
45
  "ctc_zero_infinity": false,
46
  "diversity_loss_weight": 0.1,
47
  "do_stable_layer_norm": true,
48
- "dtype": "float32",
49
  "eos_token_id": 2,
50
  "feat_extract_activation": "gelu",
51
  "feat_extract_dropout": 0.0,
@@ -62,13 +56,10 @@
62
  "layer_norm_eps": 1e-05,
63
  "layerdrop": 0.1,
64
  "mask_feature_length": 10,
65
- "mask_feature_min_masks": 0,
66
  "mask_feature_prob": 0.0,
67
  "mask_time_length": 10,
68
- "mask_time_min_masks": 2,
69
  "mask_time_prob": 0.075,
70
  "model_type": "wav2vec2",
71
- "num_adapter_layers": 3,
72
  "num_attention_heads": 16,
73
  "num_codevector_groups": 2,
74
  "num_codevectors_per_group": 320,
@@ -77,32 +68,9 @@
77
  "num_feat_extract_layers": 7,
78
  "num_hidden_layers": 24,
79
  "num_negatives": 100,
80
- "output_hidden_size": 1024,
81
  "pad_token_id": 0,
82
  "proj_codevector_dim": 768,
83
- "tdnn_dilation": [
84
- 1,
85
- 2,
86
- 3,
87
- 1,
88
- 1
89
- ],
90
- "tdnn_dim": [
91
- 512,
92
- 512,
93
- 512,
94
- 512,
95
- 1500
96
- ],
97
- "tdnn_kernel": [
98
- 5,
99
- 3,
100
- 3,
101
- 1,
102
- 1
103
- ],
104
- "transformers_version": "4.56.1",
105
- "use_weighted_layer_sum": false,
106
- "vocab_size": 32,
107
- "xvector_output_dim": 512
108
  }
 
1
  {
2
  "activation_dropout": 0.0,
 
 
 
 
3
  "apply_spec_augment": true,
4
  "architectures": [
5
+ "Wav2Vec2ForPreTraining"
6
  ],
7
  "attention_dropout": 0.1,
8
  "bos_token_id": 1,
 
9
  "codevector_dim": 768,
10
  "contrastive_logits_temperature": 0.1,
11
  "conv_bias": true,
 
40
  "ctc_zero_infinity": false,
41
  "diversity_loss_weight": 0.1,
42
  "do_stable_layer_norm": true,
 
43
  "eos_token_id": 2,
44
  "feat_extract_activation": "gelu",
45
  "feat_extract_dropout": 0.0,
 
56
  "layer_norm_eps": 1e-05,
57
  "layerdrop": 0.1,
58
  "mask_feature_length": 10,
 
59
  "mask_feature_prob": 0.0,
60
  "mask_time_length": 10,
 
61
  "mask_time_prob": 0.075,
62
  "model_type": "wav2vec2",
 
63
  "num_attention_heads": 16,
64
  "num_codevector_groups": 2,
65
  "num_codevectors_per_group": 320,
 
68
  "num_feat_extract_layers": 7,
69
  "num_hidden_layers": 24,
70
  "num_negatives": 100,
 
71
  "pad_token_id": 0,
72
  "proj_codevector_dim": 768,
73
+ "torch_dtype": "float32",
74
+ "transformers_version": "4.12.0.dev0",
75
+ "use_weighted_layer_sum": false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5e490574712ad0a6736923b9ed11d4cd51c78609c36205f704fc4e87b11d2e0
3
+ size 1269737156