aufklarer commited on
Commit
c5ec145
·
verified ·
1 Parent(s): 07ee36a

Add files using upload-large-folder tool

Browse files
README.md ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: nvidia-open-model-license
4
+ license_link: https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf
5
+ language:
6
+ - en
7
+ - es
8
+ - de
9
+ - fr
10
+ - it
11
+ - vi
12
+ - zh
13
+ - hi
14
+ - ja
15
+ tags:
16
+ - coreml
17
+ - audio
18
+ - speech
19
+ - tts
20
+ - text-to-speech
21
+ - multilingual
22
+ - autoregressive
23
+ - nano-codec
24
+ - magpie-tts
25
+ - quantized
26
+ - int8
27
+ base_model: nvidia/magpie_tts_multilingual_357m
28
+ library_name: coreml
29
+ pipeline_tag: text-to-speech
30
+ ---
31
+
32
+ # Magpie-TTS-Multilingual-357M-CoreML-8bit
33
+
34
+ - [speech-swift](https://github.com/soniqo/speech-swift) — Apple SDK
35
+ - [soniqo.audio](https://soniqo.audio) — website
36
+ - [blog](https://soniqo.audio/blog) — blog
37
+
38
+ Core ML port of [NVIDIA Magpie-TTS Multilingual 357M](https://huggingface.co/nvidia/magpie_tts_multilingual_357m),
39
+ an **autoregressive multi-codebook TTS** model over the [Nano-Codec
40
+ 22 kHz / 1.89 kbps / 21.5 fps](https://huggingface.co/nvidia/nemo-nano-codec-22khz-1.89kbps-21.5fps)
41
+ vocoder, quantized to **INT8** weight-only for Apple Silicon.
42
+
43
+ Core ML INT8 bundle for iOS / macOS. Four compiled .mlmodelc packages with scatter-based KV cache (fully static graph, ANE-friendly).
44
+
45
+ ## Model
46
+
47
+ | | |
48
+ |---|---|
49
+ | Total parameters | 357 M (text encoder 99 M + decoder 90 M + LocalTransformer 1 M + NanoCodec 62 M + audio embeddings) |
50
+ | Architecture | Causal Transformer encoder (6L, d=768) + Causal Transformer decoder (12L, d=768) + LocalTransformer codebook AR (1L, d=256) + Causal HiFi-GAN decoder |
51
+ | Audio | 8 codebooks × 2024 codes, 22.05 kHz mono, 21.5 fps |
52
+ | Languages | EN, ES, DE, FR, IT, VI, ZH, HI, JA |
53
+ | Speakers | 5 baked (John, Sofia, Aria, Jason, Leo) |
54
+ | Bundle size | 342 MB on disk |
55
+ | Layout | 4-bundle Core ML (text_encoder / decoder_prefill / decoder_step / nanocodec_decoder) |
56
+
57
+ ## Files
58
+
59
+ | File | Size | Description |
60
+ |---|---|---|
61
+ | `text_encoder.mlmodelc/` | 97 MB | text encoder (INT8) |
62
+ | `decoder_prefill.mlmodelc/` | 87 MB | decoder prefill (INT8) |
63
+ | `decoder_step.mlmodelc/` | 97 MB | decoder step (INT8) |
64
+ | `nanocodec_decoder.mlmodelc/` | 61 MB | nanocodec decoder (FP16) |
65
+ | `manifest.json` | <1 KB | SHA256 + sizes manifest |
66
+
67
+ The 4-bundle layout splits the model into:
68
+
69
+ - **text_encoder** — runs once per utterance over the phoneme sequence
70
+ - **decoder_prefill** — batch-prefills the 110-step baked speaker context into the KV cache (~10× faster than a sequential cold start)
71
+ - **decoder_step** — single AR step over the next audio frame; shares weights with decoder_prefill
72
+ - **nanocodec_decoder** — codes → 22.05 kHz waveform (always FP16; per FluidInference's data, quantizing the codec yields no runtime savings)
73
+
74
+ ## Round-trip validation
75
+
76
+ End-to-end TTS → faster-whisper large-v3 ASR on a held-out sentence per language (Character Error Rate):
77
+
78
+ | Language | en | es | de | fr | it | vi | zh | hi |
79
+ |---|---|---|---|---|---|---|---|---|
80
+ | CER | 0.00% | 0.00% | 0.00% | 0.00% | 0.00% | <8% (tone) | <2% (1 added interjection) | mixed-script Whisper artifact |
81
+
82
+ ## Usage
83
+
84
+ ```python
85
+ import json
86
+ from pathlib import Path
87
+ import mlx.core as mx
88
+
89
+ # 1. Tokenize text in your app (Swift) — see speech-swift's KokoroTTS
90
+ # pattern. For Japanese, use Apple's CFStringTokenizer + katakana → IPA.
91
+ # 2. Load the 3 sub-models and run the AR loop.
92
+ from huggingface_hub import snapshot_download
93
+ bundle = Path(snapshot_download("aufklarer/Magpie-TTS-Multilingual-357M-CoreML-8bit"))
94
+
95
+ # Production usage: see https://github.com/soniqo/speech-swift.
96
+ ```
97
+
98
+ The production Swift integration handles tokenization, the AR loop, KV-cache
99
+ management, and audio rendering. This HuggingFace bundle exists for
100
+ researchers and SDK developers building atop the MLX weights directly.
101
+
102
+ ## Source
103
+
104
+ - Upstream weights: [nvidia/magpie_tts_multilingual_357m](https://huggingface.co/nvidia/magpie_tts_multilingual_357m) (NVIDIA Open Model License)
105
+ - Codec: [nvidia/nemo-nano-codec-22khz-1.89kbps-21.5fps](https://huggingface.co/nvidia/nemo-nano-codec-22khz-1.89kbps-21.5fps)
106
+ - Paper: [NanoCodec: Towards High-Quality Ultra Fast Speech LLM Inference](https://arxiv.org/abs/2508.05835v1)
107
+
108
+ ## License
109
+
110
+ **NVIDIA Open Model License** — inherited from upstream Magpie-TTS Multilingual.
111
+ Suitable for commercial use; please review the license text linked above.
decoder_prefill.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a71e759209dae88c95a98d201ef52d63d9995561abcf2687885237ec1f02e2c
3
+ size 243
decoder_prefill.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56f2dcabe4d0e6d563b6c6e3c61547dd307d7a436009ab07ec77172a568db513
3
+ size 1646
decoder_prefill.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
decoder_prefill.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9580baf1d1ab1298b2813c658d5900f67b48ecd469dfe546f41e82203b2ccd7e
3
+ size 90484672
decoder_step.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e3a90933948f9853bbe4188312427733c0c60ddf15077f06108a8a2f13b6fc9b
3
+ size 243
decoder_step.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f787fc52103f85c3b0ba92d5f107810aff7ff5ce04034aeba6c434c1e312428
3
+ size 2491
decoder_step.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
decoder_step.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d1d0f3402781426161848dd32aed6216ef740cfec8844a8081a7056ccf394d5
3
+ size 101660096
nanocodec_decoder.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0577768f9d754fcd4b66bde948bef6b7a8aaa3e63a5a7b611c381a2b24b7dadb
3
+ size 243
nanocodec_decoder.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f479984a038c5b9054f53db9234e366ea8efb55f295b428ac67d082b86df31a1
3
+ size 373
nanocodec_decoder.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
nanocodec_decoder.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da987e2d6a5d060cdd27988cc8429a6ee8b2ac612d2758e401686af3629c4392
3
+ size 63178402
text_encoder.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a3ae8507cece1fc0d469d6509b20d111f237bc1d56ee6342173b19b0d737e2c
3
+ size 243
text_encoder.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7224bcea73453e252ca998c1cbc56db2b1a295b0fa6e506e746f8fb59102fbfc
3
+ size 403
text_encoder.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
text_encoder.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6c44d18010afb908c0791184468b9f5fbc4c469d7ee8b98eae88e70a67e6a72
3
+ size 101359040