Skip to content

Commit

Permalink
Add LoRA support for livecell finetuning scripts (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
anwai98 authored Sep 5, 2024
1 parent d0a31eb commit ff0539b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 139 deletions.
15 changes: 0 additions & 15 deletions finetuning/livecell/lora/README.md

This file was deleted.

124 changes: 0 additions & 124 deletions finetuning/livecell/lora/train_livecell.py

This file was deleted.

5 changes: 5 additions & 0 deletions finetuning/livecell_finetuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def finetune_livecell(args):
save_root=args.save_root,
scheduler_kwargs=scheduler_kwargs,
save_every_kth_epoch=args.save_every_kth_epoch,
lora_rank=args.lora_rank,
)

if args.export_path is not None:
Expand Down Expand Up @@ -116,9 +117,13 @@ def main():
parser.add_argument(
"--n_objects", type=int, default=25, help="The number of instances (objects) per batch used for finetuning."
)
parser.add_argument(
"--lora_rank", type=int, default=None, help="The rank for low rank adaptation of the attention layers."
)
args = parser.parse_args()
finetune_livecell(args)


if __name__ == "__main__":
main()

0 comments on commit ff0539b

Please sign in to comment.