-
Notifications
You must be signed in to change notification settings - Fork 185
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 DoRA pass #1579
base: main
Are you sure you want to change the base?
Add DoRA pass #1579
Conversation
18d0645
to
64c66f9
Compare
@classmethod | ||
def _default_config(cls, accelerator_spec: AcceleratorSpec) -> Dict[str, PassConfigParam]: | ||
config = { | ||
"ephemeral_gpu_offload": PassConfigParam( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be used with LoRA also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, but from Huggingface documentation, this option is only used for Dora, so I didn't add this for Lora.
return config | ||
|
||
def _run_for_config(self, model: HfModelHandler, config: Dict[str, Any], output_model_path: str) -> HfModelHandler: | ||
# convert config to pass config class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is identical as LoRA pass except the use_dora flag on enable_lora().
How could we avoid code duplication? The comments in LoRA's _run_for_config() has additional details that could be useful here also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true. I'm working on LoHa and LoKr also. Let me revisit this when adding those 2.
Describe your changes
Checklist before requesting a review
lintrunner -a
(Optional) Issue link