kruatech commited on
Commit
102ca7a
·
verified ·
1 Parent(s): 5112910

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -1,35 +1,3 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
  *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
  *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
1
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
 
2
  *.bin filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
3
  *.model filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md ADDED
@@ -0,0 +1,310 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model: ai-sage/GigaAM-v3
4
+ base_model_relation: quantized
5
+ library_name: mlx
6
+ pipeline_tag: automatic-speech-recognition
7
+ language:
8
+ - ru
9
+ tags:
10
+ - automatic-speech-recognition
11
+ - speech-recognition
12
+ - russian
13
+ - offline
14
+ - mlx
15
+ - apple
16
+ - apple-silicon
17
+ - ios
18
+ - ipados
19
+ - macos
20
+ - rnnt
21
+ - conformer
22
+ - sentencepiece
23
+ - native-apple
24
+ ---
25
+
26
+ # GigaAM v3 MLX
27
+
28
+ **GigaAM v3 MLX** is a native Apple MLX runtime bundle for offline Russian automatic speech recognition on iPhone, iPad, and Mac.
29
+
30
+ This repository contains converted model assets for running `ai-sage/GigaAM-v3` revision `e2e_rnnt` with a native Apple runtime.
31
+
32
+ The bundle is intended for native on-device inference on Apple platforms without Python, PyTorch, Transformers, torchaudio, librosa, pyannote, or server-side inference at runtime.
33
+
34
+ ## Model
35
+
36
+ * Base model: `ai-sage/GigaAM-v3`
37
+ * Revision: `e2e_rnnt`
38
+ * Architecture: Conformer RNN-T
39
+ * Language: Russian
40
+ * Runtime target: native Apple MLX
41
+ * Precision: FP16
42
+ * Sample rate: 16 kHz
43
+ * Audio channels: mono
44
+ * Tokenizer: SentencePiece
45
+ * Vocabulary size: 1024
46
+ * Blank ID: 1024
47
+ * Output classes: 1025
48
+
49
+ ## Target platforms
50
+
51
+ This model bundle is intended for native Apple applications:
52
+
53
+ | Platform | Target |
54
+ | -------- | ----------------- |
55
+ | iOS | iPhone |
56
+ | iPadOS | iPad |
57
+ | macOS | Apple Silicon Mac |
58
+
59
+ ## Intended use
60
+
61
+ This bundle is intended for offline speech recognition in native Apple applications:
62
+
63
+ * iPhone apps
64
+ * iPad apps
65
+ * macOS apps
66
+ * local transcription tools
67
+ * privacy-preserving offline ASR
68
+ * Russian speech-to-text without cloud inference
69
+ * native Swift/MLX ASR runtimes
70
+
71
+ This repository contains model assets only. It is not a Python inference package.
72
+
73
+ ## Repository files
74
+
75
+ ```text
76
+ README.md
77
+ .gitattributes
78
+ manifest.json
79
+ checksums.sha256
80
+ weights.fp16.safetensors
81
+ tokenizer.model
82
+ hann_window.f32.bin
83
+ mel_filterbank_mel_freq.f32.bin
84
+ ```
85
+
86
+ | File | Description |
87
+ | --------------------------------- | ------------------------------------------------------------ |
88
+ | `weights.fp16.safetensors` | FP16 converted model weights |
89
+ | `tokenizer.model` | SentencePiece tokenizer |
90
+ | `manifest.json` | Runtime manifest with model, frontend, and decoding metadata |
91
+ | `hann_window.f32.bin` | Hann window used by the frontend |
92
+ | `mel_filterbank_mel_freq.f32.bin` | Mel filterbank used by the frontend |
93
+ | `checksums.sha256` | SHA-256 checksums for integrity checks |
94
+ | `.gitattributes` | Git LFS rules for binary model assets |
95
+
96
+ ## Runtime pipeline
97
+
98
+ The intended native runtime pipeline is:
99
+
100
+ ```text
101
+ Audio file / PCM samples
102
+ → native audio loader
103
+ → 16 kHz mono Float32 PCM
104
+ → mel spectrogram frontend
105
+ → Conformer encoder
106
+ → RNNT greedy decoder
107
+ → SentencePiece tokenizer
108
+ → text
109
+ ```
110
+
111
+ The model bundle includes frontend assets so that native runtimes can reproduce the original preprocessing without relying on Python audio libraries.
112
+
113
+ ## Frontend configuration
114
+
115
+ | Parameter | Value |
116
+ | ------------------ | ----: |
117
+ | Sample rate | 16000 |
118
+ | Channels | 1 |
119
+ | Number of mel bins | 64 |
120
+ | FFT size | 320 |
121
+ | Window length | 320 |
122
+ | Hop length | 160 |
123
+ | Center | false |
124
+ | Mel scale | HTK |
125
+ | Mel normalization | none |
126
+ | Power | 2.0 |
127
+
128
+ The effective feature hop is 10 ms before encoder subsampling. The encoder uses a subsampling factor of 4, so one encoder frame corresponds approximately to 40 ms of audio.
129
+
130
+ ## Architecture details
131
+
132
+ | Component | Value |
133
+ | ------------------------ | --------------------- |
134
+ | Encoder type | Conformer |
135
+ | Number of encoder layers | 16 |
136
+ | Model dimension | 768 |
137
+ | Attention heads | 16 |
138
+ | Attention type | Rotary self-attention |
139
+ | Convolution kernel size | 5 |
140
+ | Subsampling | Conv1D |
141
+ | Subsampling factor | 4 |
142
+ | Prediction network | RNNT predictor |
143
+ | Joint network | RNNT joint |
144
+ | Decoding | Greedy RNNT |
145
+ | Tokenizer | SentencePiece |
146
+ | Vocabulary size | 1024 |
147
+ | Blank ID | 1024 |
148
+ | Output classes | 1025 |
149
+
150
+ ## Validation
151
+
152
+ The conversion was validated against the original PyTorch/Hugging Face model using tensor-level golden references.
153
+
154
+ Validated components include:
155
+
156
+ * audio frontend
157
+ * mel spectrogram
158
+ * pre-encoder
159
+ * Conformer feed-forward blocks
160
+ * rotary self-attention
161
+ * Conformer convolution block
162
+ * full Conformer layer
163
+ * encoder stack
164
+ * RNNT predictor
165
+ * RNNT joint network
166
+ * RNNT greedy decoding
167
+ * SentencePiece tokenizer
168
+ * full WAV-to-text pipeline
169
+
170
+ ### Selected validation results
171
+
172
+ #### Mel frontend parity
173
+
174
+ ```text
175
+ feature_shape: [64, 99]
176
+ max_abs_diff: 0.0004234314
177
+ mean_abs_diff: 2.8040542e-05
178
+ ```
179
+
180
+ #### Encoder stack parity
181
+
182
+ ```text
183
+ stack_max_abs_diff: 2.5629997e-06
184
+ stack_mean_abs_diff: 3.8420205e-07
185
+ ```
186
+
187
+ #### Full encoder parity
188
+
189
+ ```text
190
+ output_shape: [1, 768, 25]
191
+ max_abs_diff: 2.682209e-06
192
+ mean_abs_diff: 4.0401252e-07
193
+ ```
194
+
195
+ #### End-to-end smoke test
196
+
197
+ A short Russian WAV sample was used to verify end-to-end decoding against the Python reference implementation.
198
+
199
+ The native runtime and the Python reference produced identical text for the same input audio.
200
+
201
+ The audio fixture is not included in this model repository. It is used only for runtime validation.
202
+
203
+ ## Performance
204
+
205
+ Benchmarks were measured on Apple M1 Max with a native Apple MLX runtime in release mode.
206
+
207
+ ### Short audio benchmark
208
+
209
+ | Runtime | Audio duration | Total time | RTF | Speed |
210
+ | ------------------------ | -------------: | ---------: | -----: | --------------: |
211
+ | Native Apple MLX runtime | ~6 s | ~0.168 s | ~0.028 | ~35.8× realtime |
212
+ | Python reference | ~6 s | ~0.701 s | ~0.117 | ~8.6× realtime |
213
+
214
+ The native runtime was approximately 4.2× faster than the Python reference in this short-audio warm benchmark.
215
+
216
+ ### Long-form benchmark
217
+
218
+ Long-form audio is processed in chunks to keep memory usage predictable and enable efficient transcription on Apple devices.
219
+
220
+ | Metric | Value |
221
+ | ------------------------ | --------------: |
222
+ | Audio duration | 911.252 s |
223
+ | Audio duration | 15 min 11 s |
224
+ | Chunk size | 20.0 s |
225
+ | Chunk count | 46 |
226
+ | Total transcription time | 24.2145 s |
227
+ | Real-time factor | 0.02657 |
228
+ | Speed | ~37.6× realtime |
229
+ | Peak resident memory | ~1.15 GB |
230
+
231
+ ### Long-form stage breakdown
232
+
233
+ | Stage | Time | Share |
234
+ | -------------------- | -------: | -----: |
235
+ | Audio load | 0.019 s | ~0.1% |
236
+ | Mel frontend | 5.993 s | ~24.8% |
237
+ | Model total | 18.203 s | ~75.2% |
238
+ | Encoder | 5.463 s | ~22.6% |
239
+ | RNNT greedy decoding | 12.736 s | ~52.6% |
240
+ | RNNT decoder | 1.821 s | ~7.5% |
241
+ | RNNT joint | 10.680 s | ~44.1% |
242
+ | RNNT readback | 0.169 s | ~0.7% |
243
+ | Tokenizer | 0.003 s | ~0.0% |
244
+
245
+ The current main runtime bottleneck is the RNNT joint network during greedy decoding.
246
+
247
+ ### Memory
248
+
249
+ | Scenario | Peak RSS |
250
+ | ----------------------------------------- | -------: |
251
+ | Native Apple MLX runtime, short audio | ~1.10 GB |
252
+ | Native Apple MLX runtime, long-form audio | ~1.15 GB |
253
+ | Python reference, short audio | ~1.76 GB |
254
+
255
+ ## Long-form transcription
256
+
257
+ Long-form audio is intended to be processed in chunks.
258
+
259
+ Recommended initial long-form settings:
260
+
261
+ ```text
262
+ chunk_seconds: 20
263
+ overlap_seconds: 0-2
264
+ sample_rate: 16000
265
+ channels: mono
266
+ ```
267
+
268
+ Future runtimes may use VAD, overlap merging, and timestamp-aware segmentation for improved long-form quality.
269
+
270
+ ## Limitations
271
+
272
+ * This bundle is optimized for native Apple MLX runtimes.
273
+ * Long audio should be processed in chunks.
274
+ * Current validation focuses on numerical parity and runtime behavior.
275
+ * Word-level timestamps are not included in the model bundle itself.
276
+ * Diarization is not included.
277
+ * This repository contains model assets only, not application code or SDK source code.
278
+
279
+ ## Relation to the original model
280
+
281
+ This bundle is a native Apple MLX runtime conversion of:
282
+
283
+ ```text
284
+ ai-sage/GigaAM-v3
285
+ revision: e2e_rnnt
286
+ ```
287
+
288
+ No additional training or fine-tuning was performed.
289
+
290
+ The conversion preserves the original Conformer RNN-T architecture, SentencePiece tokenizer layout, and preprocessing configuration, while packaging the model assets for native offline inference on iOS, iPadOS, and macOS.
291
+
292
+ ## License
293
+
294
+ This model bundle follows the license terms of the original `ai-sage/GigaAM-v3` model.
295
+
296
+ License: MIT
297
+
298
+ ## Attribution
299
+
300
+ If you use this bundle, please also reference the original GigaAM model:
301
+
302
+ ```text
303
+ ai-sage/GigaAM-v3
304
+ ```
305
+
306
+ ## Summary
307
+
308
+ GigaAM v3 MLX provides a native Apple MLX model bundle for offline Russian ASR.
309
+
310
+ It is intended for local, private, on-device speech recognition on Apple platforms without requiring Python or server-side inference at runtime.
checksums.sha256 ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ f2791bfaa8c2fdb030797cbcdf9129d15d0ddef338c0155fd6702f4f79d86db5 README.md
2
+ d78fae2160b53303e6200a6b7c9ae3df574ab083b243b80e7b5c8bee37a51d6b manifest.json
3
+ 2ff6d955a61003e0d3cb2155be36c14aa3df69c879713f30880ddd07d71fde21 weights.fp16.safetensors
4
+ 828c12c991019eef952a960661f25a92d6ad279591e2ea466b4aeddf1d20a18a tokenizer.model
5
+ 834a6744851a775dbb1831e9e17f0f702599b4d52c1d97d7638b3f170824419f hann_window.f32.bin
6
+ e9425a25940359fb85efeaf6651f81679971a1c46bec1af3aba943ec8a5fd793 mel_filterbank_mel_freq.f32.bin
hann_window.f32.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:834a6744851a775dbb1831e9e17f0f702599b4d52c1d97d7638b3f170824419f
3
+ size 1280
manifest.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "GigaAM v3 MLX",
3
+ "bundle_id": "gigaam-v3-mlx",
4
+ "source_model": "ai-sage/GigaAM-v3",
5
+ "source_revision": "e2e_rnnt",
6
+ "architecture": "conformer-rnnt",
7
+ "model_type": "rnnt",
8
+ "precision": "fp16",
9
+ "runtime": "mlx",
10
+ "runtime_target": "native-apple",
11
+ "sample_rate": 16000,
12
+ "channels": 1,
13
+ "total_params": 222519937,
14
+ "weights_file": "weights.fp16.safetensors",
15
+ "tokenizer_file": "tokenizer.model",
16
+ "blank_id": 1024,
17
+ "vocab_size": 1024,
18
+ "num_classes": 1025,
19
+ "decoding": "greedy-rnnt",
20
+ "frontend_files": {
21
+ "hann_window": "hann_window.f32.bin",
22
+ "mel_filterbank": "mel_filterbank_mel_freq.f32.bin"
23
+ },
24
+ "feature_config": {
25
+ "sample_rate": 16000,
26
+ "n_mels": 64,
27
+ "n_fft": 320,
28
+ "win_length": 320,
29
+ "hop_length": 160,
30
+ "center": false,
31
+ "mel_scale": "htk",
32
+ "mel_norm": null,
33
+ "power": 2.0
34
+ },
35
+ "encoder_config": {
36
+ "n_layers": 16,
37
+ "d_model": 768,
38
+ "n_heads": 16,
39
+ "self_attention_model": "rotary",
40
+ "pos_emb_max_len": 5000,
41
+ "conv_kernel_size": 5,
42
+ "subsampling": "conv1d",
43
+ "subsampling_factor": 4,
44
+ "conv_norm_type": "layer_norm"
45
+ },
46
+ "target_platforms": [
47
+ "iOS",
48
+ "iPadOS",
49
+ "macOS Apple Silicon"
50
+ ]
51
+ }
mel_filterbank_mel_freq.f32.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9425a25940359fb85efeaf6651f81679971a1c46bec1af3aba943ec8a5fd793
3
+ size 41216
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:828c12c991019eef952a960661f25a92d6ad279591e2ea466b4aeddf1d20a18a
3
+ size 255336
weights.fp16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ff6d955a61003e0d3cb2155be36c14aa3df69c879713f30880ddd07d71fde21
3
+ size 445105914