wyooyw

Results 5 comments of wyooyw

> > out 是分子除分母的结果,从外面看减没减影响不大,但是估计里面的实现是减最大值实现的。然后 lse 是纯粹的 lse。 > > 总感觉哪里有点问题,这是更新out的代码out = torch.exp(lse - new_lse) * out + torch.exp(block_lse - new_lse) * block_out;如果lse没有减掉最大值的话,那么上述的out的更新公式中的分母(lse)也是没有减掉最大值的,这样的话计算结果应该是不对的? 我也有类似的疑惑

> > > out 是分子除分母的结果,从外面看减没减影响不大,但是估计里面的实现是减最大值实现的。然后 lse 是纯粹的 lse。 > > > > > > 总感觉哪里有点问题,这是更新out的代码out = torch.exp(lse - new_lse) * out + torch.exp(block_lse - new_lse) * block_out;如果lse没有减掉最大值的话,那么上述的out的更新公式中的分母(lse)也是没有减掉最大值的,这样的话计算结果应该是不对的? > > 我也有类似的疑惑...

I fixed the bug in PR [#6546]. The PR has not been merged yet.

@microsoft-github-policy-service agree

> @wyooyw It seems that you should also delete or comment https://github.com/microsoft/DeepSpeed/blob/master/deepspeed/runtime/zero/stage_1_and_2.py#L1072 when you delete https://github.com/microsoft/DeepSpeed/blob/master/deepspeed/runtime/zero/stage_1_and_2.py#L1079 Thank you for your suggestion. This redundant line of code has been removed.