Skip to content

[shardformer] add performance benchmark of shardformer#4169

Closed
flybird11111 wants to merge 0 commit intohpcaitech:feature/flash-attention-shardformerfrom
flybird11111:feature/shardformer_benckmark
Closed

[shardformer] add performance benchmark of shardformer#4169
flybird11111 wants to merge 0 commit intohpcaitech:feature/flash-attention-shardformerfrom
flybird11111:feature/shardformer_benckmark

Conversation

@flybird11111
Copy link
Copy Markdown
Contributor

📌 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

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

#4168

📝 What does this PR do?

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

add performance benchmark of shardformer。

💥 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.

Comment thread colossalai/shardformer/README.md Outdated
We also conducted [benchmark tests](./examples/performance_benchmark.py) to evaluate the performance improvement of Shardformer. We compared the training time between the original model and the shard model.

In the case of using 2 GPUs, the training times are as follows:
| N_CTX | org_model | shard_model |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You need to explain the meaning of N_CTX and what kind of configurations are turned on for benchmarking.

Comment thread colossalai/shardformer/README.md Outdated
| 2048 | 46.6ms | 30.0ms |
| 4096 | 160.4ms | 89.8ms |

![Alt text](./examples/images/image-2-gpus.png)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't put this image in this folder. Create a pull request to put all images in https://github.com/hpcaitech/public_assets/tree/main/colossalai/img/shardformer. Name your images clearly e.g. benchmark_gpus_2.png

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.

2 participants