-
Notifications
You must be signed in to change notification settings - Fork 47
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
fix(910B): fix bugs in 910B for varlen and fixlen FA #309
Conversation
补充PR的description |
@@ -309,13 +309,14 @@ def _forward_step( | |||
output_obj = loss_reduced | |||
|
|||
moe_loss = ( | |||
sum(moe_losses) * gpc.config.loss.moe_loss_coeff | |||
sum(moe_losses) * gpc.config.loss.moe_loss_coeff # pylint: disable=E0606 |
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.
why disable=E0606
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.
这个有点怪就是在910B上执行pre-commit检查他会在这行出这个问题,只好disable了
# reformat cos/sin shape. | ||
cos = torch.cat((cos, cos), dim=-1)[None, :, None, :] | ||
sin = torch.cat((sin, sin), dim=-1)[None, :, None, :] | ||
|
||
if len(x.shape) == 5: | ||
q, k, _ = x.unbind(dim=2) | ||
|
||
q, k = q.squeeze(dim=2), k.squeeze(dim=2) |
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.
这不是在https://github.com/InternLM/InternEvo/pull/296/files 去掉了吗,为啥这里又改回来
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.
没有,这个是我们当时说的他不是有个漏加的地方么,就是296的PR去掉了attention那块的squeeze,当时不是说embedding这应该加一个squeeze再
done |
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
issue 307
Modification
BC-breaking (Optional)
Does the modification introduce changes that break the backward compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here and update the documentation.
Checklist
Before PR:
After PR: