Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure asr_model.change_attention_model is run if either cfg.model_path or cfg.pretrained_name is specified #6908

Merged
merged 3 commits into from
Jun 26, 2023

Conversation

erastorgueva-nv
Copy link
Collaborator

@erastorgueva-nv erastorgueva-nv commented Jun 22, 2023

What does this PR do ?

Makes sure asr_model.change_attention_model is run regardless of whether cfg.model_path or cfg.pretrained_name is specified.

Collection: ASR

Changelog

  • Moved asr_model.change_attention_model call outside of if-branch.

Usage

  • You can potentially add a usage example below
python NeMo/examples/asr/transcribe_speech.py \
        pretrained_name="stt_en_fastconformer_ctc_large" \
        dataset_manifest=$src_manifest \
        ++model_change.conformer.self_attention_model="rel_pos_local_attn" \
        ++model_change.conformer.att_context_size="[128, 128]"

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • [N/A] Did you write any new necessary tests?
  • [N/A] Did you add or update any necessary documentation?
  • [N/A] 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)

Signed-off-by: Elena Rastorgueva <erastorgueva@nvidia.com>
@sam1373
Copy link
Contributor

sam1373 commented Jun 22, 2023

Can you change the example to 128

@sam1373 sam1373 closed this Jun 22, 2023
@sam1373 sam1373 reopened this Jun 22, 2023
@erastorgueva-nv erastorgueva-nv merged commit ef56c97 into main Jun 26, 2023
@erastorgueva-nv erastorgueva-nv deleted the setup_model_model_change_patch branch June 26, 2023 16:23
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