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

feat: Add support for target_modules List #439

Closed
wants to merge 2 commits into from

Conversation

ishaansehgal99
Copy link
Collaborator

Reason for Change:
target_modules LoRAConfig parameter specifies which parts of the model should be adapted using LoRA. It can either be a string or string array. This PR adds support for array type arguments. It also does a validation check that target_modules is either of type string or string array.

Example usage of target modules here

https://github.com/huggingface/peft/blob/main/src/peft/tuners/lora/config.py#L51-L58

https://stackoverflow.com/questions/76768226/target-modules-for-applying-peft-lora-on-different-models

@ishaansehgal99 ishaansehgal99 changed the title feat: Add support for List Arguments feat: Add support for target_modules List May 28, 2024
Copy link

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 56.52174% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 60.51%. Comparing base (b65dd2e) to head (9e33781).
Report is 4 commits behind head on main.

Files Patch % Lines
api/v1alpha1/params_validation.go 56.52% 6 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #439      +/-   ##
==========================================
- Coverage   61.09%   60.51%   -0.59%     
==========================================
  Files          29       29              
  Lines        2303     2497     +194     
==========================================
+ Hits         1407     1511     +104     
- Misses        828      897      +69     
- Partials       68       89      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Fei-Guo Fei-Guo left a comment

Choose a reason for hiding this comment

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

Q: should we validate the content of the string? I don't see much value in validating the data type to be string or array of string.

@ishaansehgal99
Copy link
Collaborator Author

Unecessary Validation check

@ishaansehgal99 ishaansehgal99 deleted the Ishaan/support-target-modules branch July 12, 2024 22:35
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