NeMo icon indicating copy to clipboard operation
NeMo copied to clipboard

Create causal mask on MCore/TE side

Open janekl opened this issue 1 year ago • 0 comments

What does this PR do ?

Currently Megatron-LM creates causal attention mask for a local-layer spec model on its own -- see https://github.com/NVIDIA/Megatron-LM/commit/a45805a3ee0645b85b48d14b0a8077fa5b1216b2 -- and hence attention_mask=None can be specified in Nemo. In this MR, I'm using this new M-LM functionality when creating fwd_output_only_func function.

Broader functional tests for fwd_output_only_func will follow in subsequent MRs.

Collection: NLP

Jenkins CI

To run Jenkins, a NeMo User with write access must comment jenkins on the PR.

Before your PR is "Ready for review"

Pre checks:

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

  • [x] 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 https://github.com/NVIDIA/Megatron-LM/commit/a45805a3ee0645b85b48d14b0a8077fa5b1216b2

janekl avatar Jan 31 '24 11:01 janekl