Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
89c7400
Ipl processors
nune-tadevosyan May 14, 2025
b9471e3
remove
nune-tadevosyan May 14, 2025
b4dc91c
some commits
nune-tadevosyan May 15, 2025
abc2240
IPL Processors
nune-tadevosyan May 28, 2025
bfdc49c
IPL Processors
nune-tadevosyan May 28, 2025
aae3a02
IPL Processors
nune-tadevosyan May 28, 2025
125699a
Remove unneseccary files
nune-tadevosyan May 28, 2025
f5227e1
IPL dependencies
nune-tadevosyan May 29, 2025
c4ed0ca
Small changes
nune-tadevosyan May 29, 2025
e99bbae
Small changes
nune-tadevosyan May 29, 2025
fd64c04
Small changes
nune-tadevosyan May 29, 2025
26c7fb8
Config changes
nune-tadevosyan May 30, 2025
d0e4180
Config place change
nune-tadevosyan May 30, 2025
7920663
Moving configs
nune-tadevosyan Jun 4, 2025
d5fe869
Readme file
nune-tadevosyan Jun 4, 2025
c6e0cbc
Fix test
nune-tadevosyan Jun 7, 2025
96bef79
Update nemo_run_config.yaml
nune-tadevosyan Jun 9, 2025
3c4bda2
Update nemo_run_config.yaml
nune-tadevosyan Jun 9, 2025
4a12139
Adding copyrights
nune-tadevosyan Jun 12, 2025
a40f89c
Adding imports from main
nune-tadevosyan Jun 12, 2025
38a09d6
Merge remote-tracking branch 'origin/main' into sdp_ipl
nune-tadevosyan Jun 12, 2025
87d7912
Adding copyrights
nune-tadevosyan Jun 12, 2025
9bceadf
Doc update
nune-tadevosyan Jun 14, 2025
c6ea89c
Doc update
nune-tadevosyan Jun 14, 2025
d2c61ff
Doc update
nune-tadevosyan Jun 14, 2025
8f303d1
Update config
nune-tadevosyan Jun 14, 2025
ecfdaf4
Update nemo_run_config.yaml
nune-tadevosyan Jun 16, 2025
39c8221
Update ipl.txt
nune-tadevosyan Jun 16, 2025
4f6c355
update
nune-tadevosyan Jun 16, 2025
a78eb23
Merge branch 'main' of github.com:NVIDIA/NeMo-speech-data-processor i…
nune-tadevosyan Jun 24, 2025
9cbac0f
Small change
nune-tadevosyan Jun 26, 2025
0b4a9d6
small update
nune-tadevosyan Jun 26, 2025
6cb8b40
forse jiwer
Jorjeous Jun 26, 2025
77b64f2
attempt 1 to fix certificates
Jorjeous Jun 26, 2025
a559483
attempt 2 to fix cert
Jorjeous Jun 26, 2025
3a92ee2
small change
nune-tadevosyan Jun 27, 2025
9e07c9b
Merge branch 'sdp_ipl' of github.com:NVIDIA/NeMo-speech-data-processo…
nune-tadevosyan Jun 27, 2025
c8ba85a
Doc changes
nune-tadevosyan Jul 2, 2025
4392ef2
Doc changes
nune-tadevosyan Jul 2, 2025
b5a0637
Merge branch 'main' into sdp_ipl
Jorjeous Jul 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
CLEAN_UP_TMP_PATH: 1
run: |

wget https://uit.stanford.edu/sites/default/files/2023/10/11/incommon-rsa-ca2.pem #downloading cert manually [for CORAL]
sudo cp incommon-rsa-ca2.pem /usr/local/share/ca-certificates/incommon-rsa-server-ca-2.crt # [cert for CORAL]
sudo update-ca-certificates # [cert for CORAL]
Expand Down
49 changes: 49 additions & 0 deletions dataset_configs/ipl/config.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have descriptions in YAML files. Add it to this YAML file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Descriptions are mostly about datasets and processors
We added a README for the same purpose

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
documentation: |
TopIPL
######

This config is used to run the `TopIPL: Iterative Pseudo-Labeling for ASR <https://arxiv.org/abs/2506.07659>`_ training algorithm using NeMo-Run.

TopIPL is a **semi-supervised training method** for automatic speech recognition (ASR) that iteratively alternates between model training and pseudo-label generation for unlabeled data. It uses a **top-N checkpoint averaging strategy** to create a strong teacher model and maintains a **dynamic cache** of pseudo-labels throughout the process.

The pipeline is implemented as a processor compatible with the `nemo_run` framework. It generates an output manifest containing updated labels based on pseudo-labeling iterations.

This config performs the following steps:

1. Runs training and inference commands using NeMo-Run.
2. Periodically stops training to generate pseudo-labels with a top-N checkpoint ensemble.
3. Maintains a dynamic cache of pseudo-labels for unlabeled data.
4. Produces a new output manifest after each iteration.

**Required arguments**

- **output_manifest_file**: path where the final manifest with pseudo-labels will be saved.
- **nemo_run_config**: YAML config file specifying the training, inference, and IPL parameters.

**Training config requirements**

Your training config must include the following setting to enable IPL:

.. code-block:: yaml

exp_manager:
create_ipl_epoch_stopper_callback: True

If you're not using Lhotse, also include:

.. code-block:: yaml

ipl_epoch_stopper_callback_params:
stop_every_n_epochs: 2

### Prerequisites

- nemo_run
- ``pip install -r ipl.txt``

processors_to_run: all

processors:
- _target_: sdp.processors.IPL.nemo_run_processor.NemoRunIPLProcessor
config_path: ./nemo_run_config.yaml
output_manifest_file: ???
80 changes: 80 additions & 0 deletions dataset_configs/ipl/nemo_run_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# The script to be run.
script: # Script path to run relative to directory
script_config: # Training config file for the script. ipl_epoch_stopper_callback should be provided in the config
inference_config: # Inference config file of unlabeled data for transcribe_speech_parallel

exp_name: null # populated by exp_manager.name if not provided
results_dir: # Where to store the results of the run

# Path to the local NeMo repository. This is used to locate scripts and configs from NeMo.
# To set this up:
# 1. Clone the NeMo repository:
# git clone https://github.com/NVIDIA/NeMo.git /your/desired/path/to/nemo
# 2. Set the path here:
# Make sure this path is valid and NeMo is up to date if you're using its scripts.
nemo_directory: # Nemo directory path
do_average: # Boolean value indicating whether to do average of checkpoints for pseudo-label generation
p_cache: # Probability with which update pseudo-labeled set
num_ipl_epochs: # How many epochs do pseudo-labeling

# Optional arguments
num_runs:
num_gpus:
num_tasks_per_node:
max_runtime: # Specify for clusters

########################################################################################################################

executor: slurm # or local

USER:

# Fields for cluster run
ssh_tunnel:
host:
# ------------------------------- Fill this up! -------------------------------
user: "${USER}" # your username; or resolved from ${USER} environment variable ; or can be null which resolved from ${USER} environment variable
job_dir: "" # Job directory to keep created files
identity: ""
# -----------------------------------------------------------------------------

account:
partition:
job_name_prefix:

containers:
asr: # Container image


env_vars:
- 'TOKENIZERS_PARALLELISM='
- 'AIS_ENDPOINT='
- 'LHOTSE_AUDIO_DURATION_MISMATCH_TOLERANCE='
- 'TORCH_CUDNN_V8_API_ENABLED='
- 'PYTORCH_CUDA_ALLOC_CONF='
- 'HYDRA_FULL_ERROR=1'

required_env_vars:
- 'HF_TOKEN='
- 'WANDB_KEY='

mounts:
# Replace with your own paths in your cluster config
- /path/to/mount:/where/to/mount/

timeouts:
partition_name: # Specify time
8 changes: 8 additions & 0 deletions docs/src/sdp/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,14 @@ Miscellaneous
.. autodata:: sdp.processors.tts.prepare_tts_segments.PrepareTTSSegmentsProcessor
:annotation:

.. autodata:: sdp.processors.ipl.nemo_run_processor.NemoRunIPLProcessor
:annotation:

.. autodata:: sdp.processors.ipl.ipl_processors.TrainingCommandGenerator
:annotation:

.. autodata:: sdp.processors.ipl.ipl_processors.InferenceCommandGenerator
:annotation:

.. _sdp-base-classes:

Expand Down
18 changes: 18 additions & 0 deletions docs/src/sdp/existing_configs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -407,3 +407,21 @@ HiFiTTS-2
config-docs/english/hifitts2/config_22khz
config-docs/english/hifitts2/config_44khz
config-docs/english/hifitts2/config_bandwidth

NemoRunIPL
~~~~~~~~~~

**Supported configs**.

* **IPL**:
`config <https://github.com/NVIDIA/NeMo-speech-data-processor/blob/main/dataset_configs/ipl/config.yaml>`__ |
:doc:`documentation <config-docs/ipl/config>`
* **NeMoRun**:
`config <https://github.com/NVIDIA/NeMo-speech-data-processor/blob/main/dataset_configs/ipl/nemo_run_config.yaml>`__ |
:doc:`documentation <config-docs/ipl/nemo_run_config>`

.. toctree::
:hidden:

config-docs/ipl/config
config-docs/ipl/nemo_run_config
11 changes: 11 additions & 0 deletions requirements/ipl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
nemo_run

# Nemo repository path is also required, it is used to locate scripts and configs from NeMo.
#
# To set this up:
# 1. Clone the NeMo repository:
# git clone https://github.com/NVIDIA/NeMo.git /your/desired/path/to/nemo
# 2. Set the path in nemo_run_config.yaml:
# nemo_directory: /your/desired/path/to/nemo
#
# Make sure this path is valid and NeMo is up to date if you're using its scripts.
47 changes: 47 additions & 0 deletions sdp/processors/ipl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 🧠 TopIPL: Iterative Pseudo-Labeling for ASR

TopIPL is an **iterative pseudo-labeling algorithm** designed for training ASR models using both labeled and unlabeled data. It maintains a **dynamic pseudo-label cache** and leverages **top-N averaged checkpoints** as a teacher model to generate high-quality pseudo-labels across training iterations.

## 📦 Contents

- `NemoRunIPLProcessor` — Command generator and job submitter for IPL runs, compatible with local and cluster environments.
- `nemo_run_config.yaml` — Main configuration file. Users should define all required paths and parameters here.

## 🚀 Getting Started

TopIPL runs like any other processor in the `nemo_run` framework. To use it, you must pass:

- `output_manifest_file`: Path where the resulting manifest will be saved.
- `nemo_run_config`: YAML file containing IPL setup, training/inference configs, and NeMo-Run settings.

### 🔧 Training Config Requirements

Your training config must:

```yaml
exp_manager:
create_ipl_epoch_stopper_callback: True
```
If you're not using Lhotse, also include:

```yaml
ipl_epoch_stopper_callback_params:
stop_every_n_epochs: 2

```

### Prerequisites

Before using TopIPL, make sure the following are set up:

- Clone the NeMo repository:
```bash
git clone https://github.com/NVIDIA/NeMo.git /your/desired/path/to/nemo

- Set the path to NeMo in your `nemo_run_config.yaml`: `nemo_directory: /your/desired/path/to/nemo`
- `pip install -r requirements/ipl.txt`

### Running the Code

```bash
python main.py --config-path=/path/to/directory/config --config-name=config.yaml
Empty file added sdp/processors/ipl/__init__.py
Empty file.
Loading
Loading