ManziBryan
commited on
Commit
·
03dbadf
1
Parent(s):
8efa7e2
Kinyarwanda Model
Browse files- .gitattributes +3 -9
- .gitignore +1 -0
- Kinyarwanda_model.nemo → 6gram.bin +2 -2
- README.md +122 -98
- added_tokens.json +1 -0
- config.json +79 -0
- preprocessor_config.json +9 -0
- pytorch_model.bin +3 -0
- readme_template.md +0 -102
- runs/Jun01_14-34-06_39fa4a121b79/1654096407.335164/events.out.tfevents.1654096407.39fa4a121b79.97.1 +3 -0
- runs/Jun01_14-34-06_39fa4a121b79/events.out.tfevents.1654096407.39fa4a121b79.97.0 +3 -0
- runs/Jun02_19-30-03_e97f4e46d604/1654200508.2227576/events.out.tfevents.1654200508.e97f4e46d604.97.1 +3 -0
- runs/Jun02_19-30-03_e97f4e46d604/events.out.tfevents.1654200508.e97f4e46d604.97.0 +3 -0
- special_tokens_map.json +1 -0
- tokenizer_config.json +1 -0
- training_args.bin +3 -0
- unigrams.txt +3 -0
- vocab.json +1 -0
.gitattributes
CHANGED
@@ -2,27 +2,20 @@
|
|
2 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
@@ -30,6 +23,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
30 |
*.wasm filter=lfs diff=lfs merge=lfs -text
|
31 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
-
*.
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
35 |
-
|
|
|
|
2 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
|
|
5 |
*.ftz filter=lfs diff=lfs merge=lfs -text
|
6 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
7 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
8 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
9 |
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
|
|
10 |
*.model filter=lfs diff=lfs merge=lfs -text
|
11 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
12 |
*.onnx filter=lfs diff=lfs merge=lfs -text
|
13 |
*.ot filter=lfs diff=lfs merge=lfs -text
|
14 |
*.parquet filter=lfs diff=lfs merge=lfs -text
|
15 |
*.pb filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
16 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
17 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
18 |
*.rar filter=lfs diff=lfs merge=lfs -text
|
|
|
19 |
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
20 |
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
21 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
|
|
23 |
*.wasm filter=lfs diff=lfs merge=lfs -text
|
24 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
6gram.bin filter=lfs diff=lfs merge=lfs -text
|
29 |
+
unigrams.txt filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
checkpoint-*/
|
Kinyarwanda_model.nemo → 6gram.bin
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:aaecc5e62e869411a2c9e7bbb912a231168d37e014752d21f70713a4b58d1e7f
|
3 |
+
size 26999898
|
README.md
CHANGED
@@ -1,104 +1,128 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
- rw
|
4 |
-
license: cc-by-4.0
|
5 |
-
library_name: nemo
|
6 |
-
datasets:
|
7 |
-
- mozilla-foundation/common_voice_11_0
|
8 |
-
thumbnail: null
|
9 |
tags:
|
10 |
-
-
|
11 |
-
|
12 |
-
-
|
13 |
-
- CTC
|
14 |
-
- Conformer
|
15 |
-
- Transformer
|
16 |
-
- NeMo
|
17 |
-
- pytorch
|
18 |
model-index:
|
19 |
-
- name:
|
20 |
results: []
|
21 |
-
|
22 |
---
|
23 |
-
## Model Source
|
24 |
-
|
25 |
-
Forked from https://huggingface.co/mbazaNLP/Kinyarwanda_nemo_stt_conformer_model
|
26 |
-
|
27 |
-
## Model Overview
|
28 |
-
|
29 |
-
<DESCRIBE IN ONE LINE THE MODEL AND ITS USE>
|
30 |
-
|
31 |
-
## NVIDIA NeMo: Training
|
32 |
-
|
33 |
-
To train, fine-tune or play with the model you will need to install [NVIDIA NeMo](https://github.com/NVIDIA/NeMo). We recommend you install it after you've installed latest Pytorch version.
|
34 |
-
```
|
35 |
-
pip install nemo_toolkit['all']
|
36 |
-
```
|
37 |
-
|
38 |
-
## How to Use this Model
|
39 |
-
|
40 |
-
The model is available for use in the NeMo toolkit [3], and can be used as a pre-trained checkpoint for inference or for fine-tuning on another dataset.
|
41 |
-
|
42 |
-
### Automatically instantiate the model
|
43 |
-
|
44 |
-
```python
|
45 |
-
import nemo.collections.asr as nemo_asr
|
46 |
-
asr_model = nemo_asr.models.ASRModel.from_pretrained("mbazaNLP/Kinyarwanda_nemo_stt_conformer_model")
|
47 |
-
```
|
48 |
-
|
49 |
-
### Transcribing using Python
|
50 |
-
First, let's get a sample
|
51 |
-
```
|
52 |
-
wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
|
53 |
-
```
|
54 |
-
Then simply do:
|
55 |
-
```
|
56 |
-
asr_model.transcribe(['2086-149220-0033.wav'])
|
57 |
-
```
|
58 |
-
|
59 |
-
### Transcribing many audio files
|
60 |
-
|
61 |
-
```shell
|
62 |
-
python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py pretrained_name="mbazaNLP/Kinyarwanda_nemo_stt_conformer_model" audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
|
63 |
-
```
|
64 |
-
|
65 |
-
### Input
|
66 |
-
|
67 |
-
This model accepts 16000 KHz Mono-channel Audio (wav files) as input.
|
68 |
-
|
69 |
-
### Output
|
70 |
-
|
71 |
-
This model provides transcribed speech as a string for a given audio sample.
|
72 |
-
|
73 |
-
## Model Architecture
|
74 |
-
|
75 |
-
<ADD SOME INFORMATION ABOUT THE ARCHITECTURE>
|
76 |
-
|
77 |
-
## Training
|
78 |
-
|
79 |
-
<ADD INFORMATION ABOUT HOW THE MODEL WAS TRAINED - HOW MANY EPOCHS, AMOUNT OF COMPUTE ETC>
|
80 |
-
|
81 |
-
### Datasets
|
82 |
-
|
83 |
-
<LIST THE NAME AND SPLITS OF DATASETS USED TO TRAIN THIS MODEL (ALONG WITH LANGUAGE AND ANY ADDITIONAL INFORMATION)>
|
84 |
-
|
85 |
-
## Performance
|
86 |
-
|
87 |
-
<LIST THE SCORES OF THE MODEL -
|
88 |
-
OR
|
89 |
-
USE THE Hugging Face Evaluate LiBRARY TO UPLOAD METRICS>
|
90 |
-
|
91 |
-
## Limitations
|
92 |
-
|
93 |
-
<DECLARE ANY POTENTIAL LIMITATIONS OF THE MODEL>
|
94 |
-
|
95 |
-
Eg:
|
96 |
-
Since this model was trained on publically available speech datasets, the performance of this model might degrade for speech which includes technical terms, or vernacular that the model has not been trained on. The model might also perform worse for accented speech.
|
97 |
-
|
98 |
-
|
99 |
-
## References
|
100 |
-
|
101 |
-
<ADD ANY REFERENCES HERE AS NEEDED>
|
102 |
-
|
103 |
-
[1] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
tags:
|
4 |
+
- generated_from_trainer
|
5 |
+
datasets:
|
6 |
+
- common_voice
|
|
|
|
|
|
|
|
|
|
|
7 |
model-index:
|
8 |
+
- name: wav2vec2-large-xls-r-300m-kinyarwanda
|
9 |
results: []
|
|
|
10 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
13 |
+
should probably proofread and complete it, then remove this comment. -->
|
14 |
+
|
15 |
+
# wav2vec2-large-xls-r-300m-kinyarwanda
|
16 |
+
|
17 |
+
This model is a fine-tuned version of [facebook/wav2vec2-xls-r-300m](https://huggingface.co/facebook/wav2vec2-xls-r-300m) on the common_voice dataset.
|
18 |
+
It achieves the following results on the evaluation set:
|
19 |
+
- Loss: 0.3917
|
20 |
+
- Wer: 0.3246
|
21 |
+
|
22 |
+
## Model description
|
23 |
+
|
24 |
+
More information needed
|
25 |
+
|
26 |
+
## Intended uses & limitations
|
27 |
+
|
28 |
+
More information needed
|
29 |
+
|
30 |
+
## Training and evaluation data
|
31 |
+
|
32 |
+
More information needed
|
33 |
+
|
34 |
+
## Training procedure
|
35 |
+
|
36 |
+
### Training hyperparameters
|
37 |
+
|
38 |
+
The following hyperparameters were used during training:
|
39 |
+
- learning_rate: 7e-05
|
40 |
+
- train_batch_size: 12
|
41 |
+
- eval_batch_size: 8
|
42 |
+
- seed: 42
|
43 |
+
- gradient_accumulation_steps: 2
|
44 |
+
- total_train_batch_size: 24
|
45 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
46 |
+
- lr_scheduler_type: linear
|
47 |
+
- lr_scheduler_warmup_steps: 400
|
48 |
+
- num_epochs: 8
|
49 |
+
- mixed_precision_training: Native AMP
|
50 |
+
|
51 |
+
### Training results
|
52 |
+
|
53 |
+
| Training Loss | Epoch | Step | Validation Loss | Wer |
|
54 |
+
|:-------------:|:-----:|:-----:|:---------------:|:------:|
|
55 |
+
| 9.0634 | 0.12 | 400 | 3.0554 | 1.0 |
|
56 |
+
| 2.8009 | 0.24 | 800 | 1.5927 | 0.9554 |
|
57 |
+
| 0.9022 | 0.36 | 1200 | 0.7328 | 0.6445 |
|
58 |
+
| 0.6213 | 0.48 | 1600 | 0.6138 | 0.5510 |
|
59 |
+
| 0.5299 | 0.6 | 2000 | 0.6072 | 0.5223 |
|
60 |
+
| 0.4999 | 0.72 | 2400 | 0.5449 | 0.4969 |
|
61 |
+
| 0.4731 | 0.84 | 2800 | 0.5261 | 0.4828 |
|
62 |
+
| 0.458 | 0.96 | 3200 | 0.5058 | 0.4607 |
|
63 |
+
| 0.4158 | 1.09 | 3600 | 0.4892 | 0.4463 |
|
64 |
+
| 0.4037 | 1.21 | 4000 | 0.4759 | 0.4429 |
|
65 |
+
| 0.4021 | 1.33 | 4400 | 0.4615 | 0.4330 |
|
66 |
+
| 0.3934 | 1.45 | 4800 | 0.4593 | 0.4315 |
|
67 |
+
| 0.3808 | 1.57 | 5200 | 0.4736 | 0.4344 |
|
68 |
+
| 0.3838 | 1.69 | 5600 | 0.4569 | 0.4249 |
|
69 |
+
| 0.3726 | 1.81 | 6000 | 0.4473 | 0.4140 |
|
70 |
+
| 0.3623 | 1.93 | 6400 | 0.4403 | 0.4097 |
|
71 |
+
| 0.3517 | 2.05 | 6800 | 0.4389 | 0.4061 |
|
72 |
+
| 0.333 | 2.17 | 7200 | 0.4383 | 0.4104 |
|
73 |
+
| 0.3354 | 2.29 | 7600 | 0.4360 | 0.3955 |
|
74 |
+
| 0.3257 | 2.41 | 8000 | 0.4226 | 0.3942 |
|
75 |
+
| 0.3275 | 2.53 | 8400 | 0.4206 | 0.4040 |
|
76 |
+
| 0.3262 | 2.65 | 8800 | 0.4172 | 0.3875 |
|
77 |
+
| 0.3206 | 2.77 | 9200 | 0.4209 | 0.3877 |
|
78 |
+
| 0.323 | 2.89 | 9600 | 0.4177 | 0.3825 |
|
79 |
+
| 0.3099 | 3.01 | 10000 | 0.4101 | 0.3691 |
|
80 |
+
| 0.3008 | 3.14 | 10400 | 0.4055 | 0.3709 |
|
81 |
+
| 0.2918 | 3.26 | 10800 | 0.4085 | 0.3800 |
|
82 |
+
| 0.292 | 3.38 | 11200 | 0.4089 | 0.3713 |
|
83 |
+
| 0.292 | 3.5 | 11600 | 0.4092 | 0.3730 |
|
84 |
+
| 0.2785 | 3.62 | 12000 | 0.4151 | 0.3687 |
|
85 |
+
| 0.2941 | 3.74 | 12400 | 0.4004 | 0.3639 |
|
86 |
+
| 0.2838 | 3.86 | 12800 | 0.4108 | 0.3703 |
|
87 |
+
| 0.2854 | 3.98 | 13200 | 0.3911 | 0.3596 |
|
88 |
+
| 0.2683 | 4.1 | 13600 | 0.3944 | 0.3575 |
|
89 |
+
| 0.2647 | 4.22 | 14000 | 0.3836 | 0.3538 |
|
90 |
+
| 0.2704 | 4.34 | 14400 | 0.4006 | 0.3540 |
|
91 |
+
| 0.2664 | 4.46 | 14800 | 0.3974 | 0.3553 |
|
92 |
+
| 0.2662 | 4.58 | 15200 | 0.3890 | 0.3470 |
|
93 |
+
| 0.2615 | 4.7 | 15600 | 0.3856 | 0.3507 |
|
94 |
+
| 0.2553 | 4.82 | 16000 | 0.3814 | 0.3497 |
|
95 |
+
| 0.2587 | 4.94 | 16400 | 0.3837 | 0.3440 |
|
96 |
+
| 0.2522 | 5.06 | 16800 | 0.3834 | 0.3486 |
|
97 |
+
| 0.2451 | 5.19 | 17200 | 0.3897 | 0.3414 |
|
98 |
+
| 0.2423 | 5.31 | 17600 | 0.3864 | 0.3481 |
|
99 |
+
| 0.2434 | 5.43 | 18000 | 0.3808 | 0.3416 |
|
100 |
+
| 0.2525 | 5.55 | 18400 | 0.3795 | 0.3408 |
|
101 |
+
| 0.2427 | 5.67 | 18800 | 0.3841 | 0.3411 |
|
102 |
+
| 0.2411 | 5.79 | 19200 | 0.3804 | 0.3366 |
|
103 |
+
| 0.2404 | 5.91 | 19600 | 0.3800 | 0.3328 |
|
104 |
+
| 0.2372 | 6.03 | 20000 | 0.3749 | 0.3335 |
|
105 |
+
| 0.2244 | 6.15 | 20400 | 0.3820 | 0.3327 |
|
106 |
+
| 0.2381 | 6.27 | 20800 | 0.3789 | 0.3325 |
|
107 |
+
| 0.2294 | 6.39 | 21200 | 0.3867 | 0.3298 |
|
108 |
+
| 0.2378 | 6.51 | 21600 | 0.3843 | 0.3281 |
|
109 |
+
| 0.2312 | 6.63 | 22000 | 0.3813 | 0.3277 |
|
110 |
+
| 0.2411 | 6.75 | 22400 | 0.3780 | 0.3268 |
|
111 |
+
| 0.2315 | 6.87 | 22800 | 0.3790 | 0.3280 |
|
112 |
+
| 0.241 | 6.99 | 23200 | 0.3776 | 0.3281 |
|
113 |
+
| 0.2313 | 7.11 | 23600 | 0.3929 | 0.3283 |
|
114 |
+
| 0.2423 | 7.24 | 24000 | 0.3905 | 0.3280 |
|
115 |
+
| 0.2337 | 7.36 | 24400 | 0.3979 | 0.3249 |
|
116 |
+
| 0.2368 | 7.48 | 24800 | 0.3980 | 0.3257 |
|
117 |
+
| 0.2409 | 7.6 | 25200 | 0.3937 | 0.3229 |
|
118 |
+
| 0.2416 | 7.72 | 25600 | 0.3867 | 0.3237 |
|
119 |
+
| 0.2364 | 7.84 | 26000 | 0.3912 | 0.3253 |
|
120 |
+
| 0.234 | 7.96 | 26400 | 0.3917 | 0.3246 |
|
121 |
+
|
122 |
+
|
123 |
+
### Framework versions
|
124 |
+
|
125 |
+
- Transformers 4.11.3
|
126 |
+
- Pytorch 1.10.0+cu113
|
127 |
+
- Datasets 1.18.3
|
128 |
+
- Tokenizers 0.10.3
|
added_tokens.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"<s>": 97, "</s>": 98}
|
config.json
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "facebook/wav2vec2-xls-r-300m",
|
3 |
+
"activation_dropout": 0.0,
|
4 |
+
"apply_spec_augment": true,
|
5 |
+
"architectures": [
|
6 |
+
"Wav2Vec2ForCTC"
|
7 |
+
],
|
8 |
+
"attention_dropout": 0.05,
|
9 |
+
"bos_token_id": 1,
|
10 |
+
"classifier_proj_size": 256,
|
11 |
+
"codevector_dim": 768,
|
12 |
+
"contrastive_logits_temperature": 0.1,
|
13 |
+
"conv_bias": true,
|
14 |
+
"conv_dim": [
|
15 |
+
512,
|
16 |
+
512,
|
17 |
+
512,
|
18 |
+
512,
|
19 |
+
512,
|
20 |
+
512,
|
21 |
+
512
|
22 |
+
],
|
23 |
+
"conv_kernel": [
|
24 |
+
10,
|
25 |
+
3,
|
26 |
+
3,
|
27 |
+
3,
|
28 |
+
3,
|
29 |
+
2,
|
30 |
+
2
|
31 |
+
],
|
32 |
+
"conv_stride": [
|
33 |
+
5,
|
34 |
+
2,
|
35 |
+
2,
|
36 |
+
2,
|
37 |
+
2,
|
38 |
+
2,
|
39 |
+
2
|
40 |
+
],
|
41 |
+
"ctc_loss_reduction": "mean",
|
42 |
+
"ctc_zero_infinity": false,
|
43 |
+
"diversity_loss_weight": 0.1,
|
44 |
+
"do_stable_layer_norm": true,
|
45 |
+
"eos_token_id": 2,
|
46 |
+
"feat_extract_activation": "gelu",
|
47 |
+
"feat_extract_dropout": 0.0,
|
48 |
+
"feat_extract_norm": "layer",
|
49 |
+
"feat_proj_dropout": 0.05,
|
50 |
+
"feat_quantizer_dropout": 0.0,
|
51 |
+
"final_dropout": 0.0,
|
52 |
+
"gradient_checkpointing": false,
|
53 |
+
"hidden_act": "gelu",
|
54 |
+
"hidden_dropout": 0.05,
|
55 |
+
"hidden_size": 1024,
|
56 |
+
"initializer_range": 0.02,
|
57 |
+
"intermediate_size": 4096,
|
58 |
+
"layer_norm_eps": 1e-05,
|
59 |
+
"layerdrop": 0.05,
|
60 |
+
"mask_feature_length": 10,
|
61 |
+
"mask_feature_prob": 0.0,
|
62 |
+
"mask_time_length": 10,
|
63 |
+
"mask_time_prob": 0.05,
|
64 |
+
"model_type": "wav2vec2",
|
65 |
+
"num_attention_heads": 16,
|
66 |
+
"num_codevector_groups": 2,
|
67 |
+
"num_codevectors_per_group": 320,
|
68 |
+
"num_conv_pos_embedding_groups": 16,
|
69 |
+
"num_conv_pos_embeddings": 128,
|
70 |
+
"num_feat_extract_layers": 7,
|
71 |
+
"num_hidden_layers": 24,
|
72 |
+
"num_negatives": 100,
|
73 |
+
"pad_token_id": 96,
|
74 |
+
"proj_codevector_dim": 768,
|
75 |
+
"torch_dtype": "float32",
|
76 |
+
"transformers_version": "4.11.3",
|
77 |
+
"use_weighted_layer_sum": false,
|
78 |
+
"vocab_size": 99
|
79 |
+
}
|
preprocessor_config.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_normalize": true,
|
3 |
+
"feature_extractor_type": "Wav2Vec2FeatureExtractor",
|
4 |
+
"feature_size": 1,
|
5 |
+
"padding_side": "right",
|
6 |
+
"padding_value": 0.0,
|
7 |
+
"return_attention_mask": true,
|
8 |
+
"sampling_rate": 16000
|
9 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5d70c72f2afe3d4cf5f58933ee91e274fadf1928e9ae29795e7420870ccf51d9
|
3 |
+
size 1262329585
|
readme_template.md
DELETED
@@ -1,102 +0,0 @@
|
|
1 |
-
---
|
2 |
-
language:
|
3 |
-
- rw
|
4 |
-
license: cc-by-4.0
|
5 |
-
library_name: nemo
|
6 |
-
datasets:
|
7 |
-
- mozilla-foundation/common_voice_11_0
|
8 |
-
thumbnail: null
|
9 |
-
tags:
|
10 |
-
- automatic-speech-recognition
|
11 |
-
- speech
|
12 |
-
- audio
|
13 |
-
- CTC
|
14 |
-
- Conformer
|
15 |
-
- Transformer
|
16 |
-
- NeMo
|
17 |
-
- pytorch
|
18 |
-
model-index:
|
19 |
-
- name: Kinyarwanda_nemo_stt_conformer_model
|
20 |
-
results: []
|
21 |
-
|
22 |
-
---
|
23 |
-
|
24 |
-
|
25 |
-
## Model Overview
|
26 |
-
|
27 |
-
<DESCRIBE IN ONE LINE THE MODEL AND ITS USE>
|
28 |
-
|
29 |
-
## NVIDIA NeMo: Training
|
30 |
-
|
31 |
-
To train, fine-tune or play with the model you will need to install [NVIDIA NeMo](https://github.com/NVIDIA/NeMo). We recommend you install it after you've installed latest Pytorch version.
|
32 |
-
```
|
33 |
-
pip install nemo_toolkit['all']
|
34 |
-
```
|
35 |
-
|
36 |
-
## How to Use this Model
|
37 |
-
|
38 |
-
The model is available for use in the NeMo toolkit [3], and can be used as a pre-trained checkpoint for inference or for fine-tuning on another dataset.
|
39 |
-
|
40 |
-
### Automatically instantiate the model
|
41 |
-
|
42 |
-
```python
|
43 |
-
import nemo.collections.asr as nemo_asr
|
44 |
-
asr_model = nemo_asr.models.ASRModel.from_pretrained("mbazaNLP/Kinyarwanda_nemo_stt_conformer_model")
|
45 |
-
```
|
46 |
-
|
47 |
-
### Transcribing using Python
|
48 |
-
First, let's get a sample
|
49 |
-
```
|
50 |
-
wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
|
51 |
-
```
|
52 |
-
Then simply do:
|
53 |
-
```
|
54 |
-
asr_model.transcribe(['2086-149220-0033.wav'])
|
55 |
-
```
|
56 |
-
|
57 |
-
### Transcribing many audio files
|
58 |
-
|
59 |
-
```shell
|
60 |
-
python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py pretrained_name="mbazaNLP/Kinyarwanda_nemo_stt_conformer_model" audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
|
61 |
-
```
|
62 |
-
|
63 |
-
### Input
|
64 |
-
|
65 |
-
This model accepts 16000 KHz Mono-channel Audio (wav files) as input.
|
66 |
-
|
67 |
-
### Output
|
68 |
-
|
69 |
-
This model provides transcribed speech as a string for a given audio sample.
|
70 |
-
|
71 |
-
## Model Architecture
|
72 |
-
|
73 |
-
<ADD SOME INFORMATION ABOUT THE ARCHITECTURE>
|
74 |
-
|
75 |
-
## Training
|
76 |
-
|
77 |
-
<ADD INFORMATION ABOUT HOW THE MODEL WAS TRAINED - HOW MANY EPOCHS, AMOUNT OF COMPUTE ETC>
|
78 |
-
|
79 |
-
### Datasets
|
80 |
-
|
81 |
-
<LIST THE NAME AND SPLITS OF DATASETS USED TO TRAIN THIS MODEL (ALONG WITH LANGUAGE AND ANY ADDITIONAL INFORMATION)>
|
82 |
-
|
83 |
-
## Performance
|
84 |
-
|
85 |
-
<LIST THE SCORES OF THE MODEL -
|
86 |
-
OR
|
87 |
-
USE THE Hugging Face Evaluate LiBRARY TO UPLOAD METRICS>
|
88 |
-
|
89 |
-
## Limitations
|
90 |
-
|
91 |
-
<DECLARE ANY POTENTIAL LIMITATIONS OF THE MODEL>
|
92 |
-
|
93 |
-
Eg:
|
94 |
-
Since this model was trained on publically available speech datasets, the performance of this model might degrade for speech which includes technical terms, or vernacular that the model has not been trained on. The model might also perform worse for accented speech.
|
95 |
-
|
96 |
-
|
97 |
-
## References
|
98 |
-
|
99 |
-
<ADD ANY REFERENCES HERE AS NEEDED>
|
100 |
-
|
101 |
-
[1] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
runs/Jun01_14-34-06_39fa4a121b79/1654096407.335164/events.out.tfevents.1654096407.39fa4a121b79.97.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c9e0f0d7048ed7caa4abf7f01fa5885b02f47bffb0552371990ac30ba3733966
|
3 |
+
size 4606
|
runs/Jun01_14-34-06_39fa4a121b79/events.out.tfevents.1654096407.39fa4a121b79.97.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e290874a7fa42e59cf29a065b904d194aed54df333aa2050b2eb2888766f8145
|
3 |
+
size 33422
|
runs/Jun02_19-30-03_e97f4e46d604/1654200508.2227576/events.out.tfevents.1654200508.e97f4e46d604.97.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:851365652599db95f0b4982551ed0eb33d6afc9d31aa334eee72781cf5e64753
|
3 |
+
size 4606
|
runs/Jun02_19-30-03_e97f4e46d604/events.out.tfevents.1654200508.e97f4e46d604.97.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:884ec57ff8e5fa0bbb249f32d5a57dd8ba0c7e90f0b8953f5e9d04f459d4be2e
|
3 |
+
size 36207
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "[UNK]", "pad_token": "[PAD]", "additional_special_tokens": [{"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}]}
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"unk_token": "[UNK]", "bos_token": "<s>", "eos_token": "</s>", "pad_token": "[PAD]", "do_lower_case": false, "word_delimiter_token": "|", "special_tokens_map_file": null, "tokenizer_file": null, "name_or_path": "./", "tokenizer_class": "Wav2Vec2CTCTokenizer"}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1a796dd1f339098f7a8f13dc3b230033f2f9173516215606d175c9af95d8bcd5
|
3 |
+
size 2863
|
unigrams.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9a6772e21686beed048ece913b12728db2665be8c13835e28c010d984232933c
|
3 |
+
size 29965146
|
vocab.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"#": 1, "(": 2, ")": 3, "*": 4, "+": 5, "<": 6, "=": 7, ">": 8, "@": 9, "\\": 10, "_": 11, "`": 12, "a": 13, "b": 14, "c": 15, "d": 16, "e": 17, "f": 18, "g": 19, "h": 20, "i": 21, "j": 22, "k": 23, "l": 24, "m": 25, "n": 26, "o": 27, "p": 28, "q": 29, "r": 30, "s": 31, "t": 32, "u": 33, "v": 34, "w": 35, "x": 36, "y": 37, "z": 38, "£": 39, "¨": 40, "©": 41, "«": 42, "®": 43, "°": 44, "»": 45, "¼": 46, "½": 47, "á": 48, "é": 49, "ï": 50, "ñ": 51, "ò": 52, "ö": 53, "ø": 54, "ù": 55, "ü": 56, "ÿ": 57, "ā": 58, "ć": 59, "ē": 60, "ğ": 61, "ī": 62, "ō": 63, "œ": 64, "ş": 65, "š": 66, "ū": 67, "ȃ": 68, "ȏ": 69, "ʺ": 70, "ʼ": 71, "ʽ": 72, "˜": 73, "˝": 74, "̀": 75, "в": 76, "к": 77, "о": 78, "у": 79, "і": 80, "ḥ": 81, "ṭ": 82, "‐": 83, "–": 84, "—": 85, "―": 86, "’": 87, "‟": 88, "•": 89, "…": 90, "″": 91, "‽": 92, "€": 93, "™": 94, "|": 0, "[UNK]": 95, "[PAD]": 96}
|