-
-
Notifications
You must be signed in to change notification settings - Fork 887
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 tests for merging lora and validating the dtype #1512
base: main
Are you sure you want to change the base?
Conversation
cfg.lora_model_dir = cfg.output_dir | ||
cfg.load_in_4bit = False | ||
cfg.load_in_8bit = False | ||
cfg.flash_attention = False | ||
cfg.deepspeed = None | ||
cfg.fsdp = None |
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 can be excluded as the modify_cfg_for_merge should've set it?
cfg.lora_model_dir = cfg.output_dir | |
cfg.load_in_4bit = False | |
cfg.load_in_8bit = False | |
cfg.flash_attention = False | |
cfg.deepspeed = None | |
cfg.fsdp = None |
cfg.fsdp = None | ||
|
||
cfg = modify_cfg_for_merge(cfg) | ||
cfg.merge_lora = True |
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.
Let's move this setting inside the modify_cfg function as well.
@@ -27,21 +28,26 @@ def do_cli(config: Path = Path("examples/"), **kwargs): | |||
flash_attention=False, |
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.
If the above section already sets these properties, is it necessary to set it again below?
# pylint: disable=duplicate-code | ||
cfg = DictDefault( | ||
{ | ||
"base_model": "JackFram/llama-68m", |
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.
Also, sometimes, this issue can occur for different model types. For ex, previous llama merge was fine, but mistral was not. Do we need to test this for other arch?
cli_args = TrainerCliArgs() | ||
dataset_meta = load_datasets(cfg=cfg, cli_args=cli_args) | ||
|
||
train(cfg=cfg, cli_args=cli_args, dataset_meta=dataset_meta) |
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 don't think you need to train a model, maybe a tiny adapter can be uploaded to HF which we use for merge?
No description provided.