Skip to content

Add an AutoModel Path for EMTTS In Addition to Local NemotronH file - #16036

Open
blisc wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
blisc:jasoli/easymagpie-automodel
Open

Add an AutoModel Path for EMTTS In Addition to Local NemotronH file#16036
blisc wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
blisc:jasoli/easymagpie-automodel

Conversation

@blisc

@blisc blisc commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do ?

Add an AutoModel Path for EMTTS In Addition to Local NemotronH file

Collection: tts

Changelog

  • Add an AutoModel Path for EMTTS In Addition to Local NemotronH file

PR Type:

  • New Feature
  • Bugfix
  • Documentation

Signed-off-by: Jason <jasoli@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: Jason <jasoli@nvidia.com>
@github-actions github-actions Bot added the TTS label Aug 5, 2026
"""

@staticmethod
def _to_container(cfg_value):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO would be cleaner to have some of these utilities as private free functions at the bottom of the file rather than class-level static methods. My rule of thumb: if it's generic (eg config/dict manipulation), make it a function; if it's tightly coupled with the class, make it a method.

logging.info("NeMo AutoModel kwargs: %s", automodel_kwargs)
# Some Automodel NemotronV3 builds leave mixer tensors from scratch init uninitialized after
# from_config(); reset those tensors before running Automodel's regular init/rescaling path.
with torch.device('cpu'):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're going to train Nano-sized or larger models with distributed tensor sharding, you'll need to initialize the model on "meta" device and move to GPU directly later to avoid a spike in GPU memory or super long CPU init time. You can consult SALMAutomodel.configure_model() for reference how to put it together with PTL trainer

@staticmethod
@torch.no_grad()
def _initialize_automodel_scratch_parameters(module: nn.Module):
"""Reset NemotronV3 tensors that some Automodel scratch-init paths leave uninitialized."""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @akoumpa @hemildesai looks like some parameters in Automodel Nemotron3 implementation are not being initialized when training from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants