TanelAlumae commited on
Commit
bb6489c
·
verified ·
1 Parent(s): e8f2f61

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +231 -0
README.md CHANGED
@@ -1,3 +1,234 @@
1
  ---
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ library_name: transformers
3
  license: apache-2.0
4
+ base_model: mistralai/Voxtral-Mini-3B-2507
5
+ language:
6
+ - et
7
+ - en
8
+ pipeline_tag: automatic-speech-recognition
9
+ tags:
10
+ - audio
11
+ - speech
12
+ - voxtral
13
+ - estonian
14
+ - transcription
15
+ - translation
16
+ - audio-understanding
17
+ - full-finetune
18
  ---
19
+
20
+ # Voxtral Mini 3B 2507 Estonian
21
+
22
+ This model is a full-parameter fine-tune of
23
+ [`mistralai/Voxtral-Mini-3B-2507`](https://huggingface.co/mistralai/Voxtral-Mini-3B-2507)
24
+ for Estonian speech recognition and audio understanding. It was trained on a
25
+ mixture of transcription, subtitle and stenogram generation, news writing,
26
+ speech translation, summarization, and question-answering tasks.
27
+
28
+
29
+ ## Model details
30
+
31
+ | Property | Value |
32
+ |---|---|
33
+ | Base model | `mistralai/Voxtral-Mini-3B-2507` |
34
+ | Architecture | `VoxtralForConditionalGeneration` |
35
+ | Primary language | Estonian (`et/est`) |
36
+ | Additional output language | English (`en`) |
37
+ | Fine-tuning method | Full-parameter supervised fine-tuning |
38
+ | Selected checkpoint | 4,500 steps |
39
+ | Weight precision | bfloat16 |
40
+ | License | Apache 2.0, following the base model |
41
+
42
+ ## Intended uses
43
+
44
+ The model is intended for research and development involving Estonian speech,
45
+ including:
46
+
47
+ - verbatim automatic speech recognition;
48
+ - readable subtitle and parliamentary stenogram generation;
49
+ - summaries and news stories based on broadcast audio;
50
+ - answering questions about spoken content; and
51
+ - translation of Estonian speech into English.
52
+
53
+ The output style depends on the instruction. Prompts should state the desired
54
+ task and format explicitly. This is not a certified system for legal,
55
+ medical, safety-critical, or high-stakes transcription.
56
+
57
+ ## Usage with Transformers
58
+
59
+ The following example uses the selected local checkpoint for Estonian
60
+ transcription:
61
+
62
+ ```python
63
+ import torch
64
+ from transformers import AutoProcessor, VoxtralForConditionalGeneration
65
+
66
+ model_id = "exp/models/voxtral-mini-3b-2507-full/1c/checkpoint-4500"
67
+ device = "cuda"
68
+
69
+ processor = AutoProcessor.from_pretrained(model_id)
70
+ model = VoxtralForConditionalGeneration.from_pretrained(
71
+ model_id,
72
+ dtype=torch.bfloat16,
73
+ attn_implementation="sdpa",
74
+ low_cpu_mem_usage=True,
75
+ ).to(device)
76
+ model.eval()
77
+
78
+ inputs = processor.apply_transcription_request(
79
+ language="et",
80
+ audio="example.wav",
81
+ model_id=model_id,
82
+ return_tensors="pt",
83
+ )
84
+ inputs = {
85
+ key: value.to(device=device, dtype=torch.bfloat16)
86
+ if value.is_floating_point()
87
+ else value.to(device)
88
+ for key, value in inputs.items()
89
+ }
90
+
91
+ with torch.inference_mode():
92
+ output_ids = model.generate(**inputs, do_sample=False, max_new_tokens=8192)
93
+
94
+ prompt_length = inputs["input_ids"].shape[1]
95
+ text = processor.batch_decode(
96
+ output_ids[:, prompt_length:], skip_special_tokens=True
97
+ )[0]
98
+ print(text.strip())
99
+ ```
100
+
101
+ Use 16 kHz mono audio where possible. For long recordings, segmenting at
102
+ natural speech boundaries is recommended.
103
+
104
+ ## Training data
105
+
106
+ The training data was combined from seven task datasets.
107
+
108
+ | Task | Input | Retained | Filtered out |
109
+ |---|---:|---:|---:|
110
+ | Verbatim Estonian ASR | 13,434 | 12,972 | 462 |
111
+ | Edited broadcast subtitles | 5,639 | 5,412 | 227 |
112
+ | Estonian news stories from audio | 50,000 | 49,998 | 2 |
113
+ | English news stories from Estonian audio | 10,000 | 9,999 | 1 |
114
+ | Broadcast summarization and structured extraction | 49,803 | 49,797 | 6 |
115
+ | Questions about broadcast audio | 10,000 | 5,264 | 4,736 |
116
+ | Edited parliamentary stenograms | 17,556 | 15,955 | 1,601 |
117
+ | **Total** | **156,432** | **149,397** | **7,035** |
118
+
119
+ Of the 7,035 filtered examples, 5,500 exceeded the task-specific audio-duration
120
+ limit and 1,535 exceeded the maximum combined audio/text sequence length.
121
+ Transcription examples were limited to 30 minutes and audio-understanding
122
+ examples to 40 minutes. The final prepared manifest used a maximum sequence
123
+ length of 28,000 tokens.
124
+
125
+ Combined sequence lengths in the retained manifest were:
126
+
127
+ | Statistic | Tokens |
128
+ |---|---:|
129
+ | Minimum | 419 |
130
+ | Median | 6,845 |
131
+ | 90th percentile | 19,163 |
132
+ | 95th percentile | 19,734 |
133
+ | 99th percentile | 24,925 |
134
+ | Maximum | 27,999 |
135
+
136
+ Some instructions and
137
+ answers in trainining data and the English news-story targets were generated with
138
+ `google/gemini-3.1-flash-lite`. Consequently, the training targets may contain
139
+ errors or stylistic biases inherited from that model.
140
+
141
+ The source collections include ERR broadcasts and subtitles, an Estonian ASR
142
+ manifest, ERR news video/audio and article text, Päevakaja programmes,
143
+ Riigikogu recordings and stenograms, and
144
+ [`TalTechNLP/qa_broadcast_conv_et`](https://huggingface.co/datasets/TalTechNLP/qa_broadcast_conv_et).
145
+ Users are responsible for checking the terms, copyright, privacy constraints,
146
+ and permitted uses of the underlying data for their application.
147
+
148
+ ## Training procedure
149
+
150
+ Training used four NVIDIA A100-SXM4 80 GB GPUs. The per-device batch size was
151
+ 1 with 8 gradient-accumulation steps, giving an effective global batch size of
152
+ 32. Both the audio encoder and aligner were unfrozen.
153
+
154
+ | Hyperparameter | Value |
155
+ |---|---|
156
+ | Maximum training steps | 6,000 |
157
+ | Selected checkpoint step | 4,500 |
158
+ | Effective global batch size | 32 |
159
+ | Optimizer | Fused AdamW |
160
+ | Learning rate | `5e-5` |
161
+ | Adam betas | `(0.9, 0.95)` |
162
+ | Adam epsilon | `1e-8` |
163
+ | Weight decay | `0.01` |
164
+ | Maximum gradient norm | `1.0` |
165
+ | Scheduler | Cosine |
166
+ | Warmup ratio | `0.03` |
167
+ | Training precision | bfloat16 with TF32 enabled |
168
+ | Gradient checkpointing | Enabled for language and vision/audio components |
169
+ | Sequence packing | Disabled |
170
+ | Truncation strategy | Delete over-length examples |
171
+ | Evaluation/save interval | 500 steps |
172
+ | Random and data seeds | 13 |
173
+
174
+ The run was resumed from checkpoints during development, and the configured
175
+ maximum sequence length was reduced from 32,768 to 30,000 and finally 28,000.
176
+ The data statistics above describe the final prepared 28,000-token manifest;
177
+ they should not be interpreted as an exact record of the manifest state at
178
+ every earlier resumed stage.
179
+
180
+ ## Evaluation
181
+
182
+ Checkpoints were ranked by word error rate on an internal held-out Estonian ASR
183
+ set. Generation used greedy decoding (`temperature=0`) with up to 8,192 new
184
+ tokens.
185
+
186
+ | Checkpoint | WER | Reference words |
187
+ |---:|---:|---:|
188
+ | **4,500** | **5.05%** | 9,085 |
189
+
190
+ The validation set contains only 10 recordings. These figures are useful for
191
+ checkpoint selection but should not be treated as a broad estimate of Estonian
192
+ ASR quality or as directly comparable with public benchmark results.
193
+
194
+ ## Toolkits and environment
195
+
196
+ The recorded environment for the final training stage included:
197
+
198
+ | Toolkit | Version or role |
199
+ |---|---|
200
+ | ms-swift | 4.4.2; supervised fine-tuning and evaluation loop |
201
+ | Transformers | 4.57.6; Voxtral model and processor |
202
+ | PyTorch | 2.10.0 |
203
+ | Datasets | 3.6.0 |
204
+ | Accelerate | 1.12.0 |
205
+ | Mistral Common | 1.11.7 |
206
+ | kaldiio | 2.18.1; reading FLAC `ark` audio |
207
+ | SoundFile | 0.13.1 |
208
+ | Safetensors | 0.7.0 |
209
+ | Weights & Biases | 0.27.2; experiment tracking |
210
+ | CUDA | 13.2 |
211
+ | Slurm | Distributed job launch and resource allocation |
212
+
213
+ A local ms-swift plugin supplied Voxtral dataset integration and support for
214
+ the repository's `ark:<path>:<offset>` audio references.
215
+
216
+ ## Limitations
217
+
218
+ - The model can hallucinate, omit, repeat, or incorrectly normalize speech.
219
+ - Performance may degrade for dialects, code-switching, overlapping speakers,
220
+ noise, distant microphones, music, or domains underrepresented in training.
221
+ - The English outputs were trained on machine-generated references and may
222
+ inherit translation errors.
223
+ - Generated summaries and answers are not guaranteed to be factually faithful
224
+ to the recording.
225
+ - Training data may contain personal names, opinions, and other information
226
+ present in public broadcasts or parliamentary speech. Outputs should be
227
+ reviewed before publication or consequential use.
228
+
229
+ ## Acknowledgements
230
+
231
+ The model builds on Mistral AI's
232
+ [`Voxtral Mini 3B 2507`](https://huggingface.co/mistralai/Voxtral-Mini-3B-2507).
233
+ See the upstream model card for architecture details, original capabilities,
234
+ usage requirements, and base-model limitations.