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

Add Adapter and IA3 support for MCore models #7750

Merged
merged 17 commits into from
Nov 9, 2023
Merged

Conversation

cuichenx
Copy link
Collaborator

@cuichenx cuichenx commented Oct 18, 2023

What does this PR do ?

Add Adapter and IA3 for MCore PEFT tuning.
Previously, only LoRA and PTuning was supported for MCore models.
Verified training curve and eval results on Squad are identical as NeMo GPT model.

Collection: NLP

Changelog

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

Usage

model.peft.peft_scheme=adapter
# OR
model.peft.peft_scheme=ia3
# are now supported for mcore models (model.mcore_gpt=True)

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 Oct 18, 2023
@cuichenx cuichenx requested a review from arendu October 18, 2023 18:27
@cuichenx cuichenx requested review from arendu and removed request for arendu October 30, 2023 15:07
Copy link
Collaborator

@arendu arendu 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
Copy link
Collaborator

jenkins

@cuichenx cuichenx merged commit 77d1386 into main Nov 9, 2023
12 of 15 checks passed
@cuichenx cuichenx deleted the chcui/mcore_adapter_ia3 branch November 9, 2023 14:55
@cuichenx cuichenx mentioned this pull request Nov 13, 2023
8 tasks
pzelasko pushed a commit to pzelasko/NeMo that referenced this pull request Jan 3, 2024
* add support for mcore (canonical) adapter

Signed-off-by: Chen Cui <[email protected]>

* add support for mcore ia3

Signed-off-by: Chen Cui <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* consolidate ia3 and lora mcore mixin classes

Signed-off-by: Chen Cui <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix bug

Signed-off-by: Chen Cui <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Chen Cui <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Piotr Żelasko <[email protected]>
rohitrango pushed a commit to rohitrango/NeMo that referenced this pull request Jun 25, 2024
* add support for mcore (canonical) adapter

Signed-off-by: Chen Cui <[email protected]>

* add support for mcore ia3

Signed-off-by: Chen Cui <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* consolidate ia3 and lora mcore mixin classes

Signed-off-by: Chen Cui <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix bug

Signed-off-by: Chen Cui <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Chen Cui <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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