Skip to content

[checkpoint] support huggingface style sharded checkpoint#3461

Merged
FrankLeeeee merged 6 commits intohpcaitech:mainfrom
flybird11111:main
Apr 6, 2023
Merged

[checkpoint] support huggingface style sharded checkpoint#3461
FrankLeeeee merged 6 commits intohpcaitech:mainfrom
flybird11111:main

Conversation

@flybird11111
Copy link
Copy Markdown
Contributor

@flybird11111 flybird11111 commented Apr 6, 2023

📌 Checklist before creating the PR

  • [ yes ] I have created an issue for this PR for traceability
  • [ yes ] The title follows the standard format: [doc/gemini/tensor/...]: A concise description
  • [ yes ] I have added relevant tags if possible for us to better distinguish different PRs

🚨 resolved #3463

Link this PR to your issue with words like fixed to automatically close the linked issue upon merge

e.g. fixed #1234, closed #1234, resolved #1234

📝 What does this PR do?

support loading from and saving as HF sharded checkpoint.

Summarize your work here.
if you have any plots/diagrams/screenshots/tables, please attach them here.

💥 Checklist before requesting a review

  • [ yes ] I have linked my PR to an issue (instruction)
  • [ yes ] My issue clearly describes the problem/feature/proposal, with diagrams/charts/table/code if possible
  • [ yes ] I have performed a self-review of my code
  • [ yes ] I have added thorough tests.
  • [ yes ] I have added docstrings for all the functions/methods I implemented

⭐️ Do you enjoy contributing to Colossal-AI?

  • 🌝 Yes, I do.
  • 🌚 No, I don't.

Tell us more if you don't enjoy contributing to Colossal-AI.

@FrankLeeeee
Copy link
Copy Markdown
Contributor

Can you refactor your code according to the quality check here?
https://www.codefactor.io/repository/github/hpcaitech/colossalai/pull/3461

Comment thread colossalai/checkpoint_io/general_checkpoint_io.py
Comment thread colossalai/checkpoint_io/general_checkpoint_io.py Outdated
Comment thread colossalai/checkpoint_io/general_checkpoint_io.py Outdated
Comment thread colossalai/checkpoint_io/index_file.py Outdated
Comment thread colossalai/checkpoint_io/utils.py Outdated
Comment thread colossalai/checkpoint_io/utils.py Outdated
Comment thread colossalai/checkpoint_io/index_file.py Outdated
@flybird11111 flybird11111 changed the title [checkpoint] refactored the API and added safetensors support [checkpoint] support huggingface style sharded checkpoint Apr 6, 2023
@flybird11111 flybird11111 requested a review from FrankLeeeee April 6, 2023 08:20
@FrankLeeeee FrankLeeeee merged commit 52a933e into hpcaitech:main Apr 6, 2023
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.

[checkpoint] support huggingface style sharded checkpoint

2 participants