VSydorskyi commited on
Commit
8c51d1f
1 Parent(s): e74b56f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +25 -181
README.md CHANGED
@@ -35,198 +35,42 @@ model-index:
35
  value: 17.634350000973198
36
  ---
37
 
38
- # Model Card for Model ID
39
 
40
- <!-- Provide a quick summary of what the model is/does. -->
 
 
 
41
 
42
- This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1).
43
 
44
- ## Model Details
 
 
 
45
 
46
- ### Model Description
 
 
47
 
48
- <!-- Provide a longer summary of what this model is. -->
 
 
49
 
 
 
 
 
 
50
 
51
-
52
- - **Developed by:** [More Information Needed]
53
- - **Shared by [optional]:** [More Information Needed]
54
- - **Model type:** [More Information Needed]
55
- - **Language(s) (NLP):** [More Information Needed]
56
- - **License:** [More Information Needed]
57
- - **Finetuned from model [optional]:** [More Information Needed]
58
-
59
- ### Model Sources [optional]
60
-
61
- <!-- Provide the basic links for the model. -->
62
-
63
- - **Repository:** [More Information Needed]
64
- - **Paper [optional]:** [More Information Needed]
65
- - **Demo [optional]:** [More Information Needed]
66
-
67
- ## Uses
68
-
69
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
70
-
71
- ### Direct Use
72
-
73
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
74
-
75
- [More Information Needed]
76
-
77
- ### Downstream Use [optional]
78
-
79
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
80
-
81
- [More Information Needed]
82
-
83
- ### Out-of-Scope Use
84
-
85
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
86
-
87
- [More Information Needed]
88
-
89
- ## Bias, Risks, and Limitations
90
-
91
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
92
-
93
- [More Information Needed]
94
-
95
- ### Recommendations
96
-
97
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
98
-
99
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
100
-
101
- ### How to Get Started with the Model
102
-
103
- Use the code below to get started with the model.
104
-
105
- [More Information Needed]
106
 
107
  ## Training Details
108
 
109
- ### Training Data
110
-
111
- <!-- This should link to a Data 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. -->
112
-
113
- [More Information Needed]
114
-
115
- ### Training Procedure
116
-
117
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
118
-
119
- #### Preprocessing [optional]
120
-
121
- [More Information Needed]
122
-
123
-
124
- #### Training Hyperparameters
125
-
126
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
127
-
128
- #### Speeds, Sizes, Times [optional]
129
-
130
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
131
-
132
- [More Information Needed]
133
-
134
- ## Evaluation
135
-
136
- <!-- This section describes the evaluation protocols and provides the results. -->
137
-
138
- ### Testing Data, Factors & Metrics
139
-
140
- #### Testing Data
141
-
142
- <!-- This should link to a Data Card if possible. -->
143
-
144
- [More Information Needed]
145
-
146
- #### Factors
147
-
148
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
149
-
150
- [More Information Needed]
151
-
152
- #### Metrics
153
-
154
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
155
-
156
- [More Information Needed]
157
-
158
- ### Results
159
-
160
- [More Information Needed]
161
-
162
- #### Summary
163
-
164
-
165
-
166
- ## Model Examination [optional]
167
-
168
- <!-- Relevant interpretability work for the model goes here -->
169
-
170
- [More Information Needed]
171
-
172
- ## Environmental Impact
173
-
174
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
175
-
176
- 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).
177
-
178
- - **Hardware Type:** [More Information Needed]
179
- - **Hours used:** [More Information Needed]
180
- - **Cloud Provider:** [More Information Needed]
181
- - **Compute Region:** [More Information Needed]
182
- - **Carbon Emitted:** [More Information Needed]
183
-
184
- ## Technical Specifications [optional]
185
-
186
- ### Model Architecture and Objective
187
-
188
- [More Information Needed]
189
-
190
- ### Compute Infrastructure
191
-
192
- [More Information Needed]
193
-
194
- #### Hardware
195
-
196
- [More Information Needed]
197
-
198
- #### Software
199
-
200
- [More Information Needed]
201
-
202
- ## Citation [optional]
203
-
204
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
205
-
206
- **BibTeX:**
207
-
208
- [More Information Needed]
209
-
210
- **APA:**
211
-
212
- [More Information Needed]
213
-
214
- ## Glossary [optional]
215
-
216
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
217
-
218
- [More Information Needed]
219
-
220
- ## More Information [optional]
221
-
222
- [More Information Needed]
223
-
224
- ## Model Card Authors [optional]
225
-
226
- [More Information Needed]
227
 
228
- ## Model Card Contact
229
 
230
- [More Information Needed]
231
 
232
 
 
35
  value: 17.634350000973198
36
  ---
37
 
38
+ # Respeecher/ukrainian-data2vec-asr
39
 
40
+ This model is a fine-tuned version of [Respeecher/ukrainian-data2vec](https://huggingface.co/Respeecher/ukrainian-data2vec) on the [Common Voice 11.0 dataset Ukrainian Train part](https://huggingface.co/datasets/mozilla-foundation/common_voice_11_0/viewer/uk/train).
41
+ It achieves the following results:
42
+ - eval_wer: 17.634350000973198
43
+ - test_wer: 17.042283338786351
44
 
45
+ ## How to Get Started with the Model
46
 
47
+ ```python
48
+ from transformers import AutoProcessor, Data2VecAudioForCTC
49
+ import torch
50
+ from datasets import load_dataset, Audio
51
 
52
+ dataset = load_dataset("mozilla-foundation/common_voice_11_0", "uk", split="test")
53
+ # Resample
54
+ dataset = dataset.cast_column("audio", Audio(sampling_rate=16_000))
55
 
56
+ processor = AutoProcessor.from_pretrained("Respeecher/ukrainian-data2vec-asr")
57
+ model = Data2VecAudioForCTC.from_pretrained("Respeecher/ukrainian-data2vec-asr")
58
+ model.eval()
59
 
60
+ sampling_rate = dataset.features["audio"].sampling_rate
61
+ inputs = processor(dataset[1]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")
62
+ with torch.no_grad():
63
+ logits = model(**inputs).logits
64
+ predicted_ids = torch.argmax(logits, dim=-1)
65
 
66
+ transcription = processor.batch_decode(predicted_ids)
67
+ transcription[0]
68
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
  ## Training Details
71
 
72
+ Training code and instructions are available on [our github](https://github.com/respeecher/ukrainian_asr)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
 
74
 
 
75
 
76