Skip to content

Add unified prompt model support for multilingual ASR and cache aware inference - #1

Draft
enas-albasiri wants to merge 27 commits into
mainfrom
prompt-unified-architecture
Draft

Add unified prompt model support for multilingual ASR and cache aware inference #1
enas-albasiri wants to merge 27 commits into
mainfrom
prompt-unified-architecture

Conversation

@enas-albasiri

Copy link
Copy Markdown
Owner

Important

The Update branch button must only be pressed in very rare occassions.
An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.

What does this PR do ?

Add unified prompt architecture for multilingual ASR, enabling language-ID conditioned for both Hybrid RNNT-CTC and RNNT models as well as streaming inference support.

Collection: ASR

Changelog

  • Add EncDecRNNTBPEModelWithPrompt — RNNT prompt-conditioned model with training script and 600M streaming config
  • Add LhotseSpeechToTextBpeDatasetWithPromptIndex — index-based Lhotse dataset with per-dataset prompt mode support (langID/auto/unified) via lhotse input_cfg tags
  • Add backward-compatible forward() in hybrid model accepting both legacy prompt tensors [B, T, D] and new prompt indices [B]
  • Add set_inference_prompt() + conformer_stream_step() override for streaming inference in both model variants
  • Add target_lang parameter to speech_to_text_cache_aware_streaming_infer.py (defaults to "auto" for prompt models)
  • Add strip_lang_tags config in RNNTDecodingConfig to remove <xx-XX> locale tags from decoded output

Usage

# Training with per-dataset prompt modes via lhotse input_cfg:
# In your input_cfg yaml, tag datasets with prompt_mode:
#   - type: nemo_tarred
#     tags: { prompt_mode: langID }    # AST data — always pass lang ID
#   - type: nemo_tarred
#     tags: { prompt_mode: unified }   # ASR data — 50/50 ratio
#   - type: nemo_tarred
#     tags: { prompt_mode: auto }      # Code-switching — always auto

# Streaming inference with target language:
# python speech_to_text_cache_aware_streaming_infer.py \
#     model_path=model.nemo \
#     dataset_manifest=test.json \
#     target_lang=en-US

GitHub Actions CI

The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.

The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".

Before your PR is "Ready for review"

Pre checks:

  • [Y] Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • [Y] New Feature
  • Bugfix
  • Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.

Additional Information

  • Related to # (issue)

@enas-albasiri enas-albasiri self-assigned this May 6, 2026
racoiaws and others added 15 commits May 8, 2026 10:22
…A-NeMo#15587)

* Simplify SchroedingerBridge _step to return scalar loss

Move component loss logging (train_loss_encoded, train_loss_time) into
_step itself, so it returns a plain scalar like all other models.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

* Extract _parse_batch helper into AudioToAudioModel base class

Replace duplicated batch parsing and 2D-to-3D reshape logic across
all 6 audio model subclasses with a single _parse_batch method on the
base class. FlowMatchingAudioToAudioModel overrides it to allow
missing target_signal for SSL pretraining.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

* Move training_step into AudioToAudioModel base class

Add abstract _compute_train_loss method that each subclass implements
with its model-specific loss computation. The base class training_step
handles batch parsing, logging, and return.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

* Guard SB component loss logging with self.training check

_step is called from both training and evaluation. The train_loss_encoded
and train_loss_time logs should only fire during training.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

* Move sample_rate and setup_optimization_flags to base AudioToAudioModel.__init__

Both are set identically by all 6 subclasses. setup_optimization_flags
only reads self._cfg, so it is safe to call before subclass-specific
module initialization.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

* Remove redundant world_size init from EncMaskDec and BNR2

ModelPT.__init__ calls set_trainer → set_world_size before any data
loader setup, so the pre-super assignment is always overwritten before
it can be read.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

* Use self.from_config_dict in EncMaskDecAudioToAudioModel

Consistent with all other audio model subclasses which use
self.from_config_dict rather than the concrete class name.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

* Update setup_optimization_flags docstring

Now called from base __init__, no longer requires explicit subclass call.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

* Extract _normalize/_denormalize helpers into base class

Replace repeated normalize/denormalize boilerplate across 4 forward()
and 3 _step() methods with calls to shared helpers on AudioToAudioModel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

* Remove misleading -> tuple annotation from _normalize

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

* Fix CodeQL warning: use pass instead of ... in abstract method

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

* Fix SB test that calls _step outside Lightning training loop

The test calls _step directly, which now logs component losses via
self.log. Disable logging in this test since there is no active
Lightning loop context. Also update to use _parse_batch and the
scalar return from _step.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

* Fix _denormalize to be proper inverse of _normalize

_normalize divides by (norm_scale + eps), so _denormalize should
multiply by (norm_scale + eps) to recover the original signal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Roman Korostik <rkorostik@nvidia.com>

---------

Signed-off-by: Roman Korostik <rkorostik@nvidia.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ci: consolidate PR + release workflows; use validate-only

Adopts the FW-CI-templates v1.0.0 pattern (NVIDIA-NeMo/FW-CI-templates#466):
- single release.yml caller for both push (validate-only) and
  workflow_dispatch (real release / dry-run)
- one pin governs PR rehearsal and shipped release
- drops PAT/SSH_KEY/SSH_PWD secrets (App-only auth)
- bumps FW-CI pin from v0.80.3 to current SHA

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci(release): silence check-wheel-contents W005+W009 (common+multi toplevel)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>

* refactor(release): bump FW-CI pin to f5224c1; skip-check-manifest

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci(release): add pre-flight gate to skip on deploy-release/* + docs-only

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci(release): enable docs publish in release pipeline

Why: previous workflow defaulted publish-docs to false. Validate-only
runs skipped build-docs/publish-docs entirely, so the docs path was
never exercised at PR time. Default to true and surface
docs-target-path / publish-as-latest / run-on-version-tag-only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci(release): wire docs-directory=docs/source + docs-requirements-file

Why: NeMo's Sphinx conf.py lives at docs/source/conf.py (not docs/);
docs deps install via pip, not uv (requirements/requirements_docs.txt);
fail-on-warning disabled because the existing docs tree has known
warnings that can't all be resolved at once.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci(release): bump pin + docs-skip-linkcheck

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci(changelog): bump FW-CI pin (HYBRID mode default) + add cp-title transformer

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>

* refactor(release): bump FW-CI pin to b57ebf9 ([skip ci] on bump commit)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>

* refactor(release): bump FW-CI pin to cb5e93b

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>

* refactor(release): bump FW-CI pin to 43d259e + drop SLACK_WEBHOOK passthrough

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: bump FW-CI pin to d2f3dd3 + use secrets inherit

Lets env-scoped SLACK_WEBHOOK reach the notify job in the called workflow.

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: strip orphan secret keys after secrets inherit

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: bump FW-CI pin to 64293f6 (slack render fix)

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: pin FW-CI templates to v1.0.0

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: pragma allowlist secret on 'secrets: inherit' lines

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: simplify release-summary if-block (always() was dead code)

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: simplify release if-block (replace explicit success/skipped with !failure)

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: drop docs-fail-on-warning: false (treat warnings as errors)

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: pass sync-all and no-extras to docs build

Signed-off-by: oliver könig <okoenig@nvidia.com>

* Revert "ci: pass sync-all and no-extras to docs build"

This reverts commit 1a75e0b.

_release_library.yml@v1.0.0 does not expose sync-all/no-extras inputs.
Forwarding is added in NVIDIA-NeMo/FW-CI-templates#473; once that lands
and gets tagged, bump the pin here and re-add the inputs as
docs-sync-all / docs-no-extras.

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: bump _release_library to v1.2.0 and pass docs-sync-all / docs-no-extras

v1.2.0 of NVIDIA-NeMo/FW-CI-templates#473 forwards docs-no-extras (and the
existing docs-sync-all) to _build_docs.yml, so the release path can now
match build-docs.yml (sync all groups, skip the cu12 extra).

Signed-off-by: oliver könig <okoenig@nvidia.com>

---------

Signed-off-by: oliver könig <okoenig@nvidia.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* read manifest from s3

Signed-off-by: Nikolay Karpov <nkarpov@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: karpnv <karpnv@users.noreply.github.com>

* s3cfg parameter

Signed-off-by: Nikolay Karpov <nkarpov@nvidia.com>

* file range

Signed-off-by: Nikolay Karpov <nkarpov@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: karpnv <karpnv@users.noreply.github.com>

* Avoid downloading of full tar, instead extracting specific audio file. Updaetd logging system

Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: Jorjeous <Jorjeous@users.noreply.github.com>

* shard_index + 1

Signed-off-by: Nikolay Karpov <nkarpov@nvidia.com>

* Undo latest changes, as it was dataset specific

Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>

* update table to not fail on "non-string format", update bucketing and sharding with separate numeration.

Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>

* add ability to read two manifests in comparison mode

Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: Jorjeous <Jorjeous@users.noreply.github.com>

* removing picke; --s3cfg=AIS -- read env vars; add matching manifests my filename in case unordered manifests;

Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: Jorjeous <Jorjeous@users.noreply.github.com>

* adding --force flag to load if required fields missing

Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>

* update documentation, guard issues, update requrements, Added quick start and available options, lazy import for s3 dependancies

Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>

* Apply isort and black reformatting

Signed-off-by: Jorjeous <Jorjeous@users.noreply.github.com>

* README: document _OP_/_CL_ sharded path syntax and cartesian-product expansion

Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>

* SDE local tar-base-path and text_key  (NVIDIA-NeMo#15663) featire add

* text

Signed-off-by: Nikolay Karpov <nkarpov@nvidia.com>

* local tarr support

Signed-off-by: Nikolay Karpov <nkarpov@nvidia.com>

---------

Signed-off-by: Nikolay Karpov <nkarpov@nvidia.com>

* isort and reformatting

Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>

---------

Signed-off-by: Nikolay Karpov <nkarpov@nvidia.com>
Signed-off-by: karpnv <karpnv@users.noreply.github.com>
Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>
Signed-off-by: Jorjeous <Jorjeous@users.noreply.github.com>
Co-authored-by: Nikolay Karpov <nkarpov@nvidia.com>
Co-authored-by: karpnv <karpnv@users.noreply.github.com>
Co-authored-by: Jorjeous <Jorjeous@users.noreply.github.com>
Co-authored-by: Jason <jasoli@nvidia.com>
Co-authored-by: Nikolay Karpov <karpnv@gmail.com>
…VIDIA-NeMo#15680)

HF whisper-large-v3 ships fp16 weights, but from_pretrained without
torch_dtype defaults to fp32 upcast, which doubles VRAM (~3 GB) and
prevents SDPA from dispatching to the flash kernel (flash-SDPA is
fp16/bf16 only). Passing torch_dtype="auto" tells HuggingFace to load
the model in the dtype declared by the checkpoint's config.json
(float16 for whisper-large-v3).

Verified on A100 with 100 CML-TTS IT samples: -3.5 GB peak VRAM,
+8% throughput, 100/100 transcripts identical to fp32 baseline.

Signed-off-by: matteolippi <matteolippi.science@gmail.com>
Co-authored-by: Jason <jasoli@nvidia.com>
Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>
* Preserve SpeechLM perception checkpoint dtype

Avoid forcing the SpeechLM audio perception module to FP32 during vLLM inference so BF16 checkpoints can run the encoder in their stored dtype while keeping raw audio preprocessing in FP32.

Signed-off-by: Dongji Gao <dongjig@nvidia.com>

* Keep perception dtype cast local to vLLM plugin

Move the processed-feature dtype cast out of the shared perception module and into the SpeechLM vLLM model path so this fix remains scoped to plugin inference.

Signed-off-by: Dongji Gao <dongjig@nvidia.com>

* Remove shared perception module change

Keep the dtype conversion scoped to the SpeechLM vLLM plugin path and leave the shared perception module unchanged.

Signed-off-by: Dongji Gao <dongjig@nvidia.com>

* Use explicit preprocessing in SpeechLM vLLM path

Call the audio preprocessor directly before casting features to the perception encoder dtype, keeping the dtype fix scoped to the plugin inference path.

Signed-off-by: Dongji Gao <dongjig@nvidia.com>

* Load perception weights without redundant recast

Keep the perception module in the checkpoint dtype while loading the original tensors directly.

Signed-off-by: Dongji Gao <dongjig@nvidia.com>

* Keep SpeechLM audio embedding cast unchanged

Preserve the existing BF16 LLM boundary cast and keep the PR focused on avoiding FP32 perception weights.

Signed-off-by: Dongji Gao <dongjig@nvidia.com>

* Use explicit perception dtype for SpeechLM vLLM

Keep raw audio preprocessing in FP32 and run perception in BF16 for the vLLM plugin path without extra defensive dtype detection.

Signed-off-by: Dongji Gao <dongjig@nvidia.com>

* Avoid redundant audio embedding dtype cast

Perception outputs already follow the plugin perception dtype, so avoid an extra cast before returning audio embeddings.

Signed-off-by: Dongji Gao <dongjig@nvidia.com>

* Use normal perception forward path

Rely on AudioPerceptionModule to handle preprocessing and encoder handoff after the plugin sets the perception module dtype.

Signed-off-by: Dongji Gao <dongjig@nvidia.com>

---------

Signed-off-by: Dongji Gao <dongjig@nvidia.com>
* ci: Fix CI approval queue

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Fix token check

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

---------

Signed-off-by: Charlie Truong <chtruong@nvidia.com>
…Mo#15639)

* wip

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* WIP

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* speaker encoder optional

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* Apply isort and black reformatting

Signed-off-by: paarthneekhara <paarthneekhara@users.noreply.github.com>

* ipa field not required for languages being ignored

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* address jasons comments about MOE in context encoder

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* comments

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* fix code formatting issue

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* fixing code formatting errors

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

---------

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>
Signed-off-by: paarthneekhara <paarthneekhara@users.noreply.github.com>
Co-authored-by: paarthneekhara <paarthneekhara@users.noreply.github.com>
Co-authored-by: Jason <jasoli@nvidia.com>
Signed-off-by: Ryan <rlangman@nvidia.com>
…NeMo#15685)

Signed-off-by: oliver könig <okoenig@nvidia.com>
Co-authored-by: Charlie Truong <chtruong@nvidia.com>
…-NeMo#15687)

* Remove black extend-exclude option
* Reformat files with black
* Exclude Jupyter Notebooks
* Adjust AGENTS.md to allow using isort and black directly

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>

---------

Signed-off-by: Vladimir Bataev <vbataev@nvidia.com>
* Add full causal support

Signed-off-by: nithinraok <nithinrao.koluguri@gmail.com>

* fix black/isort

Signed-off-by: nithinraok <nithinrao.koluguri@gmail.com>

---------

Signed-off-by: nithinraok <nithinrao.koluguri@gmail.com>
NVIDIA-NeMo#15717)

* clean commit with EMTTS text embedding disabling and pronunciation control changes

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* fix code formatting issue

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* comments and backward compatibility for CI/CD tests

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* refactor and docstrings

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* comments about model configs

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* reformat black

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

* legacy model fixes

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>

---------

Signed-off-by: Paarth Neekhara <paarth.n@gmail.com>
* ci: pin FW-CI-templates to NVIDIA-NeMo/FW-CI-templates#480 (mirror branch protection)

Companion PR to NVIDIA-NeMo/FW-CI-templates#480, which mirrors the
branch-protection rule of `[rv][0-9].[0-9].[0-9]` onto `deploy-release/*` so
the validate-only release rehearsal is gated by the same required status
checks as a real release.

Pinned to commit f680963ed397a4ff0cd4c983a3a3071c209e5e77 on `ko3n1g/feat/mirror-release-branch-protection`.
Re-pin to a released tag once FW-CI-templates#480 lands.

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: bump FW-CI-templates pin to 3c679d436baa0b926766e9b1e6d149803c506b5d

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: bump FW-CI-templates pin to 57cc8e1ed81d8a1d83cecb2e4a54e04144623bcf

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: bump FW-CI-templates pin to d8ca5ec4a4c4242d0bc2438aa838adebd83e05c4

Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: re-pin FW-CI-templates from SHA to v1.4.0

Signed-off-by: oliver könig <okoenig@nvidia.com>

---------

Signed-off-by: oliver könig <okoenig@nvidia.com>
@kingformatty
kingformatty force-pushed the prompt-unified-architecture branch from dd9e694 to bea77d0 Compare May 28, 2026 01:42
melllinia and others added 5 commits May 28, 2026 10:21
* Fix LazyNeMoIterator for non-tarred S3 audio data

Two issues prevent LazyNeMoIterator from reading manifests that
reference audio files on object stores (s3://, ais://) when using
non-tarred (type: nemo) format:

1. get_full_path joins S3 URIs with manifest directory

   `os.path.isabs("s3://bucket/file.opus")` returns False, so
   get_full_path treats the S3 URI as a relative path and joins it
   with the manifest directory, producing invalid paths like:
   "s3:/manifest_dir/s3:/bucket/file.opus"

   Fix: check `is_datastore_path(audio_file)` before any relative-path
   logic and return the URI directly.

2. LazyNeMoIterator only pops "sampling_rate", ignoring "sample_rate"

   Many datasets (e.g. ssl_yt_harvested) use "sample_rate" in their
   manifests. When the field is missing, NeMo falls back to
   `Recording.from_file()` which cannot read S3 URIs via soundfile.

   Fix: fall back to `data.pop("sample_rate", None)` when
   "sampling_rate" is not present.

Reproducer:
  # Manifest on S3 with entries like:
  # {"audio_filepath": "s3://bucket/audios/file.opus", "duration": 100, "sample_rate": 48000}
  from lhotse import CutSet
  from nemo.collections.common.data.lhotse.nemo_adapters import LazyNeMoIterator
  cutset = CutSet(LazyNeMoIterator("path/to/manifest.jsonl"))
  for cut in cutset:  # Fails without fix
      audio = cut.load_audio()

Signed-off-by: Meline Mkrtchyan <mmkrtchyan@nvidia.com>

* Add unit tests and fix sampling_rate fallback logic

- Replace `or` operator with explicit `is None` check to avoid
  incorrect fallthrough when sampling_rate is 0 (falsy)
- Add test_get_full_path_datastore_uri_passthrough: verifies S3/AIS
  URIs are returned unchanged by get_full_path
- Add test_lazy_nemo_iterator_sample_rate_fallback: verifies
  LazyNeMoIterator uses sample_rate when sampling_rate is absent

Signed-off-by: Meline Mkrtchyan <mmkrtchyan@nvidia.com>

---------

Signed-off-by: Meline Mkrtchyan <mmkrtchyan@nvidia.com>
Co-authored-by: Piotr Żelasko <pzelasko@nvidia.com>
* Add ASR fine-tuning skill draft

* Refine ASR fine-tuning skill guidance

* Improve ASR fine-tuning guardrails

* Add ASR refinement and export guidance

* Refine ASR fine-tuning iteration guidance

* Add transcript style preflight to ASR finetune skill

* Refine ASR finetune skill evaluation guidance

* Address ASR finetune skill review feedback
…5716)

* Support encoder input chunking for SALM vLLM inference

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

* Fixes for multi-audio turns, audiobench

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

* Add missing constants

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

* Address SALM vLLM review feedback

---------

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
…nference (NVIDIA-NeMo#15666)

* Add unified langID support for Hybrid and RNNT

Signed-off-by: Jinhan <jinhanw@nvidia.com>

* Add training guide doc

Signed-off-by: Jinhan <jinhanw@nvidia.com>

* Add unified prompt architecture for multilingual ASR

- RNNT-only prompt model (EncDecRNNTBPEModelWithPrompt) and training script
- RNNT-only streaming config (fastconformer_transducer_bpe_streaming_prompt.yaml)
- Index-based dataset (LhotseSpeechToTextBpeDatasetWithPromptIndex) with
  per-dataset prompt_mode support (langID/auto/unified) via lhotse input_cfg tags
- Backward-compatible hybrid model: accepts both old prompt tensors and new
  prompt_indices with auto-detection
- Streaming inference: set_inference_prompt() + conformer_stream_step() override
  for both hybrid and RNNT-only models, with target_lang support in standard
  cache-aware streaming inference script
- Config-driven strip_lang_tags in RNNT decoding to remove <xx-XX> tags from output
- Remove unused docs/TRAINING_GUIDE.md and hybrid streaming config

Signed-off-by: Jinhan <jinhanw@nvidia.com>

* fix code style black formatting, flake8 errors, and type hints

Signed-off-by: Enas Albasiri <ealbasiri@nvidia.com>
Signed-off-by: Jinhan <jinhanw@nvidia.com>

* fix code style black formatting

Signed-off-by: Enas Albasiri <ealbasiri@nvidia.com>
Signed-off-by: Jinhan <jinhanw@nvidia.com>

* Resolve comments: 1. Set strip_lang_tags default False for inference script, manual enable by setting stip_lang_tags=True at inference(or training) time. 2. Import TokenizerWrapper in dataloader

Signed-off-by: Jinhan <jinhanw@nvidia.com>

* Resolve critical structural comments and remove un-used config from rnnt prompt model yaml

Signed-off-by: Jinhan <jinhanw@nvidia.com>

* Address comment: 1. Consolidate conformer stream step into mixin. 2. Consolidate streaming inference into mixin 3. Remove unused option in config.yaml 3. Consolidate strip_lang_tag into unified function. 4. Make lang_tag pattern customizable

Signed-off-by: Jinhan <jinhanw@nvidia.com>

* Unified all lang_field to be target_lang

Signed-off-by: Jinhan <jinhanw@nvidia.com>

* Remove non-lhotse dataloader config + Consolidate prompt functions into mixin.py

Signed-off-by: Jinhan <jinhanw@nvidia.com>

* Add CICD Test

Signed-off-by: Jinhan <jinhanw@nvidia.com>

* Remove un-used import + resolve isort_black

Signed-off-by: Jinhan <jinhanw@nvidia.com>

* Resolve unit test failure

Signed-off-by: Jinhan <jinhanw@nvidia.com>

* isort_back on modified unit test

Signed-off-by: Jinhan <jinhanw@nvidia.com>

* Resolve unit test failure

Signed-off-by: Jinhan <jinhanw@nvidia.com>

---------

Signed-off-by: Jinhan <jinhanw@nvidia.com>
Signed-off-by: Enas Albasiri <ealbasiri@nvidia.com>
Co-authored-by: Jinhan <jinhanw@nvidia.com>
Co-authored-by: Jinhan Wang <45400806+kingformatty@users.noreply.github.com>
@kingformatty
kingformatty force-pushed the prompt-unified-architecture branch from 8fde795 to 6967f48 Compare May 29, 2026 17:06
* Move requirements metadata to pyproject

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Update CI Dockerfile to install with uv

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Remove legacy requirements files

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Remove legacy Docker dependency installer

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Fix container build

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Fix nemo install

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Update lhotse minimum version

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Omit PyTorch synthetic module from coverage

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Mark test_speaker_target_setting as broken

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Revert "Mark test_speaker_target_setting as broken"

This reverts commit 8c5a48e.

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Use cu12 in docker CI

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Set back to cuda 13 install

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Update to pytorch 2.12 and cuda dl base image

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Try torch 2.10

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Add deps

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Update uv lock file

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Fix install

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Add speech CI build ID label

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Fix SpeechLM2 automodel data parallel rank

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

* Fix lint failures after dependency migration

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

* Fix ASR CUDA graph transcribe workers

* Fix functional model support tests

* Use CUDA 13.2 PyTorch wheels

* Fix ASR CUDA graph fallback errors

* Fix TDT model support vocab targets

Use decoder vocab size when generating synthetic TDT transcript labels so duration outputs from the joint are not sampled as labels.

Move CUDA graph compile exception types into cuda_python_utils per review feedback.

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

---------

Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
Co-authored-by: Piotr Żelasko <pzelasko@nvidia.com>
@kingformatty
kingformatty force-pushed the prompt-unified-architecture branch 2 times, most recently from ad7ad91 to 0d7bb85 Compare May 29, 2026 21:44
tango4j and others added 3 commits May 30, 2026 07:21
…eMo#15632)

* Removing the dependency on Pyannote

Signed-off-by: taejinp <tango4j@gmail.com>

* Fixed linting and unused variables

Signed-off-by: taejinp <tango4j@gmail.com>

* Apply isort and black reformatting

Signed-off-by: tango4j <tango4j@users.noreply.github.com>

* Removing the accidently added image

Signed-off-by: taejinp <tango4j@gmail.com>

* Apply isort and black reformatting

Signed-off-by: tango4j <tango4j@users.noreply.github.com>

* Removing the accidently an added tutorial notebook box

Signed-off-by: taejinp <tango4j@gmail.com>

* Removing data folder for notebook cache

Signed-off-by: taejinp <tango4j@gmail.com>

* Fixed the der time overshoot and rttm sorting. cpwer.py created

Signed-off-by: taejinp <tango4j@gmail.com>

* Fixed lint issues

Signed-off-by: taejinp <tango4j@gmail.com>

* Fixed line too long issue in ipa_lexicon.py

Signed-off-by: taejinp <tango4j@gmail.com>

* Fixed black on test_der.py

Signed-off-by: taejinp <tango4j@gmail.com>

* reflected the commend on abbreviated ipa_lexicon

Signed-off-by: taejinp <tango4j@gmail.com>

---------

Signed-off-by: taejinp <tango4j@gmail.com>
Signed-off-by: tango4j <tango4j@users.noreply.github.com>
Co-authored-by: tango4j <tango4j@users.noreply.github.com>
Co-authored-by: Piotr Żelasko <pzelasko@nvidia.com>
Signed-off-by: Jinhan <jinhanw@nvidia.com>
Signed-off-by: Jinhan <jinhanw@nvidia.com>
@kingformatty
kingformatty force-pushed the prompt-unified-architecture branch from 0d7bb85 to 83f25a7 Compare June 1, 2026 18:55
Ssofja and others added 3 commits June 2, 2026 16:18
* fix for release nightly docs CI

* removed docs-skip-linkcheck for not skipping  the tests

Signed-off-by: Ssofja <sofiakostandian@gmail.com>

---------

Signed-off-by: Ssofja <sofiakostandian@gmail.com>
* Move requirements metadata to pyproject

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Update CI Dockerfile to install with uv

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Remove legacy requirements files

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Remove legacy Docker dependency installer

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Fix container build

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Fix nemo install

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Update lhotse minimum version

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Omit PyTorch synthetic module from coverage

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Mark test_speaker_target_setting as broken

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Revert "Mark test_speaker_target_setting as broken"

This reverts commit 8c5a48e.

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Use cu12 in docker CI

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Set back to cuda 13 install

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Update to pytorch 2.12 and cuda dl base image

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Try torch 2.10

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Add deps

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Update uv lock file

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Fix install

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Add speech CI build ID label

Signed-off-by: Charlie Truong <chtruong@nvidia.com>

* Fix SpeechLM2 automodel data parallel rank

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

* Fix lint failures after dependency migration

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

* Fix ASR CUDA graph transcribe workers

* Fix functional model support tests

* Use CUDA 13.2 PyTorch wheels

* Fix ASR CUDA graph fallback errors

* Fix TDT model support vocab targets

Use decoder vocab size when generating synthetic TDT transcript labels so duration outputs from the joint are not sampled as labels.

Move CUDA graph compile exception types into cuda_python_utils per review feedback.

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

* Remove stale NeMo dependencies on uv base

* Remove stale direct dependencies

* Fix dependency cleanup CI lint

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

* Lazy import notebook plotting dependencies

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

* Skip concat dataloader test without pyloudnorm

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

* Fix CUDA beam decoding transcript comparison

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>

---------

Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
Co-authored-by: Charlie Truong <chtruong@nvidia.com>
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.