Skip to content

[Streaming SpeechLM] Add audomodel support - #16045

Draft
stevehuang52 wants to merge 4 commits into
heh/streaming_speechlmfrom
heh/streaming_speechlm_automodel
Draft

[Streaming SpeechLM] Add audomodel support#16045
stevehuang52 wants to merge 4 commits into
heh/streaming_speechlmfrom
heh/streaming_speechlm_automodel

Conversation

@stevehuang52

Copy link
Copy Markdown
Collaborator

Add automodel support to current streaming speechlm work

stevehuang52 and others added 4 commits July 27, 2026 20:05
…STT)

StreamingSTTModelAutomodel is to StreamingSTTModel what SALMAutomodel is to
SALM: same streaming recipe, but the LLM is loaded and parallelized by NeMo
Automodel (FSDP2/HSDP/EP) instead of HuggingFace + DDP.

* Deferred construction: __init__ builds only the tokenizer; the LLM and
  perception are created in configure_model(), which the Lightning strategy
  calls with the device mesh so Automodel shards while loading.
* embed_tokens stays inside the LLM; lookups go through F.embedding on the
  all-gathered weight, declaring the gradient Partial("avg") so the trainable
  embedding table (needed to learn <blank>) is DP-reduced — FSDP2 does not
  reduce it, since the lookup happens outside the LLM's forward.
* Added special tokens reuse the checkpoint's spare embedding rows; a sharded
  table cannot be resized.
* LoRA via Automodel's PEFT (dim/alpha/dropout); HF-PEFT keys are rejected with
  an actionable error. Adapters installed inside from_pretrained are re-enabled
  after the LLM-body freeze, otherwise freeze_and_subset drops them silently.
* TP and CP are rejected at fit start (the interleaved audio/text sequence must
  stay on one rank and the streaming loss is not DTensor-safe).

StreamingSTTModel gains small backend-indirection hooks (_embed_tokens,
_embed_ref_tensor, _llm_forward, _move_embedding_ctx, _lm_head_module,
_resize_llm_embeddings) and its __init__ is split into reusable helpers; the
HF-backed behavior is unchanged.

streaming_stt_train.py dispatches on model.use_nemo_automodel, mirroring
salm_train.py. New config: examples/speechlm2/conf/streaming_stt_automodel.yaml.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: He Huang <heh@nvidia.com>
Signed-off-by: He Huang <heh@nvidia.com>
…omodel

Signed-off-by: He Huang <heh@nvidia.com>
Signed-off-by: He Huang <heh@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant