Skip to content

Download checkpoints from HuggingFace #9538

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

Merged
merged 8 commits into from
Mar 25, 2025
Merged

Download checkpoints from HuggingFace #9538

merged 8 commits into from
Mar 25, 2025

Conversation

jackzhxng
Copy link
Contributor

@jackzhxng jackzhxng commented Mar 24, 2025

Summary

If no checkpoint is specified during export_llama, download the checkpoint from HuggingFace if it is an OSS model.

Closes #8872

Test plan

Manual export

@jackzhxng jackzhxng requested a review from lucylq as a code owner March 24, 2025 13:09
Copy link

pytorch-bot bot commented Mar 24, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9538

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 19cda10 with merge base 655895f (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 24, 2025
@jackzhxng jackzhxng changed the base branch from main to jz/rename-phi4 March 24, 2025 13:10
@jackzhxng jackzhxng added the release notes: examples Changes to any of our example LLMs integrations, such as Llama3 and Llava label Mar 24, 2025

convert_weights(checkpoint_path, converted_path)
elif modelname == "smollm2":
pass
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR for this is still getting in

@@ -519,7 +523,53 @@ def canonical_path(path: Union[str, Path], *, dir: bool = False) -> str:
return return_val


def download_and_convert_hf_checkpoint(modelname: str) -> str:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put this in a separate util file? I think it'll be useful elsewhere too potentially and also this file is getting quite bloated too i think.

Base automatically changed from jz/rename-phi4 to main March 25, 2025 00:01
@jackzhxng jackzhxng merged commit 766bbdc into main Mar 25, 2025
80 of 81 checks passed
@jackzhxng jackzhxng deleted the jz/hf-download branch March 25, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: examples Changes to any of our example LLMs integrations, such as Llama3 and Llava
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using Hugging Face model card name in export_llama
3 participants