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

feat: Improve model checkpoint loading #253

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

5Hyeons
Copy link

@5Hyeons 5Hyeons commented Jun 13, 2024

Summary

This PR fixes the checkpoint loading issue in the second stage of training when using a single GPU. The second stage adds a 'module.' prefix to all parameter names, causing a mismatch with the first stage parameters.

Changes

  • Improved checkpoint loading to handle mismatched state_dict keys.
  • If direct loading fails, a new state_dict with adjusted keys is created and loaded.

Notes

  • Previously, print('%s loaded' % key) suggested parameters were loaded, even though strict=False prevented actual loading if keys did not match. This PR addresses this by ensuring proper parameter loading.

Related Issue

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.

1 participant