Text-to-Speech
LiteRT
LiteRT
tts
voice-cloning
voice-design
diffusion
on-device
soniqo
speech-cloud
speech-core
Instructions to use soniqo/VoxCPM2-LiteRT-INT8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use soniqo/VoxCPM2-LiteRT-INT8 with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Add VoxCPM2 LiteRT INT8 smoke-tested bundle
Browse files- config.json +519 -0
- generation_config.json +1 -0
- special_tokens_map.json +81 -0
- tokenization_voxcpm2.py +72 -0
- tokenizer.json +0 -0
- tokenizer_config.json +218 -0
- voxcpm2-audio-decoder.tflite +3 -0
- voxcpm2-audio-encoder.tflite +3 -0
- voxcpm2-text-prefill.tflite +3 -0
- voxcpm2-token-step.tflite +3 -0
config.json
ADDED
|
@@ -0,0 +1,519 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architecture": "voxcpm2",
|
| 3 |
+
"lm_config": {
|
| 4 |
+
"bos_token_id": 1,
|
| 5 |
+
"eos_token_id": 2,
|
| 6 |
+
"hidden_size": 2048,
|
| 7 |
+
"intermediate_size": 6144,
|
| 8 |
+
"max_position_embeddings": 32768,
|
| 9 |
+
"num_attention_heads": 16,
|
| 10 |
+
"num_hidden_layers": 28,
|
| 11 |
+
"num_key_value_heads": 2,
|
| 12 |
+
"rms_norm_eps": 1e-05,
|
| 13 |
+
"rope_theta": 10000,
|
| 14 |
+
"kv_channels": 128,
|
| 15 |
+
"rope_scaling": {
|
| 16 |
+
"type": "longrope",
|
| 17 |
+
"long_factor": [
|
| 18 |
+
0.9977997200264581,
|
| 19 |
+
1.014658295992452,
|
| 20 |
+
1.0349680404997148,
|
| 21 |
+
1.059429246056193,
|
| 22 |
+
1.0888815016813513,
|
| 23 |
+
1.1243301355211495,
|
| 24 |
+
1.166977103606075,
|
| 25 |
+
1.2182568066927284,
|
| 26 |
+
1.2798772354275727,
|
| 27 |
+
1.3538666751582975,
|
| 28 |
+
1.4426259039919596,
|
| 29 |
+
1.5489853358570191,
|
| 30 |
+
1.6762658237220625,
|
| 31 |
+
1.8283407612492941,
|
| 32 |
+
2.0096956085876183,
|
| 33 |
+
2.225478927469756,
|
| 34 |
+
2.481536379650452,
|
| 35 |
+
2.784415934557119,
|
| 36 |
+
3.1413289096347365,
|
| 37 |
+
3.560047844772632,
|
| 38 |
+
4.048719380066383,
|
| 39 |
+
4.615569542115128,
|
| 40 |
+
5.2684819496549835,
|
| 41 |
+
6.014438591970396,
|
| 42 |
+
6.858830049237097,
|
| 43 |
+
7.804668263503327,
|
| 44 |
+
8.851768731513417,
|
| 45 |
+
9.99600492938444,
|
| 46 |
+
11.228766118181639,
|
| 47 |
+
12.536757560834843,
|
| 48 |
+
13.902257701387796,
|
| 49 |
+
15.303885189125953,
|
| 50 |
+
16.717837610115794,
|
| 51 |
+
18.119465097853947,
|
| 52 |
+
19.484965238406907,
|
| 53 |
+
20.792956681060105,
|
| 54 |
+
22.02571786985731,
|
| 55 |
+
23.16995406772833,
|
| 56 |
+
24.217054535738416,
|
| 57 |
+
25.16289275000465,
|
| 58 |
+
26.007284207271347,
|
| 59 |
+
26.753240849586767,
|
| 60 |
+
27.40615325712662,
|
| 61 |
+
27.973003419175363,
|
| 62 |
+
28.461674954469114,
|
| 63 |
+
28.880393889607006,
|
| 64 |
+
29.237306864684626,
|
| 65 |
+
29.540186419591297,
|
| 66 |
+
29.79624387177199,
|
| 67 |
+
30.01202719065413,
|
| 68 |
+
30.193382037992453,
|
| 69 |
+
30.34545697551969,
|
| 70 |
+
30.47273746338473,
|
| 71 |
+
30.579096895249787,
|
| 72 |
+
30.66785612408345,
|
| 73 |
+
30.741845563814174,
|
| 74 |
+
30.80346599254902,
|
| 75 |
+
30.85474569563567,
|
| 76 |
+
30.897392663720595,
|
| 77 |
+
30.932841297560394,
|
| 78 |
+
30.962293553185553,
|
| 79 |
+
30.986754758742034,
|
| 80 |
+
31.007064503249293,
|
| 81 |
+
31.02392307921529
|
| 82 |
+
],
|
| 83 |
+
"short_factor": [
|
| 84 |
+
0.9977997200264581,
|
| 85 |
+
1.014658295992452,
|
| 86 |
+
1.0349680404997148,
|
| 87 |
+
1.059429246056193,
|
| 88 |
+
1.0888815016813513,
|
| 89 |
+
1.1243301355211495,
|
| 90 |
+
1.166977103606075,
|
| 91 |
+
1.2182568066927284,
|
| 92 |
+
1.2798772354275727,
|
| 93 |
+
1.3538666751582975,
|
| 94 |
+
1.4426259039919596,
|
| 95 |
+
1.5489853358570191,
|
| 96 |
+
1.6762658237220625,
|
| 97 |
+
1.8283407612492941,
|
| 98 |
+
2.0096956085876183,
|
| 99 |
+
2.225478927469756,
|
| 100 |
+
2.481536379650452,
|
| 101 |
+
2.784415934557119,
|
| 102 |
+
3.1413289096347365,
|
| 103 |
+
3.560047844772632,
|
| 104 |
+
4.048719380066383,
|
| 105 |
+
4.615569542115128,
|
| 106 |
+
5.2684819496549835,
|
| 107 |
+
6.014438591970396,
|
| 108 |
+
6.858830049237097,
|
| 109 |
+
7.804668263503327,
|
| 110 |
+
8.851768731513417,
|
| 111 |
+
9.99600492938444,
|
| 112 |
+
11.228766118181639,
|
| 113 |
+
12.536757560834843,
|
| 114 |
+
13.902257701387796,
|
| 115 |
+
15.303885189125953,
|
| 116 |
+
16.717837610115794,
|
| 117 |
+
18.119465097853947,
|
| 118 |
+
19.484965238406907,
|
| 119 |
+
20.792956681060105,
|
| 120 |
+
22.02571786985731,
|
| 121 |
+
23.16995406772833,
|
| 122 |
+
24.217054535738416,
|
| 123 |
+
25.16289275000465,
|
| 124 |
+
26.007284207271347,
|
| 125 |
+
26.753240849586767,
|
| 126 |
+
27.40615325712662,
|
| 127 |
+
27.973003419175363,
|
| 128 |
+
28.461674954469114,
|
| 129 |
+
28.880393889607006,
|
| 130 |
+
29.237306864684626,
|
| 131 |
+
29.540186419591297,
|
| 132 |
+
29.79624387177199,
|
| 133 |
+
30.01202719065413,
|
| 134 |
+
30.193382037992453,
|
| 135 |
+
30.34545697551969,
|
| 136 |
+
30.47273746338473,
|
| 137 |
+
30.579096895249787,
|
| 138 |
+
30.66785612408345,
|
| 139 |
+
30.741845563814174,
|
| 140 |
+
30.80346599254902,
|
| 141 |
+
30.85474569563567,
|
| 142 |
+
30.897392663720595,
|
| 143 |
+
30.932841297560394,
|
| 144 |
+
30.962293553185553,
|
| 145 |
+
30.986754758742034,
|
| 146 |
+
31.007064503249293,
|
| 147 |
+
31.02392307921529
|
| 148 |
+
],
|
| 149 |
+
"original_max_position_embeddings": 32768
|
| 150 |
+
},
|
| 151 |
+
"vocab_size": 73448,
|
| 152 |
+
"use_mup": false,
|
| 153 |
+
"scale_emb": 12,
|
| 154 |
+
"dim_model_base": 256,
|
| 155 |
+
"scale_depth": 1.4
|
| 156 |
+
},
|
| 157 |
+
"patch_size": 4,
|
| 158 |
+
"feat_dim": 64,
|
| 159 |
+
"scalar_quantization_latent_dim": 512,
|
| 160 |
+
"scalar_quantization_scale": 9,
|
| 161 |
+
"residual_lm_num_layers": 8,
|
| 162 |
+
"residual_lm_no_rope": true,
|
| 163 |
+
"encoder_config": {
|
| 164 |
+
"hidden_dim": 1024,
|
| 165 |
+
"ffn_dim": 4096,
|
| 166 |
+
"num_heads": 16,
|
| 167 |
+
"num_layers": 12,
|
| 168 |
+
"kv_channels": 128
|
| 169 |
+
},
|
| 170 |
+
"dit_config": {
|
| 171 |
+
"hidden_dim": 1024,
|
| 172 |
+
"ffn_dim": 4096,
|
| 173 |
+
"num_heads": 16,
|
| 174 |
+
"num_layers": 12,
|
| 175 |
+
"kv_channels": 128,
|
| 176 |
+
"mean_mode": false,
|
| 177 |
+
"cfm_config": {
|
| 178 |
+
"sigma_min": 1e-06,
|
| 179 |
+
"solver": "euler",
|
| 180 |
+
"t_scheduler": "log-norm",
|
| 181 |
+
"inference_cfg_rate": 2.0
|
| 182 |
+
}
|
| 183 |
+
},
|
| 184 |
+
"audio_vae_config": {
|
| 185 |
+
"encoder_dim": 128,
|
| 186 |
+
"encoder_rates": [
|
| 187 |
+
2,
|
| 188 |
+
5,
|
| 189 |
+
8,
|
| 190 |
+
8
|
| 191 |
+
],
|
| 192 |
+
"latent_dim": 64,
|
| 193 |
+
"decoder_dim": 2048,
|
| 194 |
+
"decoder_rates": [
|
| 195 |
+
8,
|
| 196 |
+
6,
|
| 197 |
+
5,
|
| 198 |
+
2,
|
| 199 |
+
2,
|
| 200 |
+
2
|
| 201 |
+
],
|
| 202 |
+
"sr_bin_boundaries": [
|
| 203 |
+
20000,
|
| 204 |
+
30000,
|
| 205 |
+
40000
|
| 206 |
+
],
|
| 207 |
+
"sample_rate": 16000,
|
| 208 |
+
"out_sample_rate": 48000
|
| 209 |
+
},
|
| 210 |
+
"max_length": 8192,
|
| 211 |
+
"device": "cuda",
|
| 212 |
+
"dtype": "bfloat16",
|
| 213 |
+
"model": "openbmb/VoxCPM2",
|
| 214 |
+
"format": "litert",
|
| 215 |
+
"variant": "int8",
|
| 216 |
+
"sample_rate": 48000,
|
| 217 |
+
"audio_conditioning_sample_rate": 16000,
|
| 218 |
+
"text_tokenizer": "tokenizer.json",
|
| 219 |
+
"max_text_tokens": 256,
|
| 220 |
+
"max_generated_tokens": 2048,
|
| 221 |
+
"default_inference_timesteps": 10,
|
| 222 |
+
"default_cfg_value": 2.0,
|
| 223 |
+
"files": {
|
| 224 |
+
"text_prefill": "voxcpm2-text-prefill.tflite",
|
| 225 |
+
"token_step": "voxcpm2-token-step.tflite",
|
| 226 |
+
"audio_encoder": "voxcpm2-audio-encoder.tflite",
|
| 227 |
+
"audio_decoder": "voxcpm2-audio-decoder.tflite"
|
| 228 |
+
},
|
| 229 |
+
"export": {
|
| 230 |
+
"source_repo": "openbmb/VoxCPM2",
|
| 231 |
+
"voxcpm_src_required": true,
|
| 232 |
+
"token_step_cache_contract": "[2, layers, batch, kv_heads, max_cache_length, head_dim]",
|
| 233 |
+
"token_step_status": "experimental until litert_torch cache lowering is verified"
|
| 234 |
+
},
|
| 235 |
+
"inputs": {
|
| 236 |
+
"text_prefill": {
|
| 237 |
+
"text_tokens": {
|
| 238 |
+
"dtype": "int64",
|
| 239 |
+
"rank": 2,
|
| 240 |
+
"shape": [
|
| 241 |
+
1,
|
| 242 |
+
256
|
| 243 |
+
],
|
| 244 |
+
"name": "serving_default_args_0"
|
| 245 |
+
},
|
| 246 |
+
"text_mask": {
|
| 247 |
+
"dtype": "float32",
|
| 248 |
+
"rank": 2,
|
| 249 |
+
"shape": [
|
| 250 |
+
1,
|
| 251 |
+
256
|
| 252 |
+
],
|
| 253 |
+
"name": "serving_default_args_1"
|
| 254 |
+
},
|
| 255 |
+
"audio_feats": {
|
| 256 |
+
"dtype": "float32",
|
| 257 |
+
"rank": 4,
|
| 258 |
+
"shape": [
|
| 259 |
+
1,
|
| 260 |
+
256,
|
| 261 |
+
4,
|
| 262 |
+
64
|
| 263 |
+
],
|
| 264 |
+
"name": "serving_default_args_2"
|
| 265 |
+
},
|
| 266 |
+
"audio_mask": {
|
| 267 |
+
"dtype": "float32",
|
| 268 |
+
"rank": 2,
|
| 269 |
+
"shape": [
|
| 270 |
+
1,
|
| 271 |
+
256
|
| 272 |
+
],
|
| 273 |
+
"name": "serving_default_args_3"
|
| 274 |
+
}
|
| 275 |
+
},
|
| 276 |
+
"token_step": {
|
| 277 |
+
"lm_hidden": {
|
| 278 |
+
"dtype": "float32",
|
| 279 |
+
"rank": 2,
|
| 280 |
+
"shape": [
|
| 281 |
+
1,
|
| 282 |
+
2048
|
| 283 |
+
],
|
| 284 |
+
"name": "serving_default_args_0"
|
| 285 |
+
},
|
| 286 |
+
"residual_hidden": {
|
| 287 |
+
"dtype": "float32",
|
| 288 |
+
"rank": 2,
|
| 289 |
+
"shape": [
|
| 290 |
+
1,
|
| 291 |
+
2048
|
| 292 |
+
],
|
| 293 |
+
"name": "serving_default_args_1"
|
| 294 |
+
},
|
| 295 |
+
"prefix_feat_cond": {
|
| 296 |
+
"dtype": "float32",
|
| 297 |
+
"rank": 3,
|
| 298 |
+
"shape": [
|
| 299 |
+
1,
|
| 300 |
+
4,
|
| 301 |
+
64
|
| 302 |
+
],
|
| 303 |
+
"name": "serving_default_args_2"
|
| 304 |
+
},
|
| 305 |
+
"base_cache": {
|
| 306 |
+
"dtype": "float32",
|
| 307 |
+
"rank": 6,
|
| 308 |
+
"shape": [
|
| 309 |
+
2,
|
| 310 |
+
28,
|
| 311 |
+
1,
|
| 312 |
+
2,
|
| 313 |
+
2304,
|
| 314 |
+
128
|
| 315 |
+
],
|
| 316 |
+
"name": "serving_default_args_3"
|
| 317 |
+
},
|
| 318 |
+
"residual_cache": {
|
| 319 |
+
"dtype": "float32",
|
| 320 |
+
"rank": 6,
|
| 321 |
+
"shape": [
|
| 322 |
+
2,
|
| 323 |
+
8,
|
| 324 |
+
1,
|
| 325 |
+
2,
|
| 326 |
+
2304,
|
| 327 |
+
128
|
| 328 |
+
],
|
| 329 |
+
"name": "serving_default_args_4"
|
| 330 |
+
},
|
| 331 |
+
"position_id": {
|
| 332 |
+
"dtype": "int64",
|
| 333 |
+
"rank": 0,
|
| 334 |
+
"shape": [],
|
| 335 |
+
"name": "serving_default_args_5"
|
| 336 |
+
},
|
| 337 |
+
"noise": {
|
| 338 |
+
"dtype": "float32",
|
| 339 |
+
"rank": 3,
|
| 340 |
+
"shape": [
|
| 341 |
+
1,
|
| 342 |
+
64,
|
| 343 |
+
4
|
| 344 |
+
],
|
| 345 |
+
"name": "serving_default_args_6"
|
| 346 |
+
}
|
| 347 |
+
},
|
| 348 |
+
"audio_encoder": {
|
| 349 |
+
"audio": {
|
| 350 |
+
"dtype": "float32",
|
| 351 |
+
"rank": 2,
|
| 352 |
+
"shape": [
|
| 353 |
+
1,
|
| 354 |
+
102400
|
| 355 |
+
],
|
| 356 |
+
"name": "serving_default_args_0"
|
| 357 |
+
}
|
| 358 |
+
},
|
| 359 |
+
"audio_decoder": {
|
| 360 |
+
"latent": {
|
| 361 |
+
"dtype": "float32",
|
| 362 |
+
"rank": 3,
|
| 363 |
+
"shape": [
|
| 364 |
+
1,
|
| 365 |
+
64,
|
| 366 |
+
256
|
| 367 |
+
],
|
| 368 |
+
"name": "serving_default_args_0"
|
| 369 |
+
}
|
| 370 |
+
}
|
| 371 |
+
},
|
| 372 |
+
"outputs": {
|
| 373 |
+
"text_prefill": {
|
| 374 |
+
"lm_hidden": {
|
| 375 |
+
"dtype": "float32",
|
| 376 |
+
"rank": 2,
|
| 377 |
+
"shape": [
|
| 378 |
+
1,
|
| 379 |
+
2048
|
| 380 |
+
],
|
| 381 |
+
"name": "serving_default_output_0_output"
|
| 382 |
+
},
|
| 383 |
+
"residual_hidden": {
|
| 384 |
+
"dtype": "float32",
|
| 385 |
+
"rank": 2,
|
| 386 |
+
"shape": [
|
| 387 |
+
1,
|
| 388 |
+
2048
|
| 389 |
+
],
|
| 390 |
+
"name": "serving_default_output_1_output"
|
| 391 |
+
},
|
| 392 |
+
"prefix_feat_cond": {
|
| 393 |
+
"dtype": "float32",
|
| 394 |
+
"rank": 3,
|
| 395 |
+
"shape": [
|
| 396 |
+
1,
|
| 397 |
+
4,
|
| 398 |
+
64
|
| 399 |
+
],
|
| 400 |
+
"name": "serving_default_output_2_output"
|
| 401 |
+
},
|
| 402 |
+
"base_cache": {
|
| 403 |
+
"dtype": "float32",
|
| 404 |
+
"rank": 6,
|
| 405 |
+
"shape": [
|
| 406 |
+
2,
|
| 407 |
+
28,
|
| 408 |
+
1,
|
| 409 |
+
2,
|
| 410 |
+
256,
|
| 411 |
+
128
|
| 412 |
+
],
|
| 413 |
+
"name": "serving_default_output_3_output"
|
| 414 |
+
},
|
| 415 |
+
"residual_cache": {
|
| 416 |
+
"dtype": "float32",
|
| 417 |
+
"rank": 6,
|
| 418 |
+
"shape": [
|
| 419 |
+
2,
|
| 420 |
+
8,
|
| 421 |
+
1,
|
| 422 |
+
2,
|
| 423 |
+
256,
|
| 424 |
+
128
|
| 425 |
+
],
|
| 426 |
+
"name": "serving_default_output_4_output"
|
| 427 |
+
}
|
| 428 |
+
},
|
| 429 |
+
"token_step": {
|
| 430 |
+
"pred_feat": {
|
| 431 |
+
"dtype": "float32",
|
| 432 |
+
"rank": 3,
|
| 433 |
+
"shape": [
|
| 434 |
+
1,
|
| 435 |
+
4,
|
| 436 |
+
64
|
| 437 |
+
],
|
| 438 |
+
"name": "serving_default_output_0_output"
|
| 439 |
+
},
|
| 440 |
+
"stop_logits": {
|
| 441 |
+
"dtype": "float32",
|
| 442 |
+
"rank": 2,
|
| 443 |
+
"shape": [
|
| 444 |
+
1,
|
| 445 |
+
2
|
| 446 |
+
],
|
| 447 |
+
"name": "serving_default_output_1_output"
|
| 448 |
+
},
|
| 449 |
+
"next_lm_hidden": {
|
| 450 |
+
"dtype": "float32",
|
| 451 |
+
"rank": 2,
|
| 452 |
+
"shape": [
|
| 453 |
+
1,
|
| 454 |
+
2048
|
| 455 |
+
],
|
| 456 |
+
"name": "serving_default_output_2_output"
|
| 457 |
+
},
|
| 458 |
+
"next_residual_hidden": {
|
| 459 |
+
"dtype": "float32",
|
| 460 |
+
"rank": 2,
|
| 461 |
+
"shape": [
|
| 462 |
+
1,
|
| 463 |
+
2048
|
| 464 |
+
],
|
| 465 |
+
"name": "serving_default_output_3_output"
|
| 466 |
+
},
|
| 467 |
+
"base_cache": {
|
| 468 |
+
"dtype": "float32",
|
| 469 |
+
"rank": 6,
|
| 470 |
+
"shape": [
|
| 471 |
+
2,
|
| 472 |
+
28,
|
| 473 |
+
1,
|
| 474 |
+
2,
|
| 475 |
+
2304,
|
| 476 |
+
128
|
| 477 |
+
],
|
| 478 |
+
"name": "serving_default_output_4_output"
|
| 479 |
+
},
|
| 480 |
+
"residual_cache": {
|
| 481 |
+
"dtype": "float32",
|
| 482 |
+
"rank": 6,
|
| 483 |
+
"shape": [
|
| 484 |
+
2,
|
| 485 |
+
8,
|
| 486 |
+
1,
|
| 487 |
+
2,
|
| 488 |
+
2304,
|
| 489 |
+
128
|
| 490 |
+
],
|
| 491 |
+
"name": "serving_default_output_5_output"
|
| 492 |
+
}
|
| 493 |
+
},
|
| 494 |
+
"audio_encoder": {
|
| 495 |
+
"audio_feats": {
|
| 496 |
+
"dtype": "float32",
|
| 497 |
+
"rank": 4,
|
| 498 |
+
"shape": [
|
| 499 |
+
1,
|
| 500 |
+
40,
|
| 501 |
+
4,
|
| 502 |
+
64
|
| 503 |
+
],
|
| 504 |
+
"name": "serving_default_output_0_output"
|
| 505 |
+
}
|
| 506 |
+
},
|
| 507 |
+
"audio_decoder": {
|
| 508 |
+
"pcm": {
|
| 509 |
+
"dtype": "float32",
|
| 510 |
+
"rank": 2,
|
| 511 |
+
"shape": [
|
| 512 |
+
1,
|
| 513 |
+
491520
|
| 514 |
+
],
|
| 515 |
+
"name": "serving_default_output_0_output"
|
| 516 |
+
}
|
| 517 |
+
}
|
| 518 |
+
}
|
| 519 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
{
|
| 4 |
+
"content": "<|im_end|>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"content": "<|im_start|>",
|
| 12 |
+
"lstrip": false,
|
| 13 |
+
"normalized": false,
|
| 14 |
+
"rstrip": false,
|
| 15 |
+
"single_word": false
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"content": "<|tool_call|>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"content": "<|execute_start|>",
|
| 26 |
+
"lstrip": false,
|
| 27 |
+
"normalized": false,
|
| 28 |
+
"rstrip": false,
|
| 29 |
+
"single_word": false
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"content": "<|execute_end|>",
|
| 33 |
+
"lstrip": false,
|
| 34 |
+
"normalized": false,
|
| 35 |
+
"rstrip": false,
|
| 36 |
+
"single_word": false
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"content": "<|fim_prefix|>",
|
| 40 |
+
"lstrip": false,
|
| 41 |
+
"normalized": false,
|
| 42 |
+
"rstrip": false,
|
| 43 |
+
"single_word": false
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
"content": "<|fim_middle|>",
|
| 47 |
+
"lstrip": false,
|
| 48 |
+
"normalized": false,
|
| 49 |
+
"rstrip": false,
|
| 50 |
+
"single_word": false
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"content": "<|fim_suffix|>",
|
| 54 |
+
"lstrip": false,
|
| 55 |
+
"normalized": false,
|
| 56 |
+
"rstrip": false,
|
| 57 |
+
"single_word": false
|
| 58 |
+
}
|
| 59 |
+
],
|
| 60 |
+
"bos_token": {
|
| 61 |
+
"content": "<s>",
|
| 62 |
+
"lstrip": false,
|
| 63 |
+
"normalized": false,
|
| 64 |
+
"rstrip": false,
|
| 65 |
+
"single_word": false
|
| 66 |
+
},
|
| 67 |
+
"eos_token": {
|
| 68 |
+
"content": "</s>",
|
| 69 |
+
"lstrip": false,
|
| 70 |
+
"normalized": false,
|
| 71 |
+
"rstrip": false,
|
| 72 |
+
"single_word": false
|
| 73 |
+
},
|
| 74 |
+
"unk_token": {
|
| 75 |
+
"content": "<unk>",
|
| 76 |
+
"lstrip": false,
|
| 77 |
+
"normalized": false,
|
| 78 |
+
"rstrip": false,
|
| 79 |
+
"single_word": false
|
| 80 |
+
}
|
| 81 |
+
}
|
tokenization_voxcpm2.py
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Custom tokenizer for VoxCPM2 that splits multi-character Chinese tokens.
|
| 2 |
+
|
| 3 |
+
VoxCPM2 was trained with ``mask_multichar_chinese_tokens`` which splits
|
| 4 |
+
multi-character Chinese tokens (e.g. "你好" -> ["你", "好"]) into individual
|
| 5 |
+
character IDs before embedding. The base LlamaTokenizerFast produces
|
| 6 |
+
multi-character Chinese tokens that the model has never seen during training,
|
| 7 |
+
yielding garbled Chinese audio output in downstream inference frameworks.
|
| 8 |
+
|
| 9 |
+
This module provides ``VoxCPM2Tokenizer`` which transparently applies the
|
| 10 |
+
character splitting inside ``encode()`` and ``__call__()``, so any downstream
|
| 11 |
+
consumer (vLLM, vLLM-Omni, Nano-vLLM, etc.) gets correct single-character
|
| 12 |
+
IDs without code changes.
|
| 13 |
+
"""
|
| 14 |
+
|
| 15 |
+
from transformers import LlamaTokenizerFast
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
class VoxCPM2Tokenizer(LlamaTokenizerFast):
|
| 19 |
+
|
| 20 |
+
def __init__(self, *args, **kwargs):
|
| 21 |
+
super().__init__(*args, **kwargs)
|
| 22 |
+
self._split_map = self._build_split_map()
|
| 23 |
+
|
| 24 |
+
def _build_split_map(self) -> dict[int, list[int]]:
|
| 25 |
+
vocab = self.get_vocab()
|
| 26 |
+
split_map: dict[int, list[int]] = {}
|
| 27 |
+
for token, tid in vocab.items():
|
| 28 |
+
clean = token.replace("\u2581", "")
|
| 29 |
+
if len(clean) >= 2 and all(self._is_cjk(c) for c in clean):
|
| 30 |
+
char_ids = self.convert_tokens_to_ids(list(clean))
|
| 31 |
+
if all(c != self.unk_token_id for c in char_ids):
|
| 32 |
+
split_map[tid] = char_ids
|
| 33 |
+
return split_map
|
| 34 |
+
|
| 35 |
+
@staticmethod
|
| 36 |
+
def _is_cjk(c: str) -> bool:
|
| 37 |
+
return (
|
| 38 |
+
"\u4e00" <= c <= "\u9fff"
|
| 39 |
+
or "\u3400" <= c <= "\u4dbf"
|
| 40 |
+
or "\uf900" <= c <= "\ufaff"
|
| 41 |
+
or "\U00020000" <= c <= "\U0002a6df"
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
def _expand_ids(self, ids: list[int]) -> list[int]:
|
| 45 |
+
result: list[int] = []
|
| 46 |
+
for tid in ids:
|
| 47 |
+
expansion = self._split_map.get(tid)
|
| 48 |
+
if expansion is not None:
|
| 49 |
+
result.extend(expansion)
|
| 50 |
+
else:
|
| 51 |
+
result.append(tid)
|
| 52 |
+
return result
|
| 53 |
+
|
| 54 |
+
def encode(self, text, *args, **kwargs):
|
| 55 |
+
ids = super().encode(text, *args, **kwargs)
|
| 56 |
+
return self._expand_ids(ids)
|
| 57 |
+
|
| 58 |
+
def __call__(self, text, *args, **kwargs):
|
| 59 |
+
result = super().__call__(text, *args, **kwargs)
|
| 60 |
+
if hasattr(result, "input_ids"):
|
| 61 |
+
ids = result["input_ids"]
|
| 62 |
+
if isinstance(ids, list) and ids and isinstance(ids[0], list):
|
| 63 |
+
result["input_ids"] = [self._expand_ids(x) for x in ids]
|
| 64 |
+
if "attention_mask" in result:
|
| 65 |
+
result["attention_mask"] = [
|
| 66 |
+
[1] * len(x) for x in result["input_ids"]
|
| 67 |
+
]
|
| 68 |
+
elif isinstance(ids, list):
|
| 69 |
+
result["input_ids"] = self._expand_ids(ids)
|
| 70 |
+
if "attention_mask" in result:
|
| 71 |
+
result["attention_mask"] = [1] * len(result["input_ids"])
|
| 72 |
+
return result
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"added_tokens_decoder": {
|
| 5 |
+
"0": {
|
| 6 |
+
"content": "<unk>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false,
|
| 11 |
+
"special": true
|
| 12 |
+
},
|
| 13 |
+
"1": {
|
| 14 |
+
"content": "<s>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": false,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false,
|
| 19 |
+
"special": true
|
| 20 |
+
},
|
| 21 |
+
"2": {
|
| 22 |
+
"content": "</s>",
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"normalized": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"single_word": false,
|
| 27 |
+
"special": true
|
| 28 |
+
},
|
| 29 |
+
"101": {
|
| 30 |
+
"content": "<|audio_start|>",
|
| 31 |
+
"lstrip": false,
|
| 32 |
+
"normalized": false,
|
| 33 |
+
"rstrip": false,
|
| 34 |
+
"single_word": false,
|
| 35 |
+
"special": true
|
| 36 |
+
},
|
| 37 |
+
"102": {
|
| 38 |
+
"content": "<|audio_end|>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false,
|
| 43 |
+
"special": true
|
| 44 |
+
},
|
| 45 |
+
"103": {
|
| 46 |
+
"content": "<|audio_prompt_start|>",
|
| 47 |
+
"lstrip": false,
|
| 48 |
+
"normalized": false,
|
| 49 |
+
"rstrip": false,
|
| 50 |
+
"single_word": false,
|
| 51 |
+
"special": true
|
| 52 |
+
},
|
| 53 |
+
"104": {
|
| 54 |
+
"content": "<|audio_prompt_end|>",
|
| 55 |
+
"lstrip": false,
|
| 56 |
+
"normalized": false,
|
| 57 |
+
"rstrip": false,
|
| 58 |
+
"single_word": false,
|
| 59 |
+
"special": true
|
| 60 |
+
},
|
| 61 |
+
"105": {
|
| 62 |
+
"content": "<|background|>",
|
| 63 |
+
"lstrip": false,
|
| 64 |
+
"normalized": false,
|
| 65 |
+
"rstrip": false,
|
| 66 |
+
"single_word": false,
|
| 67 |
+
"special": true
|
| 68 |
+
},
|
| 69 |
+
"106": {
|
| 70 |
+
"content": "<|/background|>",
|
| 71 |
+
"lstrip": false,
|
| 72 |
+
"normalized": false,
|
| 73 |
+
"rstrip": false,
|
| 74 |
+
"single_word": false,
|
| 75 |
+
"special": true
|
| 76 |
+
},
|
| 77 |
+
"107": {
|
| 78 |
+
"content": "<|characters|>",
|
| 79 |
+
"lstrip": false,
|
| 80 |
+
"normalized": false,
|
| 81 |
+
"rstrip": false,
|
| 82 |
+
"single_word": false,
|
| 83 |
+
"special": true
|
| 84 |
+
},
|
| 85 |
+
"108": {
|
| 86 |
+
"content": "<|/characters|>",
|
| 87 |
+
"lstrip": false,
|
| 88 |
+
"normalized": false,
|
| 89 |
+
"rstrip": false,
|
| 90 |
+
"single_word": false,
|
| 91 |
+
"special": true
|
| 92 |
+
},
|
| 93 |
+
"109": {
|
| 94 |
+
"content": "<|speaker_id|>",
|
| 95 |
+
"lstrip": false,
|
| 96 |
+
"normalized": false,
|
| 97 |
+
"rstrip": false,
|
| 98 |
+
"single_word": false,
|
| 99 |
+
"special": true
|
| 100 |
+
},
|
| 101 |
+
"110": {
|
| 102 |
+
"content": "<|/speaker_id|>",
|
| 103 |
+
"lstrip": false,
|
| 104 |
+
"normalized": false,
|
| 105 |
+
"rstrip": false,
|
| 106 |
+
"single_word": false,
|
| 107 |
+
"special": true
|
| 108 |
+
},
|
| 109 |
+
"111": {
|
| 110 |
+
"content": "<|span|>",
|
| 111 |
+
"lstrip": false,
|
| 112 |
+
"normalized": false,
|
| 113 |
+
"rstrip": false,
|
| 114 |
+
"single_word": false,
|
| 115 |
+
"special": true
|
| 116 |
+
},
|
| 117 |
+
"112": {
|
| 118 |
+
"content": "<|/span|>",
|
| 119 |
+
"lstrip": false,
|
| 120 |
+
"normalized": false,
|
| 121 |
+
"rstrip": false,
|
| 122 |
+
"single_word": false,
|
| 123 |
+
"special": true
|
| 124 |
+
},
|
| 125 |
+
"73440": {
|
| 126 |
+
"content": "<|im_end|>",
|
| 127 |
+
"lstrip": false,
|
| 128 |
+
"normalized": false,
|
| 129 |
+
"rstrip": false,
|
| 130 |
+
"single_word": false,
|
| 131 |
+
"special": true
|
| 132 |
+
},
|
| 133 |
+
"73441": {
|
| 134 |
+
"content": "<|im_start|>",
|
| 135 |
+
"lstrip": false,
|
| 136 |
+
"normalized": false,
|
| 137 |
+
"rstrip": false,
|
| 138 |
+
"single_word": false,
|
| 139 |
+
"special": true
|
| 140 |
+
},
|
| 141 |
+
"73442": {
|
| 142 |
+
"content": "<|tool_call|>",
|
| 143 |
+
"lstrip": false,
|
| 144 |
+
"normalized": false,
|
| 145 |
+
"rstrip": false,
|
| 146 |
+
"single_word": false,
|
| 147 |
+
"special": true
|
| 148 |
+
},
|
| 149 |
+
"73443": {
|
| 150 |
+
"content": "<|execute_start|>",
|
| 151 |
+
"lstrip": false,
|
| 152 |
+
"normalized": false,
|
| 153 |
+
"rstrip": false,
|
| 154 |
+
"single_word": false,
|
| 155 |
+
"special": true
|
| 156 |
+
},
|
| 157 |
+
"73444": {
|
| 158 |
+
"content": "<|execute_end|>",
|
| 159 |
+
"lstrip": false,
|
| 160 |
+
"normalized": false,
|
| 161 |
+
"rstrip": false,
|
| 162 |
+
"single_word": false,
|
| 163 |
+
"special": true
|
| 164 |
+
},
|
| 165 |
+
"73445": {
|
| 166 |
+
"content": "<|fim_prefix|>",
|
| 167 |
+
"lstrip": false,
|
| 168 |
+
"normalized": false,
|
| 169 |
+
"rstrip": false,
|
| 170 |
+
"single_word": false,
|
| 171 |
+
"special": true
|
| 172 |
+
},
|
| 173 |
+
"73446": {
|
| 174 |
+
"content": "<|fim_middle|>",
|
| 175 |
+
"lstrip": false,
|
| 176 |
+
"normalized": false,
|
| 177 |
+
"rstrip": false,
|
| 178 |
+
"single_word": false,
|
| 179 |
+
"special": true
|
| 180 |
+
},
|
| 181 |
+
"73447": {
|
| 182 |
+
"content": "<|fim_suffix|>",
|
| 183 |
+
"lstrip": false,
|
| 184 |
+
"normalized": false,
|
| 185 |
+
"rstrip": false,
|
| 186 |
+
"single_word": false,
|
| 187 |
+
"special": true
|
| 188 |
+
}
|
| 189 |
+
},
|
| 190 |
+
"additional_special_tokens": [
|
| 191 |
+
"<|im_end|>",
|
| 192 |
+
"<|im_start|>",
|
| 193 |
+
"<|tool_call|>",
|
| 194 |
+
"<|execute_start|>",
|
| 195 |
+
"<|execute_end|>",
|
| 196 |
+
"<|fim_prefix|>",
|
| 197 |
+
"<|fim_middle|>",
|
| 198 |
+
"<|fim_suffix|>"
|
| 199 |
+
],
|
| 200 |
+
"bos_token": "<s>",
|
| 201 |
+
"clean_up_tokenization_spaces": false,
|
| 202 |
+
"eos_token": "<|im_end|>",
|
| 203 |
+
"legacy": true,
|
| 204 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 205 |
+
"pad_token": null,
|
| 206 |
+
"sp_model_kwargs": {},
|
| 207 |
+
"spaces_between_special_tokens": false,
|
| 208 |
+
"tokenizer_class": "VoxCPM2Tokenizer",
|
| 209 |
+
"unk_token": "<unk>",
|
| 210 |
+
"use_default_system_prompt": false,
|
| 211 |
+
"chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
| 212 |
+
"auto_map": {
|
| 213 |
+
"AutoTokenizer": [
|
| 214 |
+
"tokenization_voxcpm2.VoxCPM2Tokenizer",
|
| 215 |
+
null
|
| 216 |
+
]
|
| 217 |
+
}
|
| 218 |
+
}
|
voxcpm2-audio-decoder.tflite
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:16b321a39d51e309b928c9ce10ce9cb4f5e1dacebe3e7e392f0a62721068f1a0
|
| 3 |
+
size 183297616
|
voxcpm2-audio-encoder.tflite
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:adb84c277e4f40ee72705b00279d1c6278776c3a106823d0ce89f813c586cb61
|
| 3 |
+
size 192399596
|
voxcpm2-text-prefill.tflite
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b0352429af5703eae2eb6493ef47ddc8c2aee1a9bed975acc9e72011740af46e
|
| 3 |
+
size 2083033648
|
voxcpm2-token-step.tflite
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2db76504ac52032616406afe3dd97078c35188e4eeffe00c0eecc788f816559c
|
| 3 |
+
size 2189485584
|