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

Propagate name_or_path through HF Checkpointer #1402

Closed
wants to merge 1 commit into from

Conversation

snarayan21
Copy link
Contributor

Makes sure to propagate model name_or_path through HF checkpointer (similar to how we do for generation config).

Note that since PretrainedConfig always has the attr name_or_path, we don't need to check hasattr. All instances of PreTrainedModel will have name_or_path (which defaults to "").

Note that if the pretrained_model_name_or_path is a local path then name_or_path will also be a local path. And so when saving out LoRA adapters, for example, the adapter_config.json will have base_model_name_or_path as the local path. This PR does not solve this problem. IMO we should add a new optional arg to ComposerHFCausalLM that's the true model name and propagate that through model transforms & HF checkpointer instead of name_or_path.

@snarayan21 snarayan21 requested a review from a team as a code owner July 28, 2024 22:33
@snarayan21
Copy link
Contributor Author

not needed rn

@snarayan21 snarayan21 closed this Jul 28, 2024
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