asierhv commited on
Commit
f030982
·
verified ·
1 Parent(s): 3d925d6

added description and "how to use" example

Browse files
Files changed (1) hide show
  1. README.md +143 -38
README.md CHANGED
@@ -28,46 +28,109 @@ model-index:
28
  value: 26.13307119205298
29
  ---
30
 
31
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
32
- should probably proofread and complete it, then remove this comment. -->
33
-
34
  # Whisper Tiny Galician
35
 
36
- This model is a fine-tuned version of [openai/whisper-tiny](https://huggingface.co/openai/whisper-tiny) on the mozilla-foundation/common_voice_13_0 gl dataset.
37
- It achieves the following results on the evaluation set:
38
- - Loss: 0.6003
39
- - Wer: 26.1331
 
 
 
40
 
41
  ## Model description
42
 
43
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
- ## Intended uses & limitations
46
 
47
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
  ## Training and evaluation data
50
 
51
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  ## Training procedure
54
 
55
  ### Training hyperparameters
56
 
57
- The following hyperparameters were used during training:
58
- - learning_rate: 3.75e-05
59
- - train_batch_size: 256
60
- - eval_batch_size: 128
61
- - seed: 42
62
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
63
- - lr_scheduler_type: linear
64
- - lr_scheduler_warmup_steps: 500
65
- - training_steps: 5000
66
- - mixed_precision_training: Native AMP
67
 
68
- ### Training results
69
 
70
- | Training Loss | Epoch | Step | Validation Loss | Wer |
71
  |:-------------:|:-----:|:----:|:---------------:|:-------:|
72
  | 0.3626 | 20.0 | 1000 | 0.5407 | 30.8464 |
73
  | 0.1103 | 40.0 | 2000 | 0.5370 | 27.0402 |
@@ -75,27 +138,57 @@ The following hyperparameters were used during training:
75
  | 0.03 | 80.0 | 4000 | 0.5936 | 26.1382 |
76
  | 0.0244 | 100.0 | 5000 | 0.6003 | 26.1331 |
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
- ### Framework versions
 
 
 
 
 
 
80
 
81
- - Transformers 4.37.2
82
- - Pytorch 2.2.0+cu121
83
- - Datasets 2.16.1
84
- - Tokenizers 0.15.1
 
85
 
86
  ## Citation
87
 
88
- If you use these models in your research, please cite:
89
 
90
  ```bibtex
91
  @misc{dezuazo2025whisperlmimprovingasrmodels,
92
- title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages},
93
- author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
94
- year={2025},
95
- eprint={2503.23542},
96
- archivePrefix={arXiv},
97
- primaryClass={cs.CL},
98
- url={https://arxiv.org/abs/2503.23542},
99
  }
100
  ```
101
 
@@ -103,9 +196,21 @@ Please, check the related paper preprint in
103
  [arXiv:2503.23542](https://arxiv.org/abs/2503.23542)
104
  for more details.
105
 
106
- ## Licensing
 
 
107
 
108
  This model is available under the
109
  [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
110
  You are free to use, modify, and distribute this model as long as you credit
111
- the original creators.
 
 
 
 
 
 
 
 
 
 
 
28
  value: 26.13307119205298
29
  ---
30
 
 
 
 
31
  # Whisper Tiny Galician
32
 
33
+ ## Model summary
34
+
35
+ **Whisper Tiny Galician** is an automatic speech recognition (ASR) model for **Galician (gl)** speech. It is fine-tuned from [openai/whisper-tiny] on the **Galician portion of Mozilla Common Voice 13.0**, achieving a **Word Error Rate (WER) of 26.13%** on the Common Voice evaluation split.
36
+
37
+ This model provides lightweight transcription capabilities for Galician speech, suitable for low-resource applications or devices with limited computational capacity.
38
+
39
+ ---
40
 
41
  ## Model description
42
 
43
+ * **Architecture:** Transformer-based encoder–decoder (Whisper)
44
+ * **Base model:** openai/whisper-tiny
45
+ * **Language:** Galician (gl)
46
+ * **Task:** Automatic Speech Recognition (ASR)
47
+ * **Output:** Text transcription in Galician
48
+ * **Decoding:** Autoregressive sequence-to-sequence decoding
49
+
50
+ This tiny model leverages Whisper’s multilingual pretraining and is fine-tuned on Galician speech data to provide basic transcription functionality for a low-resource language, ideal for experimentation and lightweight applications.
51
+
52
+ ---
53
+
54
+ ## Intended use
55
+
56
+ ### Primary use cases
57
+
58
+ * Lightweight transcription of Galician audio recordings
59
+ * Low-resource or offline ASR pipelines
60
+ * Educational and research purposes
61
+
62
+ ### Intended users
63
+
64
+ * Researchers working on Galician or low-resource ASR
65
+ * Developers building Galician speech applications
66
+ * Academic or institutional users
67
 
68
+ ### Out-of-scope use
69
 
70
+ * High-accuracy transcription requirements
71
+ * Real-time or low-latency ASR without optimization
72
+ * Speech translation tasks
73
+
74
+ ---
75
+
76
+ ## Limitations and known issues
77
+
78
+ * Performance may degrade on:
79
+ * Noisy or low-quality recordings
80
+ * Conversational or spontaneous speech
81
+ * Accents underrepresented in Common Voice
82
+ * Transcription errors are expected due to the small model size
83
+ * Dataset biases from Common Voice may be reflected in outputs
84
+
85
+ Users are encouraged to evaluate the model on their own data before deployment.
86
+
87
+ ---
88
 
89
  ## Training and evaluation data
90
 
91
+ ### Training data
92
+
93
+ * **Dataset:** Mozilla Common Voice 13.0 (Galician subset)
94
+ * **Data type:** Crowd-sourced, read speech
95
+ * **Preprocessing:**
96
+ * Audio resampled to 16 kHz
97
+ * Text normalized using Whisper tokenizer
98
+ * Filtering of invalid or problematic samples
99
+
100
+ ### Evaluation data
101
+
102
+ * **Dataset:** Mozilla Common Voice 13.0 (Galician evaluation split)
103
+ * **Metric:** Word Error Rate (WER)
104
+
105
+ ---
106
+
107
+ ## Evaluation results
108
+
109
+ | Metric | Value |
110
+ | ---------- | ---------- |
111
+ | WER (eval) | **26.13%** |
112
+
113
+ This reflects the expected performance of a tiny Whisper model fine-tuned for Galician.
114
+
115
+ ---
116
 
117
  ## Training procedure
118
 
119
  ### Training hyperparameters
120
 
121
+ * Learning rate: 3.75e-5
122
+ * Optimizer: Adam (β1=0.9, β2=0.999, ε=1e-8)
123
+ * LR scheduler: Linear
124
+ * Warmup steps: 500
125
+ * Training steps: 5,000
126
+ * Train batch size: 256
127
+ * Evaluation batch size: 128
128
+ * Seed: 42
129
+ * Mixed precision training: Native AMP
 
130
 
131
+ ### Training results (summary)
132
 
133
+ | Training Loss | Epoch | Step | Validation Loss | WER |
134
  |:-------------:|:-----:|:----:|:---------------:|:-------:|
135
  | 0.3626 | 20.0 | 1000 | 0.5407 | 30.8464 |
136
  | 0.1103 | 40.0 | 2000 | 0.5370 | 27.0402 |
 
138
  | 0.03 | 80.0 | 4000 | 0.5936 | 26.1382 |
139
  | 0.0244 | 100.0 | 5000 | 0.6003 | 26.1331 |
140
 
141
+ ---
142
+
143
+ ## Framework versions
144
+
145
+ - Transformers 4.37.2
146
+ - PyTorch 2.2.0+cu121
147
+ - Datasets 2.16.1
148
+ - Tokenizers 0.15.1
149
+
150
+ ---
151
+
152
+ ## How to use
153
+
154
+ ```python
155
+ from transformers import pipeline
156
+
157
+ hf_model = "HiTZ/whisper-tiny-gl" # replace with actual repo ID
158
+ device = 0 # set to -1 for CPU
159
+
160
+ pipe = pipeline(
161
+ task="automatic-speech-recognition",
162
+ model=hf_model,
163
+ device=device
164
+ )
165
 
166
+ result = pipe("audio.wav")
167
+ print(result["text"])
168
+ ```
169
+
170
+ ---
171
+
172
+ ## Ethical considerations and risks
173
 
174
+ * This model transcribes speech and may process personal data.
175
+ * Users should ensure compliance with applicable data protection laws (e.g., GDPR).
176
+ * The model should not be used for surveillance or non-consensual audio processing.
177
+
178
+ ---
179
 
180
  ## Citation
181
 
182
+ If you use this model in your research, please cite:
183
 
184
  ```bibtex
185
  @misc{dezuazo2025whisperlmimprovingasrmodels,
186
+ title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages},
187
+ author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
188
+ year={2025},
189
+ eprint={2503.23542},
190
+ archivePrefix={arXiv},
191
+ primaryClass={cs.CL}
 
192
  }
193
  ```
194
 
 
196
  [arXiv:2503.23542](https://arxiv.org/abs/2503.23542)
197
  for more details.
198
 
199
+ ---
200
+
201
+ ## License
202
 
203
  This model is available under the
204
  [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
205
  You are free to use, modify, and distribute this model as long as you credit
206
+ the original creators.
207
+
208
+ ---
209
+
210
+ ## Contact and attribution
211
+
212
+ * Fine-tuning and evaluation: HiTZ/Aholab - Basque Center for Language Technology
213
+ * Base model: OpenAI Whisper
214
+ * Dataset: Mozilla Common Voice
215
+
216
+ For questions or issues, please open an issue in the model repository.