Skip to content
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

perform secondary fine-tuning on the basis of fine-tuning the first model #942

Closed
xjy2020 opened this issue May 6, 2024 · 4 comments
Closed

Comments

@xjy2020
Copy link

xjy2020 commented May 6, 2024

How can I perform secondary fine-tuning on the basis of fine-tuning the first model?

@ebsmothers
Copy link
Contributor

@xjy2020 thanks for creating the issue. In general you should be able to run a second fine-tuning script using the output paths of your first fine-tune. So e.g. for llama3/8B_lora you would want to modify these lines of the config to point to the directory and filename(s) of your first fine-tuned checkpoint.

@bjohn22
Copy link

bjohn22 commented May 11, 2024

Would user also need to swap out this: torchtune.utils.FullModelMetaCheckpointer
in Here especially if fine tuned llama3 was downloaded from HF?

@ebsmothers
Copy link
Contributor

Hi @bjohn22 it depends on the type of checkpoint that you download. So FullModelMetaCheckpointer checkpoints can still be downloaded from HF. For instance the tune download command given for our Llama3-8B configs (see e.g. here) will download Meta format checkpoints from HF. In that case you would still use FullModelMetaCheckpointer. Note that for Llama3-8B-Instruct the same model page contains both HF format and Meta format checkpoints. See here -- the HF format weights are in the safetensors files, while the Meta format weights are under the subdirectory original/.

For other community fine-tuned checkpoints on the hub, it may vary, but I suspect many will be in HF format. Btw you can also read our checkpointing deep-dive which covers this topic in more detail.

@kartikayk
Copy link
Contributor

@xjy2020 let us know if you have any more questions or if the comments were not helpful! I'm closing this issue, but please feel free to reopen if there are more follow ups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants