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 Bug on Peft Config Check in AutoGPTQ Plugin #82

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

achew010
Copy link
Collaborator

@achew010 achew010 commented Sep 6, 2024

Description

This is a fix to address a mistake with a check on target_modules in peft_config. Target modules come in as a set and the assertion will be raised unnecessarily.

mistake:
assert isinstance(tm, (list, str)), "target modules can only be list or string"

correction:
assert isinstance(tm, (list, set, str)), "target modules can only be list, set or string"

Tested with alpaca on both all-linear and q_proj k_proj v_proj o_proj

all-linear

***** Running training *****
  Num examples = 2,754
  Num Epochs = 1
  Instantaneous batch size per device = 4
  Total train batch size (w. parallel, distributed & accumulation) = 4
  Gradient Accumulation steps = 1
  Total optimization steps = 100
  Number of trainable parameters = 41,943,040

q_proj k_proj v_proj o_proj

***** Running training *****
  Num examples = 2,754
  Num Epochs = 1
  Instantaneous batch size per device = 4
  Total train batch size (w. parallel, distributed & accumulation) = 4
  Gradient Accumulation steps = 1
  Total optimization steps = 100
  Number of trainable parameters = 13,631,488

Signed-off-by: 1000850000 user <aaron.chew1@ibm.com>
Copy link
Contributor

@fabianlim fabianlim left a comment

Choose a reason for hiding this comment

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

do not bump version in this PR

Signed-off-by: 1000850000 user <aaron.chew1@ibm.com>
@fabianlim fabianlim merged commit 5e09fc6 into foundation-model-stack:main Sep 6, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants