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

[Feature] add HFCheckpointHook to auto save hf model after the whole training phase #621

Merged
merged 6 commits into from May 10, 2024

Conversation

HIT-cwh
Copy link
Collaborator

@HIT-cwh HIT-cwh commented Apr 26, 2024

Usage

custom_hooks = [
+    dict(type=HFCheckpointHook),
]

The HF model will be saved at work_dir/timestamp/hf_model

Notes

  1. As the priority of HFCheckpointHook is 95 which is lower than CheckpointHook in MMEngine, the hf model is saved only after the normal checkpoint saving process is complete. So feel free to use it.

@pppppM pppppM merged commit fc41943 into InternLM:main May 10, 2024
1 of 3 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants