xocialize commited on
Commit
b905e8c
·
verified ·
1 Parent(s): ef9b37a

Step-Audio-EditX int8 MLX bundle (LM 8-bit group 64, written by mlx-step-audio-editx-swift from the bf16 bundle) + model card

Browse files
README.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: stepfun-ai/Step-Audio-EditX
4
+ library_name: mlx
5
+ pipeline_tag: audio-to-audio
6
+ language:
7
+ - en
8
+ - zh
9
+ tags:
10
+ - mlx
11
+ - speech-editing
12
+ - step-audio
13
+ - stepfun
14
+ - quantized
15
+ - 8bit
16
+ ---
17
+
18
+ # Step-Audio-EditX — int8 MLX bundle
19
+
20
+ [Step-Audio-EditX](https://huggingface.co/stepfun-ai/Step-Audio-EditX) (StepFun, Apache-2.0): a 3 B audio LLM that
21
+ re-delivers an existing take — emotion, speaking style, inserted paralinguistics (laughter, sighs, breaths), denoise,
22
+ silence trim — in the same voice, plus zero-shot cloning. This is the
23
+ [bf16 bundle](https://huggingface.co/mlx-community/Step-Audio-EditX-bf16) with the **step1 LM quantised to 8 bits**
24
+ (affine, group 64, every Linear and the embeddings — `model.safetensors` 3.75 GB instead of 7.06 GB); the tokenizers,
25
+ flow, HiFT and CAM++ are the bf16 files unchanged. `config.json` carries
26
+ `"quantization": {"bits": 8, "group_size": 64, "mode": "affine"}`.
27
+
28
+ The quantised weights were written by the Swift consumer itself from the bf16 bundle (`editx-gates
29
+ --write-int8-bundle`, quantised on MLX's CPU stream), so loading this bundle reproduces quantise-at-load exactly.
30
+
31
+ | file | component | source |
32
+ |---|---|---|
33
+ | `model.safetensors` (3.75 GB, int8) + `config.json` | step1 LM — 32 × 3072, 48 heads / 4 KV groups, sqrt-ALiBi | `stepfun-ai/Step-Audio-EditX` |
34
+ | `vq02.safetensors`, `vq06.safetensors`, `step-audio-tokenizer-assets.safetensors` + configs | the dual tokenizer (bf16) | FunASR Paraformer (FunASR model licence) / `stepfun-ai/Step-Audio-Tokenizer` |
35
+ | `flow-model.safetensors`, `flow-conditioner.safetensors`, `hift.safetensors`, `campplus.safetensors` + configs | flow, vocoder, speaker (bf16) | StepFun-trained / Alibaba CAM++ (Apache-2.0) |
36
+ | `tokenizer.json`, `tokenizer_config.json`, `frontend-config.json` | text tokenizer, mel front end | derived from `tokenizer.model` |
37
+
38
+ ## Consumers
39
+
40
+ - **Swift**: [xocialize/mlx-step-audio-editx-swift](https://github.com/xocialize/mlx-step-audio-editx-swift) ≥ 0.1.1 —
41
+ `EditXPipeline.load(bundle:)` reads the quantisation from `config.json`.
42
+ - **Python**: `mlx-speech` loads int8 LM bundles of this layout (its `--bits 8` converter writes the same keys).
43
+
44
+ ## Measured (M5 Max, the Swift consumer, the E19 evaluation cues)
45
+
46
+ - Resident 6.2 GB phys_footprint after load (MLX active 5.7 GB); MLX peak 7.3–7.7 GB per edit; real-time factor
47
+ **0.51–0.53** (bf16: 0.72–0.75); loads in 0.5 s.
48
+ - Content survives every edit (ASR error 0.000 on the four test edits), speaker similarity 0.83–0.97 to the source,
49
+ DNSMOS 3.45–3.49 — the same bars as bf16 and the torch reference. Sampled tokens differ from bf16's at near-ties,
50
+ as any quantised tier's do.
51
+
52
+ ## Licence
53
+
54
+ Apache-2.0 (StepFun) for the LM, flow, HiFT and the S3 tokenizer; the Paraformer encoder under the FunASR model
55
+ licence; CAM++ Apache-2.0 (Alibaba / 3D-Speaker). Quantised and re-hosted by xocialize for mlx-community.
campplus-config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "feat_dim": 80,
3
+ "embedding_size": 192,
4
+ "growth_rate": 32,
5
+ "init_channels": 128,
6
+ "block_layers": [
7
+ 12,
8
+ 24,
9
+ 16
10
+ ],
11
+ "segment_pool_size": 100,
12
+ "sample_rate": 16000,
13
+ "num_mel_bins": 80,
14
+ "output_level": "segment"
15
+ }
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures" : [
3
+ "Step1ForCausalLM"
4
+ ],
5
+ "auto_map" : {
6
+ "AutoConfig" : "configuration_step1.Step1Config",
7
+ "AutoModelForCausalLM" : "modeling_step1.Step1ForCausalLM"
8
+ },
9
+ "bos_token_id" : 1,
10
+ "eos_token_id" : 3,
11
+ "hidden_size" : 3072,
12
+ "intermediate_size" : 8192,
13
+ "max_seq_len" : 32768,
14
+ "model_type" : "step1",
15
+ "num_attention_groups" : 4,
16
+ "num_attention_heads" : 48,
17
+ "num_hidden_layers" : 32,
18
+ "pad_token_id" : 0,
19
+ "quantization" : {
20
+ "bits" : 8,
21
+ "group_size" : 64,
22
+ "mode" : "affine"
23
+ },
24
+ "rms_norm_eps" : 1.0000000000000001e-05,
25
+ "tie_word_embeddings" : false,
26
+ "torch_dtype" : "bfloat16",
27
+ "use_cache" : true,
28
+ "vocab_size" : 74752
29
+ }
flow-conditioner-config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "vocab_size": 5121,
3
+ "input_size": 512,
4
+ "output_size": 80,
5
+ "spk_embed_dim": 192,
6
+ "vq02_pad_token": 1024,
7
+ "vq06_prompt_offset": 1024,
8
+ "vq06_vocoder_base": 1025,
9
+ "prompt_mel_upsample": 2
10
+ }
flow-conditioner.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:108792964617513bf2b0d8a47255bc8efa7e63acef1b96b866b3d97c0ea8f6a7
3
+ size 2653151
flow-model-config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "input_size": 512,
3
+ "output_size": 80,
4
+ "spk_embed_dim": 192,
5
+ "vocab_size": 5121,
6
+ "encoder_output_size": 512,
7
+ "pre_lookahead_len": 3,
8
+ "num_blocks": 6,
9
+ "num_up_blocks": 4,
10
+ "up_stride": 2,
11
+ "up_scale_factor": 2.0,
12
+ "attention_heads": 8,
13
+ "linear_units": 2048,
14
+ "key_bias": true,
15
+ "estimator_in_channels": 320,
16
+ "estimator_out_channels": 80,
17
+ "estimator_hidden_size": 512,
18
+ "estimator_depth": 16,
19
+ "estimator_num_heads": 8,
20
+ "estimator_head_dim": 64,
21
+ "estimator_mlp_ratio": 4.0,
22
+ "inference_cfg_rate": 0.7
23
+ }
flow-model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd076d8d7df5011ab57898f91dc2701ce28f9799ed04f85899ffe6f033e236b6
3
+ size 307577693
frontend-config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "num_mels": 80,
3
+ "n_fft": 1920,
4
+ "hop_size": 480,
5
+ "win_size": 1920,
6
+ "sampling_rate": 24000,
7
+ "fmin": 0.0,
8
+ "fmax": 8000.0
9
+ }
hift-config.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "in_channels": 80,
3
+ "base_channels": 512,
4
+ "nb_harmonics": 8,
5
+ "sampling_rate": 24000,
6
+ "nsf_alpha": 0.1,
7
+ "nsf_sigma": 0.003,
8
+ "nsf_voiced_threshold": 10.0,
9
+ "upsample_rates": [
10
+ 8,
11
+ 5,
12
+ 3
13
+ ],
14
+ "upsample_kernel_sizes": [
15
+ 16,
16
+ 11,
17
+ 7
18
+ ],
19
+ "istft_n_fft": 16,
20
+ "istft_hop_len": 4,
21
+ "resblock_kernel_sizes": [
22
+ 3,
23
+ 7,
24
+ 11
25
+ ],
26
+ "resblock_dilation_sizes": [
27
+ [
28
+ 1,
29
+ 3,
30
+ 5
31
+ ],
32
+ [
33
+ 1,
34
+ 3,
35
+ 5
36
+ ],
37
+ [
38
+ 1,
39
+ 3,
40
+ 5
41
+ ]
42
+ ],
43
+ "source_resblock_kernel_sizes": [
44
+ 7,
45
+ 7,
46
+ 11
47
+ ],
48
+ "source_resblock_dilation_sizes": [
49
+ [
50
+ 1,
51
+ 3,
52
+ 5
53
+ ],
54
+ [
55
+ 1,
56
+ 3,
57
+ 5
58
+ ],
59
+ [
60
+ 1,
61
+ 3,
62
+ 5
63
+ ]
64
+ ],
65
+ "lrelu_slope": 0.1,
66
+ "audio_limit": 0.99,
67
+ "f0_predictor": {
68
+ "num_class": 1,
69
+ "in_channels": 80,
70
+ "cond_channels": 512
71
+ }
72
+ }
hift.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28a40adb4e2a8bc401b9a12cca2e9219e486e0601ad57b32584a9f3e7e1e41fd
3
+ size 41637433
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5d2846e8e026cb625eed7fab32a2102b094c431f536efc39dd7f0fec46354b4
3
+ size 3750584666
step-audio-tokenizer-assets.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9eb651ec816b90046dc8c9eaadc1ef0f19f36e29f5e904e616c67b3a9bdcd052
3
+ size 2101864
step-audio-tokenizer-config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "step_audio_tokenizer",
3
+ "vq02_sample_rate": 16000,
4
+ "vq06_sample_rate": 16000,
5
+ "vq02_codebook_size": 1024,
6
+ "vq06_token_rate_hz": 25.0,
7
+ "vq06_n_fft": 400,
8
+ "vq06_hop_length": 160,
9
+ "vq06_num_mels": 128,
10
+ "vq06_max_chunk_seconds": 30.0,
11
+ "vq06_min_chunk_samples": 480,
12
+ "trim_top_db": 20.0,
13
+ "trim_frame_length": 512,
14
+ "trim_hop_length": 128,
15
+ "trim_keep_left_seconds": 0.05,
16
+ "trim_keep_right_seconds": 0.22,
17
+ "trim_output_hop_samples": 240,
18
+ "vq02_chunk_size": [
19
+ 0,
20
+ 4,
21
+ 5
22
+ ],
23
+ "encoder_chunk_look_back": 4
24
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "clean_up_tokenization_spaces": false,
4
+ "eos_token": "</s>",
5
+ "legacy": false,
6
+ "model_max_length": 65536,
7
+ "pad_token": "<unk>",
8
+ "padding_side": "left",
9
+ "sp_model_kwargs": {},
10
+ "tokenizer_class": "LlamaTokenizer",
11
+ "unk_token": "<unk>",
12
+ "use_default_system_prompt": false,
13
+ "chat_template": "{% if messages[0]['role'] == 'system' %}{{ '<s>' }}{% endif %}{% for message in messages %}{% if message['role'] == 'user' %}{% set role = 'human' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<|BOT|> ' + role + '\\n' }}{{ message['content'] }}{% if not loop.last or message['role'] != 'assistant' %}{{ '<|EOT|>' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|BOT|> assistant\\n' }}{% endif %}"
14
+ }
15
+
vq02-config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "ParaformerStreaming",
3
+ "frontend": {
4
+ "sample_rate": 16000,
5
+ "window_type": "hamming",
6
+ "n_mels": 80,
7
+ "frame_length_ms": 25.0,
8
+ "frame_shift_ms": 10.0,
9
+ "lfr_m": 7,
10
+ "lfr_n": 6,
11
+ "dither": 1.0,
12
+ "snip_edges": true,
13
+ "remove_dc_offset": true,
14
+ "preemphasis_coefficient": 0.97,
15
+ "round_to_power_of_two": true,
16
+ "low_freq": 20.0,
17
+ "high_freq": 0.0,
18
+ "use_power": true,
19
+ "use_log_fbank": true,
20
+ "use_energy": false
21
+ },
22
+ "encoder": {
23
+ "input_size": 560,
24
+ "output_size": 512,
25
+ "attention_heads": 4,
26
+ "linear_units": 2048,
27
+ "num_blocks": 50,
28
+ "normalize_before": true,
29
+ "kernel_size": 11,
30
+ "sanm_shift": 0,
31
+ "input_layer": "pe_online",
32
+ "selfattention_layer_type": "sanm"
33
+ }
34
+ }
vq02.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5035bbfcb7a56f46ac4d312ebc56f52b250d66f5b421d2a8b492f205f4828621
3
+ size 316024767
vq06-config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "num_mels": 128,
3
+ "hidden_size": 1280,
4
+ "num_heads": 20,
5
+ "num_layers": 6,
6
+ "max_positions": 1500,
7
+ "codebook_size": 4096,
8
+ "conv1_kernel_size": 3,
9
+ "conv1_stride": 2,
10
+ "conv1_padding": 1,
11
+ "conv2_kernel_size": 3,
12
+ "conv2_stride": 2,
13
+ "conv2_padding": 1,
14
+ "layer_norm_eps": 1e-05,
15
+ "l2_norm_eps": 9.999999960041972e-13
16
+ }
vq06.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b10c2501908c26ccf14c93995d3110801c5a86221eb919e3481d812a4cb9c86
3
+ size 261268214