mstar.model.omnivoice.config#
Configuration for OmniVoice (k2-fsa/OmniVoice).
OmniVoice is a masked-diffusion TTS model, not an autoregressive one. A Qwen3-0.6B body runs bidirectionally over a fixed-length canvas laid out as
[ style tokens | text tokens | (ref audio tokens) | target MASK tokens ]
where every position carries num_audio_codebook rows. Text positions repeat
the same token id across all rows; audio positions hold one codebook entry per
row. Generation unmasks the target region over num_step iterations and the
Higgs-Audio-v2 codec turns the finished token canvas into a waveform.
The architecture values are facts of the checkpoint’s config.json, hardcoded
so constructing the model never touches the network.
OmniVoiceModel._refresh_checkpoint_defaults re-reads the ones that would
silently break parity if the checkpoint drifted.
Classes
|
The Qwen3 body, read bidirectionally. |
|
OmniVoice model configuration. |
|
Per-request decoding knobs and their defaults. |
- class mstar.model.omnivoice.config.OmniVoiceBackboneConfig(hidden_size=1024, num_hidden_layers=28, num_attention_heads=16, num_key_value_heads=8, head_dim=128, intermediate_size=3072, vocab_size=151676, rms_norm_eps=1e-06, rope_theta=1000000.0, max_position_embeddings=40960, tie_word_embeddings=True)[source]#
Bases:
objectThe Qwen3 body, read bidirectionally.
Identical in shape to
Qwen3ForCausalLMat 0.6B, with two differences that matter at serving time: attention is non-causal (every position sees the whole document, prefix included), and there is no KV cache — the target region changes every diffusion step, and because the prefix attends into that region its hidden states change too, so nothing is reusable across steps.use_cachein the checkpoint config is vestigial.- Parameters:
- class mstar.model.omnivoice.config.OmniVoiceConfig(backbone=<factory>, generation=<factory>, num_audio_codebook=8, audio_vocab_size=1025, audio_mask_id=1024, sample_rate=24000, frame_rate=25.0, max_target_seconds=30.0, max_batch_size=16, max_packed_tokens=24576, load_dtype='float16', checkpoint_dtype=None)[source]#
Bases:
objectOmniVoice model configuration.
- Parameters:
- backbone: OmniVoiceBackboneConfig#
- generation: OmniVoiceGenerationDefaults#
- class mstar.model.omnivoice.config.OmniVoiceGenerationDefaults(num_step=32, guidance_scale=2.0, t_shift=0.1, layer_penalty_factor=5.0, position_temperature=5.0, class_temperature=0.0, denoise=True, max_num_step=64)[source]#
Bases:
objectPer-request decoding knobs and their defaults.
Every one of these is per-request: they ride
step_metadataand are resolved once inOmniVoiceModel.get_initial_forward_pass_args. This is the reason to serve OmniVoice on a graph runtime at all — a fixed-pipeline port has to pick one value for the whole server.- Parameters: