Skip to content

[shardformer] support GPTJ auto model sharding (except lazy init)#4825

Merged
ppt0011 merged 9 commits intohpcaitech:feature/shardformerfrom
ppt0011:feature/shardformer
Oct 13, 2023
Merged

[shardformer] support GPTJ auto model sharding (except lazy init)#4825
ppt0011 merged 9 commits intohpcaitech:feature/shardformerfrom
ppt0011:feature/shardformer

Conversation

@ppt0011
Copy link
Copy Markdown
Contributor

@ppt0011 ppt0011 commented Sep 27, 2023

📌 Checklist before creating the PR

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

🚨 Issue number

#4675

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?

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

💥 Checklist before requesting a review

  • I have linked my PR to an issue (instruction)
  • My issue clearly describes the problem/feature/proposal, with diagrams/charts/table/code if possible
  • I have performed a self-review of my code
  • I have added thorough tests.
  • 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.

@github-actions
Copy link
Copy Markdown
Contributor

The code coverage for the changed files is 84%.

Click me to view the complete report
Name                                                   Stmts   Miss  Cover
--------------------------------------------------------------------------
colossalai/shardformer/modeling/gptj.py                  347     99    71%
colossalai/shardformer/policies/auto_policy.py            33      4    88%
colossalai/shardformer/policies/gptj.py                  133      3    98%
tests/kit/model_zoo/registry.py                           21      0   100%
tests/kit/model_zoo/transformers/__init__.py              13      0   100%
tests/kit/model_zoo/transformers/gpt.py                   51      0   100%
tests/kit/model_zoo/transformers/gptj.py                  33      0   100%
tests/test_shardformer/test_model/test_shard_gptj.py      81     11    86%
--------------------------------------------------------------------------
TOTAL                                                    712    117    84%

@ppt0011 ppt0011 merged commit a0b7877 into hpcaitech:feature/shardformer Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants