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

Fix to peft & virtual pipeline parallel unsupported check #8216

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

vysarge
Copy link
Contributor

@vysarge vysarge commented Jan 22, 2024

What does this PR do ?

Corrects the check added in PR-7964 to raise a ValueError when attempting to run virtual pipeline parallel with peft.

Collection: nlp/language_modeling

Changelog

  • Moves this safety check from MegatronGPTSFTModel.__init__ (where self.use_peft had not yet been set to true, so the check did not function) to NLPAdapterModelMixin.add_adapter

Usage

Running with the unsupported combination of peft and virtual pipeline parallel now yields a more useful error message:

python examples/nlp/language_modeling/tuning/megatron_gpt_peft_tuning.py \
    ++model.virtual_pipeline_model_parallel_size=10 \
    ++model.peft.peft_scheme=lora \
    ...

gives

  File "/opt/NeMo/examples/nlp/language_modeling/tuning/megatron_gpt_peft_tuning.py", line 73, in main
    model.add_adapter(peft_cfg_cls(model_cfg))
  File "/opt/NeMo/nemo/collections/nlp/parts/mixins/nlp_adapter_mixins.py", line 178, in add_adapter
    raise ValueError('Virtual pipeline model parallel is not supported when using PEFT')

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:

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

@github-actions github-actions bot added the NLP label Jan 22, 2024
@vysarge
Copy link
Contributor Author

vysarge commented Jan 22, 2024

@cuichenx / @ericharper can you review? Thanks!

@ericharper
Copy link
Collaborator

jenkins

@erhoo82 erhoo82 self-requested a review January 23, 2024 16:44
Copy link
Collaborator

@erhoo82 erhoo82 left a comment

Choose a reason for hiding this comment

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

LGTM

@ericharper ericharper merged commit a44b75d into NVIDIA:main Jan 23, 2024
11 checks passed
yaoyu-33 pushed a commit that referenced this pull request Jan 31, 2024
stevehuang52 pushed a commit that referenced this pull request Jan 31, 2024
ssh-meister pushed a commit to ssh-meister/NeMo that referenced this pull request Feb 15, 2024
@vysarge vysarge deleted the vsarge/vp_error_message_fix branch March 12, 2024 22:36
pablo-garay pushed a commit that referenced this pull request Mar 19, 2024
rohitrango pushed a commit to rohitrango/NeMo that referenced this pull request Jun 25, 2024
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.

None yet

3 participants