-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[Sharderformer] Support zbv in Sharderformer Policy #6150
base: main
Are you sure you want to change the base?
[Sharderformer] Support zbv in Sharderformer Policy #6150
Conversation
falcon,gptj,mistral,opt,qwen2,t5, vit, whisper
ba7fc35
to
8cb74e7
Compare
3fd2402
to
70b0ae1
Compare
44b5786
to
37b670e
Compare
@@ -1020,3 +1202,158 @@ def forward(self, input_: Tensor) -> Tensor: | |||
return output | |||
else: | |||
return output, self.bias | |||
|
|||
|
|||
class FusedLinear1D(ParallelModule): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd better use a new name. This class does not use TP. Why name it "1D"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd better use a new name. This class does not use TP. Why name it "1D"?
Fixed in 25da23d
@@ -620,6 +634,154 @@ def forward(self, input_: Tensor) -> Tensor: | |||
return output, self.bias | |||
|
|||
|
|||
class GPT2FusedLinearConv1D(ParallelModule): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd better use a new name. This class does not use TP. Why name it "1D"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd better use a new name. This class does not use TP. Why name it "1D"?
Fixed in 25da23d
# if self.pipeline_stage_manager.is_last_stage(): | ||
# multiple_choice_head = self.model.multiple_choice_head | ||
# held_layers.append(self.model.lm_head) | ||
# held_layers.append(multiple_choice_head.summary) | ||
# held_layers.append(multiple_choice_head.activation) | ||
# held_layers.append(multiple_choice_head.first_dropout) | ||
# held_layers.append(multiple_choice_head.last_dropout) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clear useless comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clear useless comments
Removed.
n_stage=pp_size, | ||
n_micro=num_microbatches, | ||
f_cost=1, | ||
b_cost=1, | ||
w_cost=1, | ||
c_cost=1, | ||
f_mem=mem_f, | ||
b_mem=mem_b, | ||
w_mem=mem_w, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a guide to introduce how to set these values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a guide to introduce how to set these values
Updated in 25da23d.
Add detailed descriptions of the x_cost, x_mem parameters, and use cases.
📌 Checklist before creating the PR
[doc/gemini/tensor/...]: A concise description
pip install pre-commit && pre-commit install
🚨 Issue number
📝 What does this PR do?
💥 Checklist before requesting a review
⭐️ Do you enjoy contributing to Colossal-AI?
Tell us more if you don't enjoy contributing to Colossal-AI.