Skip to content

Conversation

@erastorgueva-nv
Copy link
Collaborator

@erastorgueva-nv erastorgueva-nv commented Sep 10, 2025

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 ?

Force activations and weights cast to FP32 Jasper Encoder Squeeze-Excite

This is to fix the fact that calling transcribe_speech.py with a model that uses the Jasper Encoder will not work, e.g.:

python /workspace/NeMo/examples/asr/transcribe_speech.py \
	pretrained_name="stt_es_citrinet_512" \
	dataset_manifest="manifest.json" \
	output_filename="manifest_transcribed.json"

without the fix --> will get RuntimeError: expected scalar type BFloat16 but found Float

Collection: ASR

Changelog

  • in nemo/collections/asr/parts/submodules/jasper.py forward_for_export (used whether exporting or not) check if x and self.fc are dtype float32 --> if not then cast to float32

Usage

  • N/A

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

nithinraok
nithinraok previously approved these changes Sep 11, 2025
@nithinraok nithinraok added the r2.5.0 Cherry-pick label for the 2.5.0 release label Sep 11, 2025
@github-actions github-actions bot removed the Run CICD label Sep 11, 2025
@chtruong814
Copy link
Collaborator

@erastorgueva-nv This looks like it has an error that needs to be resolved
https://github.com/NVIDIA-NeMo/NeMo/actions/runs/17632606462/job/50353178896?pr=14715

self = Linear(in_features=512, out_features=64, bias=False)
input = tensor([[[-1.1425e-03,  9.5797e-04,  4.2868e-04,  5.9652e-04, -1.4353e-03,
          -4.1246e-05,  1.6642e-03, -3.4571...05,  2.9397e-04,  7.9393e-04, -5.2023e-04,
          -5.0783e-05, -2.2650e-04]]], device='cuda:0', dtype=torch.float16)

    def forward(self, input: Tensor) -> Tensor:
>       return F.linear(input, self.weight, self.bias)
E       RuntimeError: expected scalar type Float but found Half

@erastorgueva-nv erastorgueva-nv changed the title Remove FP32 cast in Jasper Encoder Force activations and weights cast to FP32 Jasper Encoder Squeeze-Excite Sep 15, 2025
erastorgueva-nv and others added 3 commits September 15, 2025 12:42
Signed-off-by: Elena Rastorgueva <[email protected]>
Signed-off-by: Chen Cui <[email protected]>
Co-authored-by: Chen Cui <[email protected]>
Signed-off-by: Elena Rastorgueva <[email protected]>
@chtruong814 chtruong814 enabled auto-merge (squash) September 15, 2025 22:45
@github-actions
Copy link
Contributor

[🤖]: Hi @erastorgueva-nv 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

//cc @chtruong814 @ko3n1g @pablo-garay @thomasdhc

@github-actions github-actions bot removed the Run CICD label Sep 16, 2025
@chtruong814 chtruong814 merged commit b804fb0 into r2.5.0 Sep 16, 2025
616 of 705 checks passed
@chtruong814 chtruong814 deleted the elena/r2.5.0_transcribe_fix branch September 16, 2025 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ASR r2.5.0 Cherry-pick label for the 2.5.0 release skip-linting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants