mstar.model.voxcpm2.config#
Checkpoint-backed configuration for VoxCPM2 (openbmb/VoxCPM2).
config.json describes every component: the MiniCPM-4 text-semantic LM, the
residual acoustic LM, the local encoder and local DiT (both MiniCPM-4 stacks
read bidirectionally), and the AudioVAE V2 (16 kHz in, 48 kHz out). The
dataclasses below mirror that file; anything the checkpoint does not carry is
a generation default of the reference VoxCPM.generate.
Classes
|
|
|
One MiniCPM-4 stack; the residual LM, encoder and DiT override sizes. |
|
- class mstar.model.voxcpm2.config.AudioVAEConfig(encoder_dim: 'int' = 128, encoder_rates: 'tuple[int, ...]' = (2, 5, 8, 8), latent_dim: 'int' = 64, decoder_dim: 'int' = 2048, decoder_rates: 'tuple[int, ...]' = (8, 6, 5, 2, 2, 2), depthwise: 'bool' = True, sample_rate: 'int' = 16000, out_sample_rate: 'int' = 48000, use_noise_block: 'bool' = False, sr_bin_boundaries: 'tuple[int, ...] | None' = (20000, 30000, 40000), cond_type: 'str' = 'scale_bias', cond_dim: 'int' = 128, cond_out_layer: 'bool' = False)[source]#
Bases:
object- Parameters:
- class mstar.model.voxcpm2.config.MiniCPM4Config(hidden_size=2048, intermediate_size=6144, num_hidden_layers=28, num_attention_heads=16, num_key_value_heads=2, head_dim=128, rms_norm_eps=1e-05, vocab_size=73448, rope_theta=10000.0, max_position_embeddings=32768, rope_short_factor=(), rope_long_factor=(), rope_original_max_position_embeddings=32768, no_rope=False, use_mup=False)[source]#
Bases:
objectOne MiniCPM-4 stack; the residual LM, encoder and DiT override sizes.
- Parameters:
- resized(*, hidden_size, intermediate_size, num_attention_heads, num_hidden_layers, head_dim)[source]#
A stack sharing this one’s RoPE, norms and KV head count (the reference deep-copies
lm_configand overrides the sizes).
- class mstar.model.voxcpm2.config.VoxCPM2Config(lm: 'MiniCPM4Config' = <factory>, residual: 'MiniCPM4Config' = <factory>, encoder: 'MiniCPM4Config' = <factory>, dit: 'MiniCPM4Config' = <factory>, audio_vae: 'AudioVAEConfig' = <factory>, patch_size: 'int' = 4, feat_dim: 'int' = 64, fsq_latent_dim: 'int' = 512, fsq_scale: 'int' = 9, dit_mean_mode: 'bool' = False, max_length: 'int' = 8192, cfg_value: 'float' = 2.0, inference_timesteps: 'int' = 10, min_len: 'int' = 2, max_len: 'int' = 4096, max_len_ratio: 'float' = 6.0, prompt_context_patches: 'int' = 3)[source]#
Bases:
object- Parameters:
lm (MiniCPM4Config)
residual (MiniCPM4Config)
encoder (MiniCPM4Config)
dit (MiniCPM4Config)
audio_vae (AudioVAEConfig)
patch_size (int)
feat_dim (int)
fsq_latent_dim (int)
fsq_scale (int)
dit_mean_mode (bool)
max_length (int)
cfg_value (float)
inference_timesteps (int)
min_len (int)
max_len (int)
max_len_ratio (float)
prompt_context_patches (int)
- audio_vae: AudioVAEConfig#
- dit: MiniCPM4Config#
- encoder: MiniCPM4Config#
- lm: MiniCPM4Config#
- residual: MiniCPM4Config#