mstar.model.nemotron_duplex.config#
Config dataclasses for NVIDIA NemotronLabs VoiceChat-11B (duplex).
The base checkpoint (nvidia/NVIDIA-NemotronLabs-VoiceChat-11B) is a single
model.safetensors composite of three stages, whose per-stage architecture
dims come from the Spark repo’s per-folder config.json files:
nano/— Nemotron-H hybrid Mamba-2 / attention / MLP LLM (9B)
eartts/— Gemma3-text “talker” transformer + RVQ codec (audio out)(stt) — Fast-Conformer streaming encoder + RNN-T head (audio in)
Only the fields M* actually needs are translated here. Numbers are taken
verbatim from the published nano/config.json / eartts/config.json;
see the module docstrings for the source keys. Anything still unverified
against the NeMo reference (nemotron-labs-voicechat branch of
NVIDIA-NeMo/Speech) is flagged with TODO(verify).
Classes
|
RVQ audio codec ( |
|
Audio-input stage ( |
|
Audio-output stage ( |
|
Nemotron-H backbone ( |
|
Top-level config bundling the stages plus generation defaults. |
|
RNN-T transcription head ( |
- class mstar.model.nemotron_duplex.config.CodecConfig(base_hidden_size=384, channel_mult=(1, 2, 4), codebook_size=1024, groups=1, hop_length=4, kernel_size=7, latent_size=512, n_fft=16, num_blocks=3, num_quantizers=31, rates=(7, 7, 9), wav_to_token_ratio=1764, max_magnitude=100.0)[source]#
Bases:
objectRVQ audio codec (
config.json->model.speech_generation.model.codec_config).The encoder/decoder conv+ConvNeXt-block stacks are derived from these fields (channel schedule from
base_hidden_size*channel_mult, strides fromrates,num_blocksblocks per stage) rather than hardcoded — seeencoder_layers/decoder_layers.- Parameters:
- class mstar.model.nemotron_duplex.config.ConformerSTTConfig(d_model=1024, num_heads=8, num_layers=24, feat_in=128, ff_expansion_factor=4, conv_kernel_size=9, subsampling_conv_channels=256, subsampling_factor=8, att_context_size=(70, 0), output_dim=4480, streaming_lookahead_frames=1, sample_rate=16000, n_fft=512, window_size=0.025, window_stride=0.01, n_mels=128, preemph=0.97, mag_power=2.0)[source]#
Bases:
objectAudio-input stage (
config.json->model.stt.model.perception).Fast-Conformer streaming encoder + mel preprocessor. Encodes 16 kHz speech into LLM-space embeddings (
output_dim); the RNN-T head (RnntConfig) emits the streaming user transcription.- Parameters:
d_model (int)
num_heads (int)
num_layers (int)
feat_in (int)
ff_expansion_factor (int)
conv_kernel_size (int)
subsampling_conv_channels (int)
subsampling_factor (int)
output_dim (int)
streaming_lookahead_frames (int)
sample_rate (int)
n_fft (int)
window_size (float)
window_stride (float)
n_mels (int)
preemph (float)
mag_power (float)
- class mstar.model.nemotron_duplex.config.EarTTSConfig(hidden_size=1152, intermediate_size=4608, num_hidden_layers=28, num_attention_heads=16, num_key_value_heads=16, head_dim=72, kv_head_dim=128, sliding_window=7500, rms_norm_eps=1e-06, query_pre_attn_scalar=256.0, rope_theta_full=1000000.0, rope_theta_local=10000.0, sliding_window_pattern=6, num_quantizers=31, codebook_size=1024, code_dim=512, mog_num_predictions=1024, mog_low_rank=64, mog_min_log_std=-4.0, mog_num_layers=3, mog_intermediate_size=4608, mog_eps=1e-06, mog_exponent=3.0, inference_num_iter=8, inference_guidance_scale=0.5, inference_noise_scale=0.8, inference_top_p=0.8, inference_seed=0, codec_chunk_frames=5, codec_left_context_frames=3, sample_rate=22050)[source]#
Bases:
objectAudio-output stage (
config.json->model.speech_generation.model.tts_config).A Gemma3-text “talker” transformer autoregressively emits RVQ codec codes (
num_quantizerscodebooks ofcodebook_size), then a mixture-of- gaussians (MoG) head over thecode_dimRVQ latent space.- Parameters:
hidden_size (int)
intermediate_size (int)
num_hidden_layers (int)
num_attention_heads (int)
num_key_value_heads (int)
head_dim (int)
kv_head_dim (int)
sliding_window (int)
rms_norm_eps (float)
query_pre_attn_scalar (float)
rope_theta_full (float)
rope_theta_local (float)
sliding_window_pattern (int)
num_quantizers (int)
codebook_size (int)
code_dim (int)
mog_num_predictions (int)
mog_low_rank (int)
mog_min_log_std (float)
mog_num_layers (int)
mog_intermediate_size (int)
mog_eps (float)
mog_exponent (float)
inference_num_iter (int)
inference_guidance_scale (float)
inference_noise_scale (float)
inference_top_p (float)
inference_seed (int)
codec_chunk_frames (int)
codec_left_context_frames (int)
sample_rate (int)
- class mstar.model.nemotron_duplex.config.NanoConfig(num_hidden_layers=56, hidden_size=4480, intermediate_size=15680, vocab_size=131072, rms_norm_eps=1e-05, tie_word_embeddings=False, hybrid_override_pattern='M-M-M-MM-M-M-M*-M-M-M*-M-M-M-M*-M-M-M-M*-M-MM-M-M-M-M-M-', num_attention_heads=40, num_key_value_heads=8, head_dim=128, attention_bias=False, max_position_embeddings=131072, mamba_num_heads=128, mamba_head_dim=80, ssm_state_size=128, conv_kernel=4, n_groups=8, mamba_expand=2, mamba_chunk_size=1, time_step_rank=256, time_step_limit=(0.0, inf), use_conv_bias=True, mamba_proj_bias=False, mamba_hidden_act='silu', mlp_bias=False, mlp_hidden_act='relu2', combined_embed_dim=4480, has_function_head=True, bos_token_id=1, eos_token_id=12, pad_token_id=0, pad_pair_token_id=12)[source]#
Bases:
objectNemotron-H backbone (
nano/config.json,model_type='nemotron_h').hybrid_override_patternis the per-layer type string:M= Mamba-2 mixer,*= self-attention (NoPE),-= MLP (squared-ReLU). Its length equalsnum_hidden_layers.- Parameters:
num_hidden_layers (int)
hidden_size (int)
intermediate_size (int)
vocab_size (int)
rms_norm_eps (float)
tie_word_embeddings (bool)
hybrid_override_pattern (str)
num_attention_heads (int)
num_key_value_heads (int)
head_dim (int)
attention_bias (bool)
max_position_embeddings (int)
mamba_num_heads (int)
mamba_head_dim (int)
ssm_state_size (int)
conv_kernel (int)
n_groups (int)
mamba_expand (int)
mamba_chunk_size (int)
time_step_rank (int)
use_conv_bias (bool)
mamba_proj_bias (bool)
mamba_hidden_act (str)
mlp_bias (bool)
mlp_hidden_act (str)
combined_embed_dim (int)
has_function_head (bool)
bos_token_id (int)
eos_token_id (int)
pad_token_id (int)
pad_pair_token_id (int)
- class mstar.model.nemotron_duplex.config.NemotronDuplexConfig(nano=<factory>, eartts=<factory>, stt=<factory>, codec=<factory>, rnnt=<factory>, temperature=0.7, top_p=0.9, repetition_penalty=1.0, ignore_eos=False, max_new_tokens=2048, agent_text_weight=1.0, user_audio_weight=1.0, function_weight=2.0, use_function_head=True, predict_user_text=False, text_pad_id=12, text_bos_id=1, text_eos_id=2)[source]#
Bases:
objectTop-level config bundling the stages plus generation defaults.
Use
from_pretrained()to populate every sub-config from the checkpoint’sconfig.json; the dataclass defaults mirror that file so dummy-mode / weightless construction still works.- Parameters:
nano (NanoConfig)
eartts (EarTTSConfig)
stt (ConformerSTTConfig)
codec (CodecConfig)
rnnt (RnntConfig)
temperature (float)
top_p (float)
repetition_penalty (float)
ignore_eos (bool)
max_new_tokens (int)
agent_text_weight (float)
user_audio_weight (float)
function_weight (float)
use_function_head (bool)
predict_user_text (bool)
text_pad_id (int)
text_bos_id (int)
text_eos_id (int)
- codec: CodecConfig#
- eartts: EarTTSConfig#
- classmethod from_pretrained(ckpt_dir)[source]#
Build from the checkpoint’s
config.json(NeMo VoiceChat layout).Only the stages whose components read from config are populated here; the rest fall back to dataclass defaults. Extend as modules migrate to config-driven construction.
- Parameters:
ckpt_dir (str)
- Return type:
- nano: NanoConfig#
- rnnt: RnntConfig#
- stt: ConformerSTTConfig#