litgpt icon indicating copy to clipboard operation
litgpt copied to clipboard

Add resume for adapter_v2, enable continued finetuning for adapter

Open altria-zewei-wang opened this issue 1 year ago • 2 comments

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!

altria-zewei-wang avatar Apr 25 '24 06:04 altria-zewei-wang

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

rasbt avatar Apr 25 '24 16:04 rasbt

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.

altria-zewei-wang avatar Apr 25 '24 16:04 altria-zewei-wang