cociweb
commited on
Commit
•
a7dfa95
1
Parent(s):
d6ba077
Quantizated models added
Browse files- fp16/README.md +54 -0
- fp16/config.json +231 -0
- fp16/hash.json +10 -0
- fp16/model.bin +3 -0
- fp16/preprocessor_config.json +14 -0
- fp16/tokenizer_config.json +0 -0
- vocabulary.json → fp16/vocabulary.json +0 -0
- vocabulary.txt → fp16/vocabulary.txt +0 -0
- fp32/README.md +88 -0
- fp32/config.json +154 -0
- hash.json → fp32/hash.json +0 -0
- model.bin → fp32/model.bin +0 -0
- fp32/preprocessor_config.json +14 -0
- fp32/tokenizer_config.json +0 -0
- fp32/vocabulary.json +0 -0
- fp32/vocabulary.txt +0 -0
- int8/README.md +53 -0
- int8/config.json +231 -0
- int8/hash.json +10 -0
- int8/model.bin +3 -0
- int8/preprocessor_config.json +14 -0
- int8/tokenizer_config.json +0 -0
- int8/vocabulary.json +0 -0
- int8/vocabulary.txt +0 -0
fp16/README.md
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- hu
|
4 |
+
tags:
|
5 |
+
- audio
|
6 |
+
- automatic-speech-recognition
|
7 |
+
datasets:
|
8 |
+
- mozilla-foundation/common_voice_16_0
|
9 |
+
base_model: openai/whisper-base
|
10 |
+
license: mit
|
11 |
+
library_name: ctranslate2
|
12 |
+
---
|
13 |
+
|
14 |
+
# Whisper base model for CTranslate2
|
15 |
+
|
16 |
+
This repository contains the conversion of a fine-tuned version of [openai/whisper-base](https://huggingface.co/openai/whisper-base) to the [CTranslate2](https://github.com/OpenNMT/CTranslate2) model format. Fine-tune is made by [@sarpba](https://huggingface.co/sarpba) on the Common Voice 16 dataset of Mozilla Foundation.
|
17 |
+
|
18 |
+
This model can be used in CTranslate2 or projects based on CTranslate2 such as [faster-whisper](https://github.com/systran/faster-whisper).
|
19 |
+
|
20 |
+
## Example
|
21 |
+
|
22 |
+
```python
|
23 |
+
from faster_whisper import WhisperModel
|
24 |
+
|
25 |
+
model = WhisperModel("base")
|
26 |
+
|
27 |
+
segments, info = model.transcribe("audio.mp3")
|
28 |
+
for segment in segments:
|
29 |
+
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
|
30 |
+
```
|
31 |
+
|
32 |
+
## Conversion details
|
33 |
+
|
34 |
+
The original model was converted with the following command:
|
35 |
+
|
36 |
+
```
|
37 |
+
ct2-transformers-converter --model Hungarians/whisper-base-cv16-hu-v2 --output_dir faster-whisper-base-cv16-v2-fp16.hu \
|
38 |
+
--quantization fp16 --low_cpu_mem_usage --copy_files tokenizer_config.json preprocessor_config.json
|
39 |
+
```
|
40 |
+
|
41 |
+
## HASH calculation
|
42 |
+
|
43 |
+
Hash calculation is executed with md5hash in the directory of the model with:
|
44 |
+
|
45 |
+
```
|
46 |
+
find ./ -maxdepth 1 -type f -not -path '*/\.*' -exec md5sum {} \; | tr -d ' ' | jq -R 'split("./") | {(.[1]): (.[0])}' | jq -s 'add' > hash.json
|
47 |
+
|
48 |
+
```
|
49 |
+
|
50 |
+
Note that the model weights are saved in FP16. This type can be changed when the model is loaded using the [`compute_type` option in CTranslate2](https://opennmt.net/CTranslate2/quantization.html).
|
51 |
+
|
52 |
+
## More information
|
53 |
+
|
54 |
+
**For more information about the original model, see its [model card](https://huggingface.co/Hungarians/whisper-base-cv16-hu-v2).**
|
fp16/config.json
ADDED
@@ -0,0 +1,231 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
+
[
|
20 |
+
5,
|
21 |
+
1
|
22 |
+
],
|
23 |
+
[
|
24 |
+
5,
|
25 |
+
2
|
26 |
+
],
|
27 |
+
[
|
28 |
+
5,
|
29 |
+
4
|
30 |
+
],
|
31 |
+
[
|
32 |
+
5,
|
33 |
+
6
|
34 |
+
]
|
35 |
+
],
|
36 |
+
"lang_ids": [
|
37 |
+
50259,
|
38 |
+
50260,
|
39 |
+
50261,
|
40 |
+
50262,
|
41 |
+
50263,
|
42 |
+
50264,
|
43 |
+
50265,
|
44 |
+
50266,
|
45 |
+
50267,
|
46 |
+
50268,
|
47 |
+
50269,
|
48 |
+
50270,
|
49 |
+
50271,
|
50 |
+
50272,
|
51 |
+
50273,
|
52 |
+
50274,
|
53 |
+
50275,
|
54 |
+
50276,
|
55 |
+
50277,
|
56 |
+
50278,
|
57 |
+
50279,
|
58 |
+
50280,
|
59 |
+
50281,
|
60 |
+
50282,
|
61 |
+
50283,
|
62 |
+
50284,
|
63 |
+
50285,
|
64 |
+
50286,
|
65 |
+
50287,
|
66 |
+
50288,
|
67 |
+
50289,
|
68 |
+
50290,
|
69 |
+
50291,
|
70 |
+
50292,
|
71 |
+
50293,
|
72 |
+
50294,
|
73 |
+
50295,
|
74 |
+
50296,
|
75 |
+
50297,
|
76 |
+
50298,
|
77 |
+
50299,
|
78 |
+
50300,
|
79 |
+
50301,
|
80 |
+
50302,
|
81 |
+
50303,
|
82 |
+
50304,
|
83 |
+
50305,
|
84 |
+
50306,
|
85 |
+
50307,
|
86 |
+
50308,
|
87 |
+
50309,
|
88 |
+
50310,
|
89 |
+
50311,
|
90 |
+
50312,
|
91 |
+
50313,
|
92 |
+
50314,
|
93 |
+
50315,
|
94 |
+
50316,
|
95 |
+
50317,
|
96 |
+
50318,
|
97 |
+
50319,
|
98 |
+
50320,
|
99 |
+
50321,
|
100 |
+
50322,
|
101 |
+
50323,
|
102 |
+
50324,
|
103 |
+
50325,
|
104 |
+
50326,
|
105 |
+
50327,
|
106 |
+
50328,
|
107 |
+
50329,
|
108 |
+
50330,
|
109 |
+
50331,
|
110 |
+
50332,
|
111 |
+
50333,
|
112 |
+
50334,
|
113 |
+
50335,
|
114 |
+
50336,
|
115 |
+
50337,
|
116 |
+
50338,
|
117 |
+
50339,
|
118 |
+
50340,
|
119 |
+
50341,
|
120 |
+
50342,
|
121 |
+
50343,
|
122 |
+
50344,
|
123 |
+
50345,
|
124 |
+
50346,
|
125 |
+
50347,
|
126 |
+
50348,
|
127 |
+
50349,
|
128 |
+
50350,
|
129 |
+
50351,
|
130 |
+
50352,
|
131 |
+
50353,
|
132 |
+
50354,
|
133 |
+
50355,
|
134 |
+
50356,
|
135 |
+
50357
|
136 |
+
],
|
137 |
+
"suppress_ids": [
|
138 |
+
1,
|
139 |
+
2,
|
140 |
+
7,
|
141 |
+
8,
|
142 |
+
9,
|
143 |
+
10,
|
144 |
+
14,
|
145 |
+
25,
|
146 |
+
26,
|
147 |
+
27,
|
148 |
+
28,
|
149 |
+
29,
|
150 |
+
31,
|
151 |
+
58,
|
152 |
+
59,
|
153 |
+
60,
|
154 |
+
61,
|
155 |
+
62,
|
156 |
+
63,
|
157 |
+
90,
|
158 |
+
91,
|
159 |
+
92,
|
160 |
+
93,
|
161 |
+
359,
|
162 |
+
503,
|
163 |
+
522,
|
164 |
+
542,
|
165 |
+
873,
|
166 |
+
893,
|
167 |
+
902,
|
168 |
+
918,
|
169 |
+
922,
|
170 |
+
931,
|
171 |
+
1350,
|
172 |
+
1853,
|
173 |
+
1982,
|
174 |
+
2460,
|
175 |
+
2627,
|
176 |
+
3246,
|
177 |
+
3253,
|
178 |
+
3268,
|
179 |
+
3536,
|
180 |
+
3846,
|
181 |
+
3961,
|
182 |
+
4183,
|
183 |
+
4667,
|
184 |
+
6585,
|
185 |
+
6647,
|
186 |
+
7273,
|
187 |
+
9061,
|
188 |
+
9383,
|
189 |
+
10428,
|
190 |
+
10929,
|
191 |
+
11938,
|
192 |
+
12033,
|
193 |
+
12331,
|
194 |
+
12562,
|
195 |
+
13793,
|
196 |
+
14157,
|
197 |
+
14635,
|
198 |
+
15265,
|
199 |
+
15618,
|
200 |
+
16553,
|
201 |
+
16604,
|
202 |
+
18362,
|
203 |
+
18956,
|
204 |
+
20075,
|
205 |
+
21675,
|
206 |
+
22520,
|
207 |
+
26130,
|
208 |
+
26161,
|
209 |
+
26435,
|
210 |
+
28279,
|
211 |
+
29464,
|
212 |
+
31650,
|
213 |
+
32302,
|
214 |
+
32470,
|
215 |
+
36865,
|
216 |
+
42863,
|
217 |
+
47425,
|
218 |
+
49870,
|
219 |
+
50254,
|
220 |
+
50258,
|
221 |
+
50358,
|
222 |
+
50359,
|
223 |
+
50360,
|
224 |
+
50361,
|
225 |
+
50362
|
226 |
+
],
|
227 |
+
"suppress_ids_begin": [
|
228 |
+
220,
|
229 |
+
50257
|
230 |
+
]
|
231 |
+
}
|
fp16/hash.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"README.md": "59f14159d6a5e2e8cb61efb0e1d22bab",
|
3 |
+
"config.json": "ece6185c2317573e8f550b44ee557df5",
|
4 |
+
"model.bin": "80b54f9f010d2c322d32ca585e49e2c0",
|
5 |
+
"preprocessor_config.json": "15d1d7ee1cc6801b71f8ab68966aed86",
|
6 |
+
"tokenizer_config.json": "938ef60d4aca3c286e99d583410da1f4",
|
7 |
+
"vocabulary.json": "aebe7623626c8f3f61cc5208ff29c348",
|
8 |
+
"vocabulary.txt": "980d7011195d0c733bd374e31708717f",
|
9 |
+
"hash.json": "d41d8cd98f00b204e9800998ecf8427e"
|
10 |
+
}
|
fp16/model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f7139d61de28220c9ea0833a1c4adc37009f66bb6b5c84d193b8ef77b276b982
|
3 |
+
size 145217607
|
fp16/preprocessor_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"chunk_length": 30,
|
3 |
+
"feature_extractor_type": "WhisperFeatureExtractor",
|
4 |
+
"feature_size": 80,
|
5 |
+
"hop_length": 160,
|
6 |
+
"n_fft": 400,
|
7 |
+
"n_samples": 480000,
|
8 |
+
"nb_max_frames": 3000,
|
9 |
+
"padding_side": "right",
|
10 |
+
"padding_value": 0.0,
|
11 |
+
"processor_class": "WhisperProcessor",
|
12 |
+
"return_attention_mask": false,
|
13 |
+
"sampling_rate": 16000
|
14 |
+
}
|
fp16/tokenizer_config.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
vocabulary.json → fp16/vocabulary.json
RENAMED
File without changes
|
vocabulary.txt → fp16/vocabulary.txt
RENAMED
File without changes
|
fp32/README.md
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
datasets:
|
3 |
+
- mozilla-foundation/common_voice_16_0
|
4 |
+
language:
|
5 |
+
- hu
|
6 |
+
widget:
|
7 |
+
- example_title: Sample 1
|
8 |
+
src: >-
|
9 |
+
https://huggingface.co/datasets/Hungarians/samples/resolve/main/Sample1.flac
|
10 |
+
- example_title: Sample 2
|
11 |
+
src: >-
|
12 |
+
https://huggingface.co/datasets/Hungarians/samples/resolve/main/Sample2.flac
|
13 |
+
license: apache-2.0
|
14 |
+
base_model: openai/whisper-base
|
15 |
+
tags:
|
16 |
+
- generated_from_trainer
|
17 |
+
metrics:
|
18 |
+
- wer
|
19 |
+
model-index:
|
20 |
+
- name: Whisper Base Hu v2
|
21 |
+
results: []
|
22 |
+
---
|
23 |
+
|
24 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
25 |
+
should probably proofread and complete it, then remove this comment. -->
|
26 |
+
|
27 |
+
# Whisper Base Hu v2
|
28 |
+
|
29 |
+
This model is a fine-tuned version of [openai/whisper-base](https://huggingface.co/openai/whisper-base) on the Common Voice 16.0 dataset.
|
30 |
+
It achieves the following results on the evaluation set:
|
31 |
+
- Loss: 0.1599
|
32 |
+
- Wer Ortho: 12.6641
|
33 |
+
- Wer: 11.4171
|
34 |
+
|
35 |
+
## Model description
|
36 |
+
|
37 |
+
More information needed
|
38 |
+
|
39 |
+
## Intended uses & limitations
|
40 |
+
|
41 |
+
More information needed
|
42 |
+
|
43 |
+
## Training and evaluation data
|
44 |
+
|
45 |
+
More information needed
|
46 |
+
|
47 |
+
## Training procedure
|
48 |
+
|
49 |
+
### Training hyperparameters
|
50 |
+
|
51 |
+
The following hyperparameters were used during training:
|
52 |
+
- learning_rate: 2.75e-05
|
53 |
+
- train_batch_size: 16
|
54 |
+
- eval_batch_size: 16
|
55 |
+
- seed: 42
|
56 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
57 |
+
- lr_scheduler_type: constant_with_warmup
|
58 |
+
- lr_scheduler_warmup_steps: 500
|
59 |
+
- training_steps: 15000
|
60 |
+
- mixed_precision_training: Native AMP
|
61 |
+
|
62 |
+
### Training results
|
63 |
+
|
64 |
+
| Training Loss | Epoch | Step | Validation Loss | Wer Ortho | Wer |
|
65 |
+
|:-------------:|:-----:|:-----:|:---------------:|:---------:|:-------:|
|
66 |
+
| 0.199 | 0.33 | 1000 | 0.3838 | 36.7548 | 33.5517 |
|
67 |
+
| 0.3037 | 0.67 | 2000 | 0.3131 | 31.2748 | 28.3664 |
|
68 |
+
| 0.221 | 1.0 | 3000 | 0.2546 | 27.1739 | 24.1773 |
|
69 |
+
| 0.1562 | 1.34 | 4000 | 0.2319 | 23.9341 | 21.3341 |
|
70 |
+
| 0.1623 | 1.67 | 5000 | 0.2101 | 21.4079 | 18.9623 |
|
71 |
+
| 0.077 | 2.01 | 6000 | 0.1818 | 18.5415 | 16.2852 |
|
72 |
+
| 0.078 | 2.34 | 7000 | 0.1846 | 17.8339 | 15.7456 |
|
73 |
+
| 0.0818 | 2.68 | 8000 | 0.1712 | 16.4669 | 14.5983 |
|
74 |
+
| 0.0352 | 3.01 | 9000 | 0.1669 | 15.6178 | 14.0676 |
|
75 |
+
| 0.0413 | 3.35 | 10000 | 0.1673 | 14.9464 | 13.4539 |
|
76 |
+
| 0.0454 | 3.68 | 11000 | 0.1649 | 14.5459 | 12.7542 |
|
77 |
+
| 0.0225 | 4.02 | 12000 | 0.1589 | 13.5885 | 12.2087 |
|
78 |
+
| 0.0269 | 4.35 | 13000 | 0.1638 | 14.3864 | 12.8343 |
|
79 |
+
| 0.0299 | 4.69 | 14000 | 0.1621 | 13.0555 | 11.7610 |
|
80 |
+
| 0.0171 | 5.02 | 15000 | 0.1599 | 12.6641 | 11.4171 |
|
81 |
+
|
82 |
+
|
83 |
+
### Framework versions
|
84 |
+
|
85 |
+
- Transformers 4.36.2
|
86 |
+
- Pytorch 2.1.0+cu121
|
87 |
+
- Datasets 2.16.1
|
88 |
+
- Tokenizers 0.15.0
|
fp32/config.json
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "openai/whisper-base",
|
3 |
+
"activation_dropout": 0.0,
|
4 |
+
"activation_function": "gelu",
|
5 |
+
"apply_spec_augment": false,
|
6 |
+
"architectures": [
|
7 |
+
"WhisperForConditionalGeneration"
|
8 |
+
],
|
9 |
+
"attention_dropout": 0.0,
|
10 |
+
"begin_suppress_tokens": [
|
11 |
+
220,
|
12 |
+
50257
|
13 |
+
],
|
14 |
+
"bos_token_id": 50257,
|
15 |
+
"classifier_proj_size": 256,
|
16 |
+
"d_model": 512,
|
17 |
+
"decoder_attention_heads": 8,
|
18 |
+
"decoder_ffn_dim": 2048,
|
19 |
+
"decoder_layerdrop": 0.0,
|
20 |
+
"decoder_layers": 6,
|
21 |
+
"decoder_start_token_id": 50258,
|
22 |
+
"dropout": 0.0,
|
23 |
+
"encoder_attention_heads": 8,
|
24 |
+
"encoder_ffn_dim": 2048,
|
25 |
+
"encoder_layerdrop": 0.0,
|
26 |
+
"encoder_layers": 6,
|
27 |
+
"eos_token_id": 50257,
|
28 |
+
"forced_decoder_ids": [
|
29 |
+
[
|
30 |
+
1,
|
31 |
+
50259
|
32 |
+
],
|
33 |
+
[
|
34 |
+
2,
|
35 |
+
50359
|
36 |
+
],
|
37 |
+
[
|
38 |
+
3,
|
39 |
+
50363
|
40 |
+
]
|
41 |
+
],
|
42 |
+
"init_std": 0.02,
|
43 |
+
"is_encoder_decoder": true,
|
44 |
+
"mask_feature_length": 10,
|
45 |
+
"mask_feature_min_masks": 0,
|
46 |
+
"mask_feature_prob": 0.0,
|
47 |
+
"mask_time_length": 10,
|
48 |
+
"mask_time_min_masks": 2,
|
49 |
+
"mask_time_prob": 0.05,
|
50 |
+
"max_length": 448,
|
51 |
+
"max_source_positions": 1500,
|
52 |
+
"max_target_positions": 448,
|
53 |
+
"median_filter_width": 7,
|
54 |
+
"model_type": "whisper",
|
55 |
+
"num_hidden_layers": 6,
|
56 |
+
"num_mel_bins": 80,
|
57 |
+
"pad_token_id": 50257,
|
58 |
+
"scale_embedding": false,
|
59 |
+
"suppress_tokens": [
|
60 |
+
1,
|
61 |
+
2,
|
62 |
+
7,
|
63 |
+
8,
|
64 |
+
9,
|
65 |
+
10,
|
66 |
+
14,
|
67 |
+
25,
|
68 |
+
26,
|
69 |
+
27,
|
70 |
+
28,
|
71 |
+
29,
|
72 |
+
31,
|
73 |
+
58,
|
74 |
+
59,
|
75 |
+
60,
|
76 |
+
61,
|
77 |
+
62,
|
78 |
+
63,
|
79 |
+
90,
|
80 |
+
91,
|
81 |
+
92,
|
82 |
+
93,
|
83 |
+
359,
|
84 |
+
503,
|
85 |
+
522,
|
86 |
+
542,
|
87 |
+
873,
|
88 |
+
893,
|
89 |
+
902,
|
90 |
+
918,
|
91 |
+
922,
|
92 |
+
931,
|
93 |
+
1350,
|
94 |
+
1853,
|
95 |
+
1982,
|
96 |
+
2460,
|
97 |
+
2627,
|
98 |
+
3246,
|
99 |
+
3253,
|
100 |
+
3268,
|
101 |
+
3536,
|
102 |
+
3846,
|
103 |
+
3961,
|
104 |
+
4183,
|
105 |
+
4667,
|
106 |
+
6585,
|
107 |
+
6647,
|
108 |
+
7273,
|
109 |
+
9061,
|
110 |
+
9383,
|
111 |
+
10428,
|
112 |
+
10929,
|
113 |
+
11938,
|
114 |
+
12033,
|
115 |
+
12331,
|
116 |
+
12562,
|
117 |
+
13793,
|
118 |
+
14157,
|
119 |
+
14635,
|
120 |
+
15265,
|
121 |
+
15618,
|
122 |
+
16553,
|
123 |
+
16604,
|
124 |
+
18362,
|
125 |
+
18956,
|
126 |
+
20075,
|
127 |
+
21675,
|
128 |
+
22520,
|
129 |
+
26130,
|
130 |
+
26161,
|
131 |
+
26435,
|
132 |
+
28279,
|
133 |
+
29464,
|
134 |
+
31650,
|
135 |
+
32302,
|
136 |
+
32470,
|
137 |
+
36865,
|
138 |
+
42863,
|
139 |
+
47425,
|
140 |
+
49870,
|
141 |
+
50254,
|
142 |
+
50258,
|
143 |
+
50358,
|
144 |
+
50359,
|
145 |
+
50360,
|
146 |
+
50361,
|
147 |
+
50362
|
148 |
+
],
|
149 |
+
"torch_dtype": "float32",
|
150 |
+
"transformers_version": "4.36.2",
|
151 |
+
"use_cache": false,
|
152 |
+
"use_weighted_layer_sum": false,
|
153 |
+
"vocab_size": 51865
|
154 |
+
}
|
hash.json → fp32/hash.json
RENAMED
File without changes
|
model.bin → fp32/model.bin
RENAMED
File without changes
|
fp32/preprocessor_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"chunk_length": 30,
|
3 |
+
"feature_extractor_type": "WhisperFeatureExtractor",
|
4 |
+
"feature_size": 80,
|
5 |
+
"hop_length": 160,
|
6 |
+
"n_fft": 400,
|
7 |
+
"n_samples": 480000,
|
8 |
+
"nb_max_frames": 3000,
|
9 |
+
"padding_side": "right",
|
10 |
+
"padding_value": 0.0,
|
11 |
+
"processor_class": "WhisperProcessor",
|
12 |
+
"return_attention_mask": false,
|
13 |
+
"sampling_rate": 16000
|
14 |
+
}
|
fp32/tokenizer_config.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
fp32/vocabulary.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
fp32/vocabulary.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
int8/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- hu
|
4 |
+
tags:
|
5 |
+
- audio
|
6 |
+
- automatic-speech-recognition
|
7 |
+
datasets:
|
8 |
+
- mozilla-foundation/common_voice_16_0
|
9 |
+
base_model: openai/whisper-base
|
10 |
+
license: mit
|
11 |
+
library_name: ctranslate2
|
12 |
+
---
|
13 |
+
|
14 |
+
# Whisper base model for CTranslate2
|
15 |
+
|
16 |
+
This repository contains the conversion of a fine-tuned version of [openai/whisper-base](https://huggingface.co/openai/whisper-base) to the [CTranslate2](https://github.com/OpenNMT/CTranslate2) model format. Fine-tune is made by [@sarpba](https://huggingface.co/sarpba) on the Common Voice 16 dataset of Mozilla Foundation.
|
17 |
+
|
18 |
+
This model can be used in CTranslate2 or projects based on CTranslate2 such as [faster-whisper](https://github.com/systran/faster-whisper).
|
19 |
+
|
20 |
+
## Example
|
21 |
+
|
22 |
+
```python
|
23 |
+
from faster_whisper import WhisperModel
|
24 |
+
|
25 |
+
model = WhisperModel("base")
|
26 |
+
|
27 |
+
segments, info = model.transcribe("audio.mp3")
|
28 |
+
for segment in segments:
|
29 |
+
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
|
30 |
+
```
|
31 |
+
|
32 |
+
## Conversion details
|
33 |
+
|
34 |
+
The original model was converted with the following command:
|
35 |
+
|
36 |
+
```
|
37 |
+
ct2-transformers-converter --model Hungarians/whisper-base-cv16-hu-v2 --output_dir faster-whisper-base-cv16-v2-int8.hu \
|
38 |
+
--quantization int8 --low_cpu_mem_usage --copy_files tokenizer_config.json preprocessor_config.json
|
39 |
+
```
|
40 |
+
|
41 |
+
Note that the model weights are saved in INT8. This type can be changed when the model is loaded using the [`compute_type` option in CTranslate2](https://opennmt.net/CTranslate2/quantization.html).
|
42 |
+
|
43 |
+
## HASH calculation
|
44 |
+
|
45 |
+
Hash calculation is executed with md5hash in the directory of the model with:
|
46 |
+
|
47 |
+
```
|
48 |
+
find ./ -maxdepth 1 -type f -not -path '*/\.*' -exec md5sum {} \; | tr -d ' ' | jq -R 'split("./") | {(.[1]): (.[0])}' | jq -s 'add' > hash.json
|
49 |
+
```
|
50 |
+
|
51 |
+
## More information
|
52 |
+
|
53 |
+
**For more information about the original model, see its [model card](https://huggingface.co/Hungarians/whisper-base-cv16-hu-v2).**
|
int8/config.json
ADDED
@@ -0,0 +1,231 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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+
50270,
|
49 |
+
50271,
|
50 |
+
50272,
|
51 |
+
50273,
|
52 |
+
50274,
|
53 |
+
50275,
|
54 |
+
50276,
|
55 |
+
50277,
|
56 |
+
50278,
|
57 |
+
50279,
|
58 |
+
50280,
|
59 |
+
50281,
|
60 |
+
50282,
|
61 |
+
50283,
|
62 |
+
50284,
|
63 |
+
50285,
|
64 |
+
50286,
|
65 |
+
50287,
|
66 |
+
50288,
|
67 |
+
50289,
|
68 |
+
50290,
|
69 |
+
50291,
|
70 |
+
50292,
|
71 |
+
50293,
|
72 |
+
50294,
|
73 |
+
50295,
|
74 |
+
50296,
|
75 |
+
50297,
|
76 |
+
50298,
|
77 |
+
50299,
|
78 |
+
50300,
|
79 |
+
50301,
|
80 |
+
50302,
|
81 |
+
50303,
|
82 |
+
50304,
|
83 |
+
50305,
|
84 |
+
50306,
|
85 |
+
50307,
|
86 |
+
50308,
|
87 |
+
50309,
|
88 |
+
50310,
|
89 |
+
50311,
|
90 |
+
50312,
|
91 |
+
50313,
|
92 |
+
50314,
|
93 |
+
50315,
|
94 |
+
50316,
|
95 |
+
50317,
|
96 |
+
50318,
|
97 |
+
50319,
|
98 |
+
50320,
|
99 |
+
50321,
|
100 |
+
50322,
|
101 |
+
50323,
|
102 |
+
50324,
|
103 |
+
50325,
|
104 |
+
50326,
|
105 |
+
50327,
|
106 |
+
50328,
|
107 |
+
50329,
|
108 |
+
50330,
|
109 |
+
50331,
|
110 |
+
50332,
|
111 |
+
50333,
|
112 |
+
50334,
|
113 |
+
50335,
|
114 |
+
50336,
|
115 |
+
50337,
|
116 |
+
50338,
|
117 |
+
50339,
|
118 |
+
50340,
|
119 |
+
50341,
|
120 |
+
50342,
|
121 |
+
50343,
|
122 |
+
50344,
|
123 |
+
50345,
|
124 |
+
50346,
|
125 |
+
50347,
|
126 |
+
50348,
|
127 |
+
50349,
|
128 |
+
50350,
|
129 |
+
50351,
|
130 |
+
50352,
|
131 |
+
50353,
|
132 |
+
50354,
|
133 |
+
50355,
|
134 |
+
50356,
|
135 |
+
50357
|
136 |
+
],
|
137 |
+
"suppress_ids": [
|
138 |
+
1,
|
139 |
+
2,
|
140 |
+
7,
|
141 |
+
8,
|
142 |
+
9,
|
143 |
+
10,
|
144 |
+
14,
|
145 |
+
25,
|
146 |
+
26,
|
147 |
+
27,
|
148 |
+
28,
|
149 |
+
29,
|
150 |
+
31,
|
151 |
+
58,
|
152 |
+
59,
|
153 |
+
60,
|
154 |
+
61,
|
155 |
+
62,
|
156 |
+
63,
|
157 |
+
90,
|
158 |
+
91,
|
159 |
+
92,
|
160 |
+
93,
|
161 |
+
359,
|
162 |
+
503,
|
163 |
+
522,
|
164 |
+
542,
|
165 |
+
873,
|
166 |
+
893,
|
167 |
+
902,
|
168 |
+
918,
|
169 |
+
922,
|
170 |
+
931,
|
171 |
+
1350,
|
172 |
+
1853,
|
173 |
+
1982,
|
174 |
+
2460,
|
175 |
+
2627,
|
176 |
+
3246,
|
177 |
+
3253,
|
178 |
+
3268,
|
179 |
+
3536,
|
180 |
+
3846,
|
181 |
+
3961,
|
182 |
+
4183,
|
183 |
+
4667,
|
184 |
+
6585,
|
185 |
+
6647,
|
186 |
+
7273,
|
187 |
+
9061,
|
188 |
+
9383,
|
189 |
+
10428,
|
190 |
+
10929,
|
191 |
+
11938,
|
192 |
+
12033,
|
193 |
+
12331,
|
194 |
+
12562,
|
195 |
+
13793,
|
196 |
+
14157,
|
197 |
+
14635,
|
198 |
+
15265,
|
199 |
+
15618,
|
200 |
+
16553,
|
201 |
+
16604,
|
202 |
+
18362,
|
203 |
+
18956,
|
204 |
+
20075,
|
205 |
+
21675,
|
206 |
+
22520,
|
207 |
+
26130,
|
208 |
+
26161,
|
209 |
+
26435,
|
210 |
+
28279,
|
211 |
+
29464,
|
212 |
+
31650,
|
213 |
+
32302,
|
214 |
+
32470,
|
215 |
+
36865,
|
216 |
+
42863,
|
217 |
+
47425,
|
218 |
+
49870,
|
219 |
+
50254,
|
220 |
+
50258,
|
221 |
+
50358,
|
222 |
+
50359,
|
223 |
+
50360,
|
224 |
+
50361,
|
225 |
+
50362
|
226 |
+
],
|
227 |
+
"suppress_ids_begin": [
|
228 |
+
220,
|
229 |
+
50257
|
230 |
+
]
|
231 |
+
}
|
int8/hash.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"README.md": "4e446e5c8faabe7acac2893a14cbf581",
|
3 |
+
"config.json": "ce9b225b30072c0d86b6c93d49384821",
|
4 |
+
"hash.json": "d41d8cd98f00b204e9800998ecf8427e",
|
5 |
+
"preprocessor_config.json": "1160eec05b29412dd1389678cb25b3e0",
|
6 |
+
"tokenizer_config.json": "731573a1b27530e2fd2dd62fde94ef76",
|
7 |
+
"vocabulary.json": "aebe7623626c8f3f61cc5208ff29c348",
|
8 |
+
"vocabulary.txt": "980d7011195d0c733bd374e31708717f",
|
9 |
+
"model.bin": "574e83865681b5ee98d682b8e22dc258"
|
10 |
+
}
|
int8/model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5056fe79745315cbd0ebaec94bbc4dd4520b75c82ef87c9d7edd83ee23bfa8dd
|
3 |
+
size 79120439
|
int8/preprocessor_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"chunk_length": 30,
|
3 |
+
"feature_extractor_type": "WhisperFeatureExtractor",
|
4 |
+
"feature_size": 80,
|
5 |
+
"hop_length": 160,
|
6 |
+
"n_fft": 400,
|
7 |
+
"n_samples": 480000,
|
8 |
+
"nb_max_frames": 3000,
|
9 |
+
"padding_side": "right",
|
10 |
+
"padding_value": 0.0,
|
11 |
+
"processor_class": "WhisperProcessor",
|
12 |
+
"return_attention_mask": false,
|
13 |
+
"sampling_rate": 16000
|
14 |
+
}
|
int8/tokenizer_config.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
int8/vocabulary.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
int8/vocabulary.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|