Skip to content

Add resume for adapter_v2, enable continued finetuning for adapter #1354

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

Merged
merged 7 commits into from
Apr 7, 2025

Conversation

altria-zewei-wang
Copy link
Contributor

Hi all!
I was checking #238 to add a function to finish resume finetuning for adapter. It would search the largest number of step point it saved from out_dir and update the state_dict.
Current Problem: I updated the step_count but find out to keep the iteration count from last time would have to read in the metrics in the log folder. The problem is that I don't know how to retrieve the corresponding version in the log file without adding an input of the version of the metrics.csv (currently not implemented).
Let me know what you think! Thanks for your repo!

@rasbt
Copy link
Contributor

rasbt commented Apr 25, 2024

Thanks for looking into this. Sorry, I haven't spent much time on thinking through the ramifications here. But would the simple resuming from the full finetuning code not work in your case:

https://github.com/Lightning-AI/litgpt/blob/main/litgpt/finetune/full.py#L43

@altria-zewei-wang
Copy link
Contributor Author

I was specifically looking into testing finetuning with adapter and loras in my paper, and that my gpu cuts off after certain time limit. I figure adding this feature can help anyone who is in similar situation as me.

@t-vi t-vi self-requested a review as a code owner January 30, 2025 08:17
@Borda Borda added the enhancement New feature or request label Mar 12, 2025
@Borda Borda enabled auto-merge (squash) April 3, 2025 01:54
Copy link
Collaborator

@t-vi t-vi left a comment

Choose a reason for hiding this comment

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

@Borda Borda merged commit 7baccd4 into Lightning-AI:main Apr 7, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants