npario ddalcu commited on
Commit
0a06ba6
·
0 Parent(s):

Duplicate from ddalcu/MiniMax-Music3-MLX-Serve-8bit

Browse files

Co-authored-by: David Dalcu <ddalcu@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
36
+ music_tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MiniMax-Music3 COMMUNITY LICENSE
2
+
3
+ Copyright (c) 2026 MiniMax
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this Software,
6
+ including the model weights, parameters, configuration files, inference code and associated
7
+ documentation (the “Software”), to deal in the Software, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or provide copies of the Software,
9
+ and to permit persons to whom the Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ 1. The above copyright notice and this permission notice shall be included in all copies or
13
+ substantial portions of the Software.
14
+
15
+ 2. Your use of the Software must comply with applicable laws and regulations (including
16
+ trade-compliance laws and regulations) and must comply with the Acceptable Use Policy in Exhibit A.
17
+ Especially, you must not violate any third party’s intellectual-property or other rights while using
18
+ the Software.
19
+
20
+ 3. Commercial Terms
21
+
22
+ 1. You shall prominently display “MiniMax-Music3” on the user interface of commercial product or
23
+ service that uses the Software.
24
+
25
+ 2. You shall obtain a separate, prior written authorization from MiniMax by contacting
26
+ api@minimax.io with the subject line “MiniMax-Music3 licensing - authorization request”, if the
27
+ aggregate yearly revenue generated from such products and services provided by you and/or any of
28
+ your affiliates exceeds 20 million US dollars (or equivalent in other currencies).
29
+
30
+ 4. If you provide or make available to any third party a product, service, or hosted service that
31
+ permits the generation of outputs using the Software, you must, before making that product or
32
+ service available and throughout its operation, implement, maintain, test, and periodically review
33
+ reasonable and proportionate technical and organizational safeguards designed to prevent and
34
+ mitigate access, uses, and outputs that violate this License, including uses or outputs that
35
+ infringe, misappropriate, or otherwise violate any third party’s intellectual-property or other
36
+ rights. You must not knowingly disable, materially weaken, or permit the circumvention of those
37
+ safeguards. You are responsible for implementing and enforcing these requirements with respect to
38
+ your products, services, systems, users, and downstream recipients.
39
+
40
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
41
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
42
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
43
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
44
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. YOU SHALL BE SOLELY
45
+ RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING, REPRODUCING, MODIFYING, PERFORMING,
46
+ DISPLAYING OR DISTRIBUTING ANY OF THE SOFTWARE OR OUTPUTS AND ASSUME ANY AND ALL RISKS ASSOCIATED
47
+ WITH YOUR OR A THIRD PARTY’S USE OR DISTRIBUTION OF ANY OF THE SOFTWARE OR OUTPUTS AND YOUR EXERCISE
48
+ OF RIGHTS AND PERMISSIONS UNDER THIS LICENSE. YOU SHALL INDEMNIFY AND HOLD HARMLESS MINIMAX FROM AND
49
+ AGAINST ANY AND ALL LOSSES, LIABILITIES, DAMAGES, CLAIMS, COSTS, AND EXPENSES ARISING OUT OF OR
50
+ RELATING TO ANY OF YOUR BREACH OF THIS LICENSE.
51
+
52
+ Please note that MiniMax-Music3 was fine-tuned from Qwen3-8B (https://huggingface.co/Qwen/Qwen3-8B),
53
+ which is licensed under the Apache License 2.0
54
+ (https://huggingface.co/Qwen/Qwen3-8B/blob/main/LICENSE). DiT-2B was modified from the Stable Audio
55
+ code (https://github.com/Stability-AI/stable-audio-tools), which is licensed under the MIT License
56
+ (https://github.com/Stability-AI/stable-audio-tools/blob/main/LICENSE). The VAE was modified from
57
+ the DAC code (https://github.com/descriptinc/descript-audio-codec), which is licensed under the MIT
58
+ License (https://github.com/descriptinc/descript-audio-codec/blob/main/LICENSE).
59
+
60
+ Exhibit A — Acceptable Use Policy
61
+
62
+ MiniMax reserves the right to update this Acceptable Use Policy from time to time.
63
+
64
+ Last revised: August [6], 2026.
65
+
66
+ MiniMax is committed to promoting the safe and responsible use of its tools and features. You agree
67
+ not to use the Software and in any of the following ways:
68
+
69
+ 1. Use in any manner that violates any applicable national, federal, state, local, or international
70
+ law, regulation, or other legal requirement, or that infringes, misappropriates, or otherwise
71
+ violates any third party’s intellectual-property or other proprietary rights, including without
72
+ limitation, through unauthorized reproduction, distribution, public display, public performance, or
73
+ creation of derivative works;
74
+
75
+ 2. Use in any manner that may harm yourself or others;
76
+
77
+ 3. Use to generate, repurpose or distribute any content to harm yourself or others;
78
+
79
+ 4. Use to circumvent or bypass any safety guardrails or safeguards we have implemented;
80
+
81
+ 5. Use in any manner that exploits or harms, or intends to exploit or harm, minors;
82
+
83
+ 6. Use to generate or disseminate verifiably false information and/or content for the purpose of
84
+ harming others or influencing elections;
85
+
86
+ 7. Use to manufacture or facilitate false online engagement, including fake reviews and other means
87
+ of false online engagement;
88
+
89
+ 8. Use to intentionally defame, disparage, or otherwise harass others;
90
+
91
+ 9. Use to generate and/or disseminate malware (including ransomware) or any other content intended
92
+ to damage electronic systems;
93
+
94
+ 10. Use to generate or disseminate personally identifiable information for the purpose of harming
95
+ others;
96
+
97
+ 11. Use to generate or disseminate information (including images, code, posts, or articles) in or to
98
+ any public environment (including via bot tweets or similar means) without clearly and prominently
99
+ disclosing that such information and/or content is machine-generated;
100
+
101
+ 12. Use to impersonate another person without that person’s consent, authorization, or lawful right
102
+ to do so;
103
+
104
+ 13. Use to make high-risk automated decisions in critical domains that affect individual safety,
105
+ rights, or well-being (such as law enforcement, immigration, healthcare or medical services,
106
+ critical-infrastructure management, product-safety components, essential services, credit,
107
+ employment, housing, education, social scoring, or insurance);
108
+
109
+ 14. Use in any manner that violates or disregards the social, ethical, or moral standards of other
110
+ countries or regions;
111
+
112
+ 15. Use to carry out, assist, threaten, incite, plan, advocate for, or encourage violent extremism
113
+ or terrorism;
114
+
115
+ 16. Use for any purpose intended to discriminate against, or harm, individuals or groups based on
116
+ protected characteristics or categories, online or offline social behavior, or known or predicted
117
+ personality traits;
118
+
119
+ 17. Use to intentionally exploit the vulnerabilities of specific populations based on age, social,
120
+ physical, or psychological characteristics, so as to materially distort the behavior of a member of
121
+ that group in a manner that causes, or is likely to cause, physical or psychological harm to that
122
+ person or to others;
123
+
124
+ 18. Use for military purposes; and
125
+
126
+ 19. Use to engage in any unauthorized or unlicensed professional activity, including but not limited
127
+ to financial, legal, medical or healthcare, or other professional practice.
README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: minimax-music3-community-license
4
+ license_link: LICENSE
5
+ base_model: MiniMaxAI/MiniMax-Music3
6
+ base_model_relation: quantized
7
+ library_name: mlx-serve
8
+ tags:
9
+ - mlx
10
+ - mlx-serve
11
+ - music
12
+ - text-to-music
13
+ - minimax
14
+ pipeline_tag: text-to-audio
15
+ ---
16
+
17
+ # MiniMax Music 3 for mlx-serve (8-bit)
18
+
19
+ [MiniMax-Music3](https://huggingface.co/MiniMaxAI/MiniMax-Music3) converted for
20
+ [mlx-serve](https://github.com/ddalcu/mlx-serve)'s native Zig + MLX engine.
21
+ Full songs with sung lyrics at 44.1 kHz stereo, generated locally on Apple
22
+ Silicon.
23
+
24
+ Quantization: affine 8-bit, group 64, on every real matmul (LLM, depth
25
+ decoder, DiT, lm_head). Kept dense on purpose: the embedding tables (gather
26
+ reads), the condition encoder and the whole vocoder (VAE-class precision).
27
+ Worst per-tensor reconstruction error 1.48% RMS. 13 GB on disk instead of the
28
+ 57 GB upstream repo (which ships its weights twice).
29
+
30
+ | File | Contents |
31
+ |---|---|
32
+ | `language_model.safetensors` | Qwen3 8B global LLM, 36L, vocab 200k |
33
+ | `rvq_depth_decoder.safetensors` | 0.6B local LLM, 7 residual codebooks |
34
+ | `transformer.safetensors` | 2.4B flow-matching DiT, 36 blocks |
35
+ | `condition_encoder.safetensors` | hidden-state mix + resampler, f32 |
36
+ | `vocoder.safetensors` | Flow-VAE / DAC decoder, f32 |
37
+
38
+ Engine parity against the fp32 reference on these exact weights: prefill
39
+ cosine 0.9999, condition encoder 0.999999, DiT velocity 0.999, vocoder
40
+ 1.000000. The autoregressive stage runs about 44 ms per frame on an M-series
41
+ Mac, so a one-minute song takes roughly a minute of LLM time plus the
42
+ diffusion pass.
43
+
44
+ ## Run it
45
+
46
+ Download **[MLX Core.app](https://github.com/ddalcu/mlx-serve/releases/latest)**,
47
+ open the Music tab and pick **MiniMax Music 3**. Style prompt + lyrics in,
48
+ WAV out.
49
+
50
+ Over HTTP:
51
+
52
+ ```bash
53
+ mlx-serve --serve
54
+ curl http://127.0.0.1:11234/v1/audio/music-generations \
55
+ -H 'Content-Type: application/json' -o song.wav -d '{
56
+ "model": "MiniMax-Music3-MLX-Serve-8bit",
57
+ "prompt": "upbeat synthwave with driving bass and dreamy pads",
58
+ "lyrics": "[verse]\nneon lights across the bay\n[chorus]\nwe run all night",
59
+ "duration_seconds": 60
60
+ }'
61
+ ```
62
+
63
+ Lyrics are required (the model is lyric-conditioned) and structure tags like
64
+ `[verse]` or `[chorus]` go on their own lines. `duration_seconds` (1-360) is
65
+ an upper bound, the model may end the song earlier. ACE-Step style fields
66
+ (bpm, keyscale, timesignature, vocal_language) do not exist on this model.
67
+
68
+ Rebuild from the upstream repo with
69
+ [`scripts/convert_music3_weights.py`](https://github.com/ddalcu/mlx-serve/blob/main/scripts/convert_music3_weights.py).
70
+
71
+ Weights are covered by the MiniMax-Music3 Community License (see `LICENSE`,
72
+ acceptable-use policy included as Exhibit A).
condition_encoder.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ba4587728bd7ab700d5c12d2a38f4dc5af63d43091b3ed796a9d3e190c2ff7c8
3
+ size 100671864
config.json ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "minimax_music3",
3
+ "quant": "8bit",
4
+ "group_size": 64,
5
+ "frame_rate": 25.0,
6
+ "latent_rate": 86.1328125,
7
+ "sample_rate": 44100,
8
+ "max_frames": 9000,
9
+ "max_text_tokens": 5000,
10
+ "num_codebooks": 8,
11
+ "semantic_vocab_size": 16384,
12
+ "audio_vocab_size": 1024,
13
+ "language_model": {
14
+ "hidden_size": 4096,
15
+ "num_hidden_layers": 36,
16
+ "num_attention_heads": 32,
17
+ "num_key_value_heads": 8,
18
+ "head_dim": 128,
19
+ "intermediate_size": 12288,
20
+ "vocab_size": 200000,
21
+ "rms_norm_eps": 1e-06,
22
+ "rope_theta": 1000000,
23
+ "max_position_embeddings": 10240
24
+ },
25
+ "rvq_depth_decoder": {
26
+ "hidden_size": 4096,
27
+ "intermediate_size": 6144,
28
+ "num_attention_heads": 16,
29
+ "num_layers": 4,
30
+ "max_position_embeddings": 16
31
+ },
32
+ "transformer": {
33
+ "num_layers": 36,
34
+ "num_attention_heads": 32,
35
+ "attention_head_dim": 64,
36
+ "hidden_size": 2048,
37
+ "ff_inner_dim": 8192,
38
+ "in_channels": 128,
39
+ "condition_dim": 2048,
40
+ "fourier_embedding_dim": 256,
41
+ "rotary_dim": 32
42
+ },
43
+ "condition_encoder": {
44
+ "condition_hidden_dim": 4096,
45
+ "out_dim": 2048,
46
+ "num_condition_layers": 8,
47
+ "input_hop_length": 960,
48
+ "input_sampling_rate": 24000,
49
+ "output_hop_length": 512,
50
+ "output_sampling_rate": 44100
51
+ },
52
+ "vocoder": {
53
+ "latent_channels": 128,
54
+ "decoder_input_dim": 1024,
55
+ "decoder_hidden_dim": 1536,
56
+ "upsampling_ratios": [
57
+ 8,
58
+ 8,
59
+ 4,
60
+ 2
61
+ ]
62
+ },
63
+ "scheduler": {
64
+ "type": "flow_match_euler_discrete",
65
+ "num_train_timesteps": 1,
66
+ "shift": 1.0,
67
+ "invert_sigmas": true
68
+ }
69
+ }
language_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0c10335dfc0f591f5a139ff40bcfd21614932dee8d91d5433c9995d1bbcf001
3
+ size 9889398049
music_tokenizer/added_tokens.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</think>": 151668,
3
+ "</tool_call>": 151658,
4
+ "</tool_response>": 151666,
5
+ "<think>": 151667,
6
+ "<tool_call>": 151657,
7
+ "<tool_response>": 151665,
8
+ "<|audio_end|>": 151670,
9
+ "<|audio_start|>": 151669,
10
+ "<|box_end|>": 151649,
11
+ "<|box_start|>": 151648,
12
+ "<|caption_end|>": 151672,
13
+ "<|caption_start|>": 151671,
14
+ "<|endoftext|>": 151643,
15
+ "<|file_sep|>": 151664,
16
+ "<|fim_middle|>": 151660,
17
+ "<|fim_pad|>": 151662,
18
+ "<|fim_prefix|>": 151659,
19
+ "<|fim_suffix|>": 151661,
20
+ "<|im_end|>": 151645,
21
+ "<|im_start|>": 151644,
22
+ "<|image_pad|>": 151655,
23
+ "<|lyrics_end|>": 151674,
24
+ "<|lyrics_start|>": 151673,
25
+ "<|object_ref_end|>": 151647,
26
+ "<|object_ref_start|>": 151646,
27
+ "<|quad_end|>": 151651,
28
+ "<|quad_start|>": 151650,
29
+ "<|repo_name|>": 151663,
30
+ "<|video_pad|>": 151656,
31
+ "<|vision_end|>": 151653,
32
+ "<|audio_cfg|>": 151654,
33
+ "<|vision_start|>": 151652
34
+ }
music_tokenizer/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
music_tokenizer/special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|audio_cfg|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|endoftext|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
music_tokenizer/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc63169ebf49c476995ced3f3dbae68f93ed9cf2a2997d3658863672f2f05f0f
3
+ size 11423806
music_tokenizer/tokenizer_config.json ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "151643": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "151644": {
14
+ "content": "<|im_start|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "151645": {
22
+ "content": "<|im_end|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "151646": {
30
+ "content": "<|object_ref_start|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "151647": {
38
+ "content": "<|object_ref_end|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "151648": {
46
+ "content": "<|box_start|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "151649": {
54
+ "content": "<|box_end|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "151650": {
62
+ "content": "<|quad_start|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "151651": {
70
+ "content": "<|quad_end|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "151652": {
78
+ "content": "<|vision_start|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "151653": {
86
+ "content": "<|vision_end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "151654": {
94
+ "content": "<|audio_cfg|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "151655": {
102
+ "content": "<|image_pad|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "151656": {
110
+ "content": "<|video_pad|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "151657": {
118
+ "content": "<tool_call>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "151658": {
126
+ "content": "</tool_call>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "151659": {
134
+ "content": "<|fim_prefix|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "151660": {
142
+ "content": "<|fim_middle|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "151661": {
150
+ "content": "<|fim_suffix|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "151662": {
158
+ "content": "<|fim_pad|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "151663": {
166
+ "content": "<|repo_name|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "151664": {
174
+ "content": "<|file_sep|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ },
181
+ "151665": {
182
+ "content": "<tool_response>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": false
188
+ },
189
+ "151666": {
190
+ "content": "</tool_response>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": false
196
+ },
197
+ "151667": {
198
+ "content": "<think>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": false
204
+ },
205
+ "151668": {
206
+ "content": "</think>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": false
212
+ },
213
+ "151669": {
214
+ "content": "<|audio_start|>",
215
+ "lstrip": false,
216
+ "normalized": false,
217
+ "rstrip": false,
218
+ "single_word": false,
219
+ "special": true
220
+ },
221
+ "151670": {
222
+ "content": "<|audio_end|>",
223
+ "lstrip": false,
224
+ "normalized": false,
225
+ "rstrip": false,
226
+ "single_word": false,
227
+ "special": true
228
+ },
229
+ "151671": {
230
+ "content": "<|caption_start|>",
231
+ "lstrip": false,
232
+ "normalized": false,
233
+ "rstrip": false,
234
+ "single_word": false,
235
+ "special": true
236
+ },
237
+ "151672": {
238
+ "content": "<|caption_end|>",
239
+ "lstrip": false,
240
+ "normalized": false,
241
+ "rstrip": false,
242
+ "single_word": false,
243
+ "special": true
244
+ },
245
+ "151673": {
246
+ "content": "<|lyrics_start|>",
247
+ "lstrip": false,
248
+ "normalized": false,
249
+ "rstrip": false,
250
+ "single_word": false,
251
+ "special": true
252
+ },
253
+ "151674": {
254
+ "content": "<|lyrics_end|>",
255
+ "lstrip": false,
256
+ "normalized": false,
257
+ "rstrip": false,
258
+ "single_word": false,
259
+ "special": true
260
+ }
261
+ },
262
+ "additional_special_tokens": [
263
+ "<|im_start|>",
264
+ "<|im_end|>",
265
+ "<|object_ref_start|>",
266
+ "<|object_ref_end|>",
267
+ "<|box_start|>",
268
+ "<|box_end|>",
269
+ "<|quad_start|>",
270
+ "<|quad_end|>",
271
+ "<|vision_start|>",
272
+ "<|vision_end|>",
273
+ "<|audio_cfg|>",
274
+ "<|image_pad|>",
275
+ "<|video_pad|>"
276
+ ],
277
+ "bos_token": null,
278
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n\\n' }}\n {%- endif %}\n {{- \"# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0].content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if message.content is string %}\n {%- set content = message.content %}\n {%- else %}\n {%- set content = '' %}\n {%- endif %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- endif %}\n{%- endif %}",
279
+ "clean_up_tokenization_spaces": false,
280
+ "eos_token": "<|im_end|>",
281
+ "errors": "replace",
282
+ "extra_special_tokens": {},
283
+ "model_max_length": 131072,
284
+ "pad_token": "<|endoftext|>",
285
+ "split_special_tokens": false,
286
+ "tokenizer_class": "Qwen2Tokenizer",
287
+ "unk_token": null
288
+ }
music_tokenizer/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
rvq_depth_decoder.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:234216889a463e0a34317ef854fb1677d62515ee66cac2c0ef011ebcd0cd5dfe
3
+ size 714034740
tokenizer/chat_template.jinja ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
5
+ {%- endif %}
6
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
7
+ {%- for tool in tools %}
8
+ {{- "\n" }}
9
+ {{- tool | tojson }}
10
+ {%- endfor %}
11
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
12
+ {%- else %}
13
+ {%- if messages[0].role == 'system' %}
14
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
+ {%- endif %}
16
+ {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
+ {%- for message in messages %}
26
+ {%- if message.content is string %}
27
+ {%- set content = message.content %}
28
+ {%- else %}
29
+ {%- set content = '' %}
30
+ {%- endif %}
31
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
32
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
33
+ {%- elif message.role == "assistant" %}
34
+ {%- set reasoning_content = '' %}
35
+ {%- if message.reasoning_content is string %}
36
+ {%- set reasoning_content = message.reasoning_content %}
37
+ {%- else %}
38
+ {%- if '</think>' in content %}
39
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
40
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
41
+ {%- endif %}
42
+ {%- endif %}
43
+ {%- if loop.index0 > ns.last_query_index %}
44
+ {%- if loop.last or (not loop.last and reasoning_content) %}
45
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
46
+ {%- else %}
47
+ {{- '<|im_start|>' + message.role + '\n' + content }}
48
+ {%- endif %}
49
+ {%- else %}
50
+ {{- '<|im_start|>' + message.role + '\n' + content }}
51
+ {%- endif %}
52
+ {%- if message.tool_calls %}
53
+ {%- for tool_call in message.tool_calls %}
54
+ {%- if (loop.first and content) or (not loop.first) %}
55
+ {{- '\n' }}
56
+ {%- endif %}
57
+ {%- if tool_call.function %}
58
+ {%- set tool_call = tool_call.function %}
59
+ {%- endif %}
60
+ {{- '<tool_call>\n{"name": "' }}
61
+ {{- tool_call.name }}
62
+ {{- '", "arguments": ' }}
63
+ {%- if tool_call.arguments is string %}
64
+ {{- tool_call.arguments }}
65
+ {%- else %}
66
+ {{- tool_call.arguments | tojson }}
67
+ {%- endif %}
68
+ {{- '}\n</tool_call>' }}
69
+ {%- endfor %}
70
+ {%- endif %}
71
+ {{- '<|im_end|>\n' }}
72
+ {%- elif message.role == "tool" %}
73
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
74
+ {{- '<|im_start|>user' }}
75
+ {%- endif %}
76
+ {{- '\n<tool_response>\n' }}
77
+ {{- content }}
78
+ {{- '\n</tool_response>' }}
79
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
80
+ {{- '<|im_end|>\n' }}
81
+ {%- endif %}
82
+ {%- endif %}
83
+ {%- endfor %}
84
+ {%- if add_generation_prompt %}
85
+ {{- '<|im_start|>assistant\n' }}
86
+ {%- if enable_thinking is defined and enable_thinking is false %}
87
+ {{- '<think>\n\n</think>\n\n' }}
88
+ {%- endif %}
89
+ {%- endif %}
tokenizer/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1537fa9e59a537276ecbc2e12d0438edff635a1f4a4948e679774b5feb3e610
3
+ size 11423801
tokenizer/tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "is_local": true,
9
+ "local_files_only": false,
10
+ "model_max_length": 131072,
11
+ "pad_token": "<|endoftext|>",
12
+ "split_special_tokens": false,
13
+ "tokenizer_class": "Qwen2Tokenizer",
14
+ "unk_token": null
15
+ }
transformer.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a856fb45e76e868d190d82b63cbf4fa2e5122a98763d5b743e3d14a3f4a0ca6c
3
+ size 2604777324
vocoder.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1e8c2a251b29f551df6bd7ae7eb5f7e1484ac7e1b8f67f3cc5cc7b8395777f5
3
+ size 216695115