Update README.md
Browse files
README.md
CHANGED
@@ -1,199 +1,129 @@
|
|
1 |
---
|
|
|
|
|
|
|
2 |
library_name: transformers
|
3 |
-
|
4 |
---
|
5 |
|
6 |
-
|
|
|
7 |
|
8 |
-
|
9 |
|
10 |
|
|
|
|
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
|
13 |
|
14 |
-
### Model Description
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
-
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
|
28 |
-
|
29 |
|
30 |
-
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
|
36 |
-
|
37 |
|
38 |
-
|
39 |
|
40 |
-
### Direct Use
|
41 |
|
42 |
-
|
|
|
43 |
|
44 |
-
|
|
|
|
|
|
|
|
|
45 |
|
46 |
-
### Downstream Use [optional]
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
-
### Out-of-Scope Use
|
53 |
|
54 |
-
|
55 |
|
56 |
-
[
|
57 |
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
|
60 |
-
|
61 |
|
62 |
-
|
63 |
|
64 |
-
|
65 |
|
66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
|
68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
|
70 |
-
|
71 |
|
72 |
-
|
73 |
|
74 |
-
|
|
|
75 |
|
76 |
-
|
77 |
|
78 |
-
|
79 |
|
80 |
-
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
### Training Procedure
|
85 |
-
|
86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
-
|
88 |
-
#### Preprocessing [optional]
|
89 |
-
|
90 |
-
[More Information Needed]
|
91 |
-
|
92 |
-
|
93 |
-
#### Training Hyperparameters
|
94 |
-
|
95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
-
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
-
|
99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
-
|
101 |
-
[More Information Needed]
|
102 |
-
|
103 |
-
## Evaluation
|
104 |
-
|
105 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
106 |
-
|
107 |
-
### Testing Data, Factors & Metrics
|
108 |
-
|
109 |
-
#### Testing Data
|
110 |
-
|
111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
112 |
-
|
113 |
-
[More Information Needed]
|
114 |
-
|
115 |
-
#### Factors
|
116 |
-
|
117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
118 |
-
|
119 |
-
[More Information Needed]
|
120 |
-
|
121 |
-
#### Metrics
|
122 |
-
|
123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
124 |
-
|
125 |
-
[More Information Needed]
|
126 |
-
|
127 |
-
### Results
|
128 |
-
|
129 |
-
[More Information Needed]
|
130 |
-
|
131 |
-
#### Summary
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
## Model Examination [optional]
|
136 |
-
|
137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
138 |
-
|
139 |
-
[More Information Needed]
|
140 |
-
|
141 |
-
## Environmental Impact
|
142 |
-
|
143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
144 |
-
|
145 |
-
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).
|
146 |
-
|
147 |
-
- **Hardware Type:** [More Information Needed]
|
148 |
-
- **Hours used:** [More Information Needed]
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
-
|
153 |
-
## Technical Specifications [optional]
|
154 |
-
|
155 |
-
### Model Architecture and Objective
|
156 |
-
|
157 |
-
[More Information Needed]
|
158 |
-
|
159 |
-
### Compute Infrastructure
|
160 |
-
|
161 |
-
[More Information Needed]
|
162 |
-
|
163 |
-
#### Hardware
|
164 |
-
|
165 |
-
[More Information Needed]
|
166 |
-
|
167 |
-
#### Software
|
168 |
-
|
169 |
-
[More Information Needed]
|
170 |
-
|
171 |
-
## Citation [optional]
|
172 |
-
|
173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
174 |
-
|
175 |
-
**BibTeX:**
|
176 |
-
|
177 |
-
[More Information Needed]
|
178 |
-
|
179 |
-
**APA:**
|
180 |
-
|
181 |
-
[More Information Needed]
|
182 |
-
|
183 |
-
## Glossary [optional]
|
184 |
-
|
185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
-
|
187 |
-
[More Information Needed]
|
188 |
-
|
189 |
-
## More Information [optional]
|
190 |
-
|
191 |
-
[More Information Needed]
|
192 |
-
|
193 |
-
## Model Card Authors [optional]
|
194 |
-
|
195 |
-
[More Information Needed]
|
196 |
-
|
197 |
-
## Model Card Contact
|
198 |
-
|
199 |
-
[More Information Needed]
|
|
|
1 |
---
|
2 |
+
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- de
|
5 |
library_name: transformers
|
6 |
+
pipeline_tag: automatic-speech-recognition
|
7 |
---
|
8 |
|
9 |
+
### Summary
|
10 |
+
This model card provides information about a model based on the tiny whisper architecture that has been trained for speech recognition in German.
|
11 |
|
12 |
+
Whisper is a powerful speech recognition platform developed by OpenAI.
|
13 |
|
14 |
|
15 |
+
### Applications
|
16 |
+
This model can be used in various application areas, including
|
17 |
|
18 |
+
- Transcription of spoken German language
|
19 |
+
- Voice commands and voice control
|
20 |
+
- Automatic subtitling for German videos
|
21 |
+
- Voice-based search queries in German
|
22 |
+
- Dictation functions in word processing programs
|
23 |
|
|
|
24 |
|
25 |
+
## Evaluations - Word error rate
|
26 |
|
27 |
+
+-----------------------------------------+-------+-----------+----------------------------+---------------------+
|
28 |
+
| Model | All | Tuda-De | multilingual librispeech | common_voice_19_0 |
|
29 |
+
+=========================================+=======+===========+============================+=====================+
|
30 |
+
| openai-whisper-large-v3 | 3.28 | 7.86 | 2.85 | 3.46 |
|
31 |
+
+-----------------------------------------+-------+-----------+----------------------------+---------------------+
|
32 |
+
| openai-whisper-large-v3-turbo | 3.64 | 8.20 | 3.19 | 3.85 |
|
33 |
+
+-----------------------------------------+-------+-----------+----------------------------+---------------------+
|
34 |
+
| openai-whisper-medium | 5.49 | 11.13 | 5.04 | 5.53 |
|
35 |
+
+-----------------------------------------+-------+-----------+----------------------------+---------------------+
|
36 |
+
| primeline-whisper-tiny-german-1224 | 6.26 | 9.62 | 4.97 | 8.46 |
|
37 |
+
+-----------------------------------------+-------+-----------+----------------------------+---------------------+
|
38 |
+
| openai-whisper-small | 9.54 | 15.94 | 8.77 | 10.15 |
|
39 |
+
+-----------------------------------------+-------+-----------+----------------------------+---------------------+
|
40 |
+
| openai-whisper-base | 18.75 | 33.58 | 17.15 | 19.74 |
|
41 |
+
+-----------------------------------------+-------+-----------+----------------------------+---------------------+
|
42 |
+
| openai-whisper-tiny | 28.80 | 47.33 | 26.47 | 30.76 |
|
43 |
+
+-----------------------------------------+-------+-----------+----------------------------+---------------------+
|
44 |
|
45 |
+
The results are calculated in December 2024 and may change over the time with updates to the eval corpus.
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
+
For always the newest results please check the code and dataset page.
|
48 |
|
49 |
+
The data and code for evaluations are available [here](https://huggingface.co/datasets/flozi00/asr-german-mixed-evals)
|
50 |
|
51 |
+
### Training data
|
52 |
+
The training data for this model includes a large amount of spoken German from various sources.
|
|
|
53 |
|
54 |
+
The data was carefully selected and processed to optimize recognition performance.
|
55 |
|
56 |
+
The dataset size is about 6.000 hours of public, proprietary and synthetic data.
|
57 |
|
|
|
58 |
|
59 |
+
### Training process
|
60 |
+
The training of the model was performed with the following hyperparameters
|
61 |
|
62 |
+
- Batch size: 32768
|
63 |
+
- Epochs: 48
|
64 |
+
- Learning rate: 1e-4
|
65 |
+
- Data augmentation: No
|
66 |
+
- Optimizer: [Ademamix](https://arxiv.org/abs/2409.03137)
|
67 |
|
|
|
68 |
|
69 |
+
### How to use
|
70 |
|
71 |
+
```python
|
72 |
+
import torch
|
73 |
+
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
|
74 |
+
from datasets import load_dataset
|
75 |
+
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
76 |
+
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
77 |
+
model_id = "primeline/whisper-tiny-german-1224"
|
78 |
+
model = AutoModelForSpeechSeq2Seq.from_pretrained(
|
79 |
+
model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True
|
80 |
+
)
|
81 |
+
model.to(device)
|
82 |
+
processor = AutoProcessor.from_pretrained(model_id)
|
83 |
+
pipe = pipeline(
|
84 |
+
"automatic-speech-recognition",
|
85 |
+
model=model,
|
86 |
+
tokenizer=processor.tokenizer,
|
87 |
+
feature_extractor=processor.feature_extractor,
|
88 |
+
max_new_tokens=128,
|
89 |
+
chunk_length_s=30,
|
90 |
+
batch_size=16,
|
91 |
+
return_timestamps=True,
|
92 |
+
torch_dtype=torch_dtype,
|
93 |
+
device=device,
|
94 |
+
)
|
95 |
+
dataset = load_dataset("distil-whisper/librispeech_long", "clean", split="validation")
|
96 |
+
sample = dataset[0]["audio"]
|
97 |
+
result = pipe(sample)
|
98 |
+
print(result["text"])
|
99 |
+
```
|
100 |
|
|
|
101 |
|
102 |
+
## [About us](https://primeline-ai.com/en/)
|
103 |
|
104 |
+
[![primeline AI](https://primeline-ai.com/wp-content/uploads/2024/02/pl_ai_bildwortmarke_original.svg)](https://primeline-ai.com/en/)
|
105 |
|
|
|
106 |
|
107 |
+
Your partner for AI infrastructure in Germany
|
108 |
|
109 |
+
Experience the powerful AI infrastructure that drives your ambitions in Deep Learning, Machine Learning & High-Performance Computing.
|
110 |
|
111 |
+
Optimized for AI training and inference.
|
112 |
|
|
|
113 |
|
|
|
114 |
|
115 |
+
Model author: [Florian Zimmermeister](https://huggingface.co/flozi00)
|
116 |
|
117 |
+
**Disclaimer**
|
118 |
|
119 |
+
```
|
120 |
+
This model is not a product of the primeLine Group.
|
121 |
|
122 |
+
It represents research conducted by [Florian Zimmermeister](https://huggingface.co/flozi00), with computing power sponsored by primeLine.
|
123 |
|
124 |
+
The model is published under this account by primeLine, but it is not a commercial product of primeLine Solutions GmbH.
|
125 |
|
126 |
+
Please be aware that while we have tested and developed this model to the best of our abilities, errors may still occur.
|
127 |
|
128 |
+
Use of this model is at your own risk. We do not accept liability for any incorrect outputs generated by this model.
|
129 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|