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

Save the hyperparameters to the checkpoint #1012

Merged
merged 9 commits into from
Mar 6, 2024
Merged

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Mar 5, 2024

Saves a hyperparameters.yaml file to the checkpoint. Feel free to discuss the naming on this PR.

This will also be used to store the prompt template so that it can be dynamically loaded from the checkpoint after finetuning.

Part of #1005

@awaelchli awaelchli changed the title [WIP] Save the hyperparameters to the checkpoint Save the hyperparameters to the checkpoint Mar 5, 2024
@awaelchli awaelchli marked this pull request as ready for review March 5, 2024 22:04
@awaelchli awaelchli added the enhancement New feature or request label Mar 5, 2024
@rasbt
Copy link
Collaborator

rasbt commented Mar 5, 2024

I wonder if we should add a model_dir or so to the hyperameter file. This could be

model_dir = out_dir/final

@awaelchli
Copy link
Contributor Author

@rasbt It is important that this file contains exactly the arguments that were passed into the script, to capture exactly how it was called. It's not the same as meta data.

It's not immediately clear to me how saving the path of the checkpoint where it is saved would be useful. Because that would become wrong once you move the checkpoint somewhere else.

@rasbt
Copy link
Collaborator

rasbt commented Mar 5, 2024

It's not immediately clear to me how saving the path of the checkpoint where it is saved would be useful. Because that would become wrong once you move the checkpoint somewhere else.

Ok that's fair. Never mind it was a silly idea.

@carmocca carmocca added this to the Configurability milestone Mar 6, 2024
lit_gpt/utils.py Show resolved Hide resolved
lit_gpt/utils.py Show resolved Hide resolved
lit_gpt/utils.py Show resolved Hide resolved
finetune/adapter.py Show resolved Hide resolved
@carmocca carmocca merged commit 281eace into wip Mar 6, 2024
8 checks passed
@carmocca carmocca deleted the refactor/save-hparams branch March 6, 2024 14:52
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.

3 participants