NeMo icon indicating copy to clipboard operation
NeMo copied to clipboard

[do-not-merge] Illustration how to run audio+text dataloading

Open pzelasko opened this issue 1 year ago • 0 comments

What does this PR do ?

The key config options to set are:

 +model.train_ds.input_cfg=/path/to/speech_text_input.yaml \
 +model.train_ds.use_multimodal_sampling=true \
 +model.train_ds.batch_tokens=65536 \
 +model.train_ds.token_equivalent_duration=0.08 \
 +model.train_ds.quadratic_factor=4096 \
 +model.train_ds.tarred_audio_filepaths=null \
 model.train_ds.manifest_filepath=null \
 model.train_ds.batch_size=null \
 model.train_ds.batch_duration=null \
 model.train_ds.use_lhotse=true \
 model.train_ds.use_bucketing=true \
 model.train_ds.num_buckets=30 \

The values of batch_tokens, token_equivalent_duration, and quadratic_factor need tuning.

where contents of speech_text_input.yaml are:

 - type: group
    weight: 1.0
    input_cfg:
    - type: nemo_tarred
      manifest_filepath: /path/to/manifest__OP_0..127_CL_.json
      tarred_audio_filepaths: /path/to/audio__OP_0..127_CL_.tar
      tags:
        pnc: 'no'
        source_lang: en
        target_lang: en
        taskname: asr
      weight: 1.0
    - type: nemo_sft_jsonl
      paths: /data/nemo_megatron_sft_chat_qa_data.shuf.jsonl
      language: en
      weight: 1.0

Collection: [Note which collection this PR will affect]

Changelog

  • Add specific line by line info of high level changes in this PR.

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this 

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:

  • [ ] 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:

  • [ ] 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)

pzelasko avatar May 07 '24 21:05 pzelasko