Update README.md
Browse files
README.md
CHANGED
|
@@ -69,7 +69,7 @@ For details on background, pre-training, tuning experiments and evaluation, plea
|
|
| 69 |
| MERaLiON-SpeechEncoder-v1 | 82.62 | 3.14 | 4.16 | 97.63 | 0.0590 | 91.09 | 5.18 | 5.06 | 68.02 | 98.60 | 88.99 / 23.89 |
|
| 70 |
| MERaLiON-SpeechEncoder-2 | 82.72 | 3.40 | 4.96 | 97.57 | 0.0575 | 88.96 | 3.93 | 3.90 | 68.80 | 98.95 | 89.50 / 23.46 |
|
| 71 |
|
| 72 |
-
SUPERB is an English-based benchmark for speech encoders covering a wide range of downstream speech tasks across domains such as recognition, detection, semantics, speaker, and paralinguistics, where each task is finetuned separately with a frozen encoder.
|
| 73 |
|
| 74 |
MERaLiON-SpeechEncoder-2 is competitive to state-of-the-art, improving slightly against our own v1 model on speaker and paralinguistic tasks.
|
| 75 |
|
|
@@ -77,16 +77,16 @@ MERaLiON-SpeechEncoder-2 is competitive to state-of-the-art, improving slightly
|
|
| 77 |
### Automatic Speech Recognition (ASR)
|
| 78 |
|
| 79 |
<p align="center">
|
| 80 |
-
<img src="overall_wer.svg" width="
|
| 81 |
-
<img src="audiobench_wer.svg" width="
|
| 82 |
-
<img src="fleurs_wer.svg" width="
|
| 83 |
</p>
|
| 84 |
|
| 85 |
-
Leveraging on the multilingual capabilities of MERaLiON-SpeechEncoder-2, we further finetuned the model for on supervised speech data to produce a lightweight MERaLiON-SpeechEncoder-2-ASR-CTC, which is competitive to models many times its size in transcribing the target languages, while offering much faster inference speeds. It outperforms the popular Whisper large v3 across most languages in [Audiobench](https://huggingface.co/spaces/MERaLiON/AudioBench-Leaderboard) and maintains close
|
| 86 |
|
| 87 |
-
##
|
| 88 |
|
| 89 |
-
The
|
| 90 |
|
| 91 |
```python
|
| 92 |
import torch
|
|
@@ -132,9 +132,9 @@ with torch.no_grad():
|
|
| 132 |
output_hidden_states=True)
|
| 133 |
```
|
| 134 |
|
| 135 |
-
##
|
| 136 |
|
| 137 |
-
Speech encoders are normally used in finetuning setups to provide the frontend to downstream speech applications. We provide an example below of an ASR finetuning setup with Huggingface. Please refer to this [blog](https://huggingface.co/blog/fine-tune-w2v2-bert) for the full ASR finetuning recipe
|
| 138 |
|
| 139 |
```python
|
| 140 |
import torch
|
|
@@ -207,177 +207,25 @@ model = AutoModelForCTC.from_pretrained(
|
|
| 207 |
model = model.to(device)
|
| 208 |
```
|
| 209 |
|
|
|
|
| 210 |
|
|
|
|
| 211 |
|
| 212 |
-
|
| 213 |
|
| 214 |
-
<!-- Provide the basic links for the model. -->
|
| 215 |
|
| 216 |
-
|
| 217 |
-
- **Paper [optional]:** [More Information Needed]
|
| 218 |
-
- **Demo [optional]:** [More Information Needed]
|
| 219 |
|
| 220 |
-
|
| 221 |
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
[More Information Needed]
|
| 235 |
-
|
| 236 |
-
### Out-of-Scope Use
|
| 237 |
-
|
| 238 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 239 |
-
|
| 240 |
-
[More Information Needed]
|
| 241 |
-
|
| 242 |
-
## Bias, Risks, and Limitations
|
| 243 |
-
|
| 244 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 245 |
-
|
| 246 |
-
[More Information Needed]
|
| 247 |
-
|
| 248 |
-
### Recommendations
|
| 249 |
-
|
| 250 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 251 |
-
|
| 252 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 253 |
-
|
| 254 |
-
## How to Get Started with the Model
|
| 255 |
-
|
| 256 |
-
Use the code below to get started with the model.
|
| 257 |
-
|
| 258 |
-
[More Information Needed]
|
| 259 |
-
|
| 260 |
-
## Training Details
|
| 261 |
-
|
| 262 |
-
### Training Data
|
| 263 |
-
|
| 264 |
-
<!-- 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. -->
|
| 265 |
-
|
| 266 |
-
[More Information Needed]
|
| 267 |
-
|
| 268 |
-
### Training Procedure
|
| 269 |
-
|
| 270 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 271 |
-
|
| 272 |
-
#### Preprocessing [optional]
|
| 273 |
-
|
| 274 |
-
[More Information Needed]
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
#### Training Hyperparameters
|
| 278 |
-
|
| 279 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 280 |
-
|
| 281 |
-
#### Speeds, Sizes, Times [optional]
|
| 282 |
-
|
| 283 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 284 |
-
|
| 285 |
-
[More Information Needed]
|
| 286 |
-
|
| 287 |
-
## Evaluation
|
| 288 |
-
|
| 289 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 290 |
-
|
| 291 |
-
### Testing Data, Factors & Metrics
|
| 292 |
-
|
| 293 |
-
#### Testing Data
|
| 294 |
-
|
| 295 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 296 |
-
|
| 297 |
-
[More Information Needed]
|
| 298 |
-
|
| 299 |
-
#### Factors
|
| 300 |
-
|
| 301 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 302 |
-
|
| 303 |
-
[More Information Needed]
|
| 304 |
-
|
| 305 |
-
#### Metrics
|
| 306 |
-
|
| 307 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 308 |
-
|
| 309 |
-
[More Information Needed]
|
| 310 |
-
|
| 311 |
-
### Results
|
| 312 |
-
|
| 313 |
-
[More Information Needed]
|
| 314 |
-
|
| 315 |
-
#### Summary
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
## Model Examination [optional]
|
| 320 |
-
|
| 321 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 322 |
-
|
| 323 |
-
[More Information Needed]
|
| 324 |
-
|
| 325 |
-
## Environmental Impact
|
| 326 |
-
|
| 327 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 328 |
-
|
| 329 |
-
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).
|
| 330 |
-
|
| 331 |
-
- **Hardware Type:** [More Information Needed]
|
| 332 |
-
- **Hours used:** [More Information Needed]
|
| 333 |
-
- **Cloud Provider:** [More Information Needed]
|
| 334 |
-
- **Compute Region:** [More Information Needed]
|
| 335 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 336 |
-
|
| 337 |
-
## Technical Specifications [optional]
|
| 338 |
-
|
| 339 |
-
### Model Architecture and Objective
|
| 340 |
-
|
| 341 |
-
[More Information Needed]
|
| 342 |
-
|
| 343 |
-
### Compute Infrastructure
|
| 344 |
-
|
| 345 |
-
[More Information Needed]
|
| 346 |
-
|
| 347 |
-
#### Hardware
|
| 348 |
-
|
| 349 |
-
[More Information Needed]
|
| 350 |
-
|
| 351 |
-
#### Software
|
| 352 |
-
|
| 353 |
-
[More Information Needed]
|
| 354 |
-
|
| 355 |
-
## Citation [optional]
|
| 356 |
-
|
| 357 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 358 |
-
|
| 359 |
-
**BibTeX:**
|
| 360 |
-
|
| 361 |
-
[More Information Needed]
|
| 362 |
-
|
| 363 |
-
**APA:**
|
| 364 |
-
|
| 365 |
-
[More Information Needed]
|
| 366 |
-
|
| 367 |
-
## Glossary [optional]
|
| 368 |
-
|
| 369 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 370 |
-
|
| 371 |
-
[More Information Needed]
|
| 372 |
-
|
| 373 |
-
## More Information [optional]
|
| 374 |
-
|
| 375 |
-
[More Information Needed]
|
| 376 |
-
|
| 377 |
-
## Model Card Authors [optional]
|
| 378 |
-
|
| 379 |
-
[More Information Needed]
|
| 380 |
-
|
| 381 |
-
## Model Card Contact
|
| 382 |
-
|
| 383 |
-
[More Information Needed]
|
|
|
|
| 69 |
| MERaLiON-SpeechEncoder-v1 | 82.62 | 3.14 | 4.16 | 97.63 | 0.0590 | 91.09 | 5.18 | 5.06 | 68.02 | 98.60 | 88.99 / 23.89 |
|
| 70 |
| MERaLiON-SpeechEncoder-2 | 82.72 | 3.40 | 4.96 | 97.57 | 0.0575 | 88.96 | 3.93 | 3.90 | 68.80 | 98.95 | 89.50 / 23.46 |
|
| 71 |
|
| 72 |
+
[SUPERB](https://superbbenchmark.org/) is an English-based benchmark for speech encoders covering a wide range of downstream speech tasks across domains such as recognition, detection, semantics, speaker, and paralinguistics, where each task is finetuned separately with a frozen encoder.
|
| 73 |
|
| 74 |
MERaLiON-SpeechEncoder-2 is competitive to state-of-the-art, improving slightly against our own v1 model on speaker and paralinguistic tasks.
|
| 75 |
|
|
|
|
| 77 |
### Automatic Speech Recognition (ASR)
|
| 78 |
|
| 79 |
<p align="center">
|
| 80 |
+
<img src="overall_wer.svg" width="700"/>
|
| 81 |
+
<img src="audiobench_wer.svg" width="700"/>
|
| 82 |
+
<img src="fleurs_wer.svg" width="700"/>
|
| 83 |
</p>
|
| 84 |
|
| 85 |
+
Leveraging on the multilingual capabilities of MERaLiON-SpeechEncoder-2, we further finetuned the model for on supervised speech data to produce a lightweight MERaLiON-SpeechEncoder-2-ASR-CTC, which is competitive to models many times its size in transcribing the target languages, while offering much faster inference speeds. It outperforms the popular Whisper large v3 across most languages in [Audiobench](https://huggingface.co/spaces/MERaLiON/AudioBench-Leaderboard) and maintains close performance in FLEURS. Our internal benchmarking, shown in the 'Overall ASR Performance', also contains several private datasets in addition to Audiobench and FLEURS.
|
| 86 |
|
| 87 |
+
## Direct Use
|
| 88 |
|
| 89 |
+
The following code snippet can be used to directly obtain latent features i.e. encoded speech by forwarding through the model. Inputs into the model are expected to be 80-dimensional Mel-spectrogram features transformed from 16kHz sampled audio. The AutoFeatureExtractor method can carry out the conversion.
|
| 90 |
|
| 91 |
```python
|
| 92 |
import torch
|
|
|
|
| 132 |
output_hidden_states=True)
|
| 133 |
```
|
| 134 |
|
| 135 |
+
## Downstream Use
|
| 136 |
|
| 137 |
+
Speech encoders are normally used in finetuning setups to provide the frontend to downstream speech applications. We provide an example below of an ASR finetuning setup with Huggingface. Please refer to this [blog](https://huggingface.co/blog/fine-tune-w2v2-bert) for the full ASR finetuning recipe using Huggingface Trainer. Alternatively, the Huggingface model can be loaded to any other frameworks such as Pytorch or ESPnet for custom finetuning loops.
|
| 138 |
|
| 139 |
```python
|
| 140 |
import torch
|
|
|
|
| 207 |
model = model.to(device)
|
| 208 |
```
|
| 209 |
|
| 210 |
+
### Compute and Infrastructure
|
| 211 |
|
| 212 |
+
MERaLiON-SpeechEncoder-2 was trained on the [**ASPIRE 2A+**](https://help.nscc.sg/aspire2aplus/about/) Supercomputer Cluster, provided by [**National Supercomputing Centre (NSCC)**](https://www.nscc.sg/), Singapore.
|
| 213 |
|
| 214 |
+
MERaLiON-SpeechEncoder-2 was trained with 64 H100 GPUs across 8 nodes for collectively around 3.5 million steps. Training time took approximately 15 days.
|
| 215 |
|
|
|
|
| 216 |
|
| 217 |
+
## Citation
|
|
|
|
|
|
|
| 218 |
|
| 219 |
+
If you find our work useful, please cite our technical report:
|
| 220 |
|
| 221 |
+
```
|
| 222 |
+
@misc{huzaifah2024speechfoundationmodelsingapore,
|
| 223 |
+
title={MERaLiON-SpeechEncoder: Towards a Speech Foundation Model for Singapore and Beyond},
|
| 224 |
+
author={{MERaLiON Team}},
|
| 225 |
+
year={2024},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