File size: 4,393 Bytes
e7af1f8
699a1c0
 
e7af1f8
 
699a1c0
e7af1f8
831b85e
020ddc4
831b85e
 
e7af1f8
0252237
e7af1f8
090249b
504d95e
 
090249b
504d95e
 
 
 
 
 
090249b
 
 
 
 
 
fe7dd5e
090249b
fe7dd5e
 
 
 
 
 
090249b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e7af1f8
 
 
 
 
 
 
699a1c0
504d95e
fe7dd5e
 
 
 
 
 
 
504d95e
e7af1f8
699a1c0
 
b4be586
e7af1f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8de96ae
e7af1f8
 
 
 
8de96ae
 
6c0e054
 
 
 
 
 
 
 
 
 
e7af1f8
 
 
 
 
 
 
 
504d95e
 
 
 
 
 
fe7dd5e
 
 
 
 
 
504d95e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
language:
- ja
license: apache-2.0
tags:
- automatic-speech-recognition
- generated_from_trainer
- hf-asr-leaderboard
- ja
- mozilla-foundation/common_voice_8_0
- robust-speech-event
datasets:
- mozilla-foundation/common_voice_8_0
model-index:
- name: XLS-R-300-m
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: ja
    metrics:
    - name: Test WER
      type: wer
      value: 95.82
    - name: Test CER
      type: cer
      value: 23.64
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Robust Speech Event - Dev Data
      type: speech-recognition-community-v2/dev_data
      args: de
    metrics:
    - name: Test WER
      type: wer
      value: 100.0
    - name: Test CER
      type: cer
      value: 30.99
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Robust Speech Event - Dev Data
      type: speech-recognition-community-v2/dev_data
      args: ja
    metrics:
    - name: Test CER
      type: cer
      value: 30.37
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Robust Speech Event - Test Data
      type: speech-recognition-community-v2/eval_data
      args: ja
    metrics:
    - name: Test CER
      type: cer
      value: 34.42
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# 

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-300m](https://huggingface.co/facebook/wav2vec2-xls-r-300m) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - JA dataset.

Kanji are converted into Hiragana using the [pykakasi](https://pykakasi.readthedocs.io/en/latest/index.html) library during training and evaluation. The model can output both Hiragana and Katakana characters. Since there is no spacing, WER is not a suitable metric for evaluating performance and CER is more suitable.

On mozilla-foundation/common_voice_8_0 it achieved:
- cer: 23.64%

On speech-recognition-community-v2/dev_data it achieved:
- cer: 30.99%

It achieves the following results on the evaluation set:
- Loss: 0.5212
- Wer: 1.3068

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 7.5e-05
- train_batch_size: 48
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 2000
- num_epochs: 50.0
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step  | Validation Loss | Wer    |
|:-------------:|:-----:|:-----:|:---------------:|:------:|
| 4.0974        | 4.72  | 1000  | 4.0178          | 1.9535 |
| 2.1276        | 9.43  | 2000  | 0.9301          | 1.2128 |
| 1.7622        | 14.15 | 3000  | 0.7103          | 1.5527 |
| 1.6397        | 18.87 | 4000  | 0.6729          | 1.4269 |
| 1.5468        | 23.58 | 5000  | 0.6087          | 1.2497 |
| 1.4885        | 28.3  | 6000  | 0.5786          | 1.3222 |
| 1.451         | 33.02 | 7000  | 0.5726          | 1.3768 |
| 1.3912        | 37.74 | 8000  | 0.5518          | 1.2497 |
| 1.3617        | 42.45 | 9000  | 0.5352          | 1.2694 |
| 1.3113        | 47.17 | 10000 | 0.5228          | 1.2781 |


### Framework versions

- Transformers 4.17.0.dev0
- Pytorch 1.10.2+cu102
- Datasets 1.18.2.dev0
- Tokenizers 0.11.0

#### Evaluation Commands
1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python ./eval.py --model_id AndrewMcDowell/wav2vec2-xls-r-300m-japanese --dataset mozilla-foundation/common_voice_8_0 --config ja --split test --log_outputs
```

2. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python ./eval.py --model_id AndrewMcDowell/wav2vec2-xls-r-300m-japanese --dataset speech-recognition-community-v2/dev_data --config de --split validation --chunk_length_s 5.0 --stride_length_s 1.0
```