Update README.md
Browse files
README.md
CHANGED
@@ -40,6 +40,15 @@ This model can be used in various application areas, including
|
|
40 |
- Dictation functions in word processing programs
|
41 |
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
### Training data
|
44 |
The training data for this model includes a large amount of spoken German from various sources. The data was carefully selected and processed to optimize recognition performance.
|
45 |
|
@@ -52,4 +61,48 @@ The training of the model was performed with the following hyperparameters
|
|
52 |
- Learning rate: 1e-5
|
53 |
- Data augmentation: No
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
Model author: [Florian Zimmermeister](https://huggingface.co/flozi00)
|
|
|
40 |
- Dictation functions in word processing programs
|
41 |
|
42 |
|
43 |
+
## Model family
|
44 |
+
|
45 |
+
| Model | Parameters | link |
|
46 |
+
|----------------------------------|------------|--------------------------------------------------------------|
|
47 |
+
| Whisper large v3 german | 1.54B | [link](https://huggingface.co/primeline/whisper-large-v3-german) |
|
48 |
+
| Distil-whisper large v3 german | 756M | [link](https://huggingface.co/primeline/distil-whisper-large-v3-german) |
|
49 |
+
| tiny whisper | 37.8M | [link](https://huggingface.co/primeline/whisper-tiny-german) |
|
50 |
+
|
51 |
+
|
52 |
### Training data
|
53 |
The training data for this model includes a large amount of spoken German from various sources. The data was carefully selected and processed to optimize recognition performance.
|
54 |
|
|
|
61 |
- Learning rate: 1e-5
|
62 |
- Data augmentation: No
|
63 |
|
64 |
+
|
65 |
+
### How to use
|
66 |
+
|
67 |
+
```python
|
68 |
+
import torch
|
69 |
+
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
|
70 |
+
from datasets import load_dataset
|
71 |
+
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
72 |
+
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
73 |
+
model_id = "primeline/whisper-large-v3-german"
|
74 |
+
model = AutoModelForSpeechSeq2Seq.from_pretrained(
|
75 |
+
model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True
|
76 |
+
)
|
77 |
+
model.to(device)
|
78 |
+
processor = AutoProcessor.from_pretrained(model_id)
|
79 |
+
pipe = pipeline(
|
80 |
+
"automatic-speech-recognition",
|
81 |
+
model=model,
|
82 |
+
tokenizer=processor.tokenizer,
|
83 |
+
feature_extractor=processor.feature_extractor,
|
84 |
+
max_new_tokens=128,
|
85 |
+
chunk_length_s=30,
|
86 |
+
batch_size=16,
|
87 |
+
return_timestamps=True,
|
88 |
+
torch_dtype=torch_dtype,
|
89 |
+
device=device,
|
90 |
+
)
|
91 |
+
dataset = load_dataset("distil-whisper/librispeech_long", "clean", split="validation")
|
92 |
+
sample = dataset[0]["audio"]
|
93 |
+
result = pipe(sample)
|
94 |
+
print(result["text"])
|
95 |
+
```
|
96 |
+
|
97 |
+
|
98 |
+
## [About us](https://primeline-ai.com/en/)
|
99 |
+
|
100 |
+
[![primeline AI](https://primeline-ai.com/wp-content/uploads/2024/02/pl_ai_bildwortmarke_original.svg)](https://primeline-ai.com/en/)
|
101 |
+
|
102 |
+
|
103 |
+
Your partner for AI infrastructure in Germany <br>
|
104 |
+
Experience the powerful AI infrastructure that drives your ambitions in Deep Learning, Machine Learning & High-Performance Computing. Optimized for AI training and inference.
|
105 |
+
|
106 |
+
|
107 |
+
|
108 |
Model author: [Florian Zimmermeister](https://huggingface.co/flozi00)
|