未验证 提交 5ca26277 编写于 作者: R Reza Yazdani 提交者: GitHub

Fix CPU-Offload: Send groups of parameter lists as the FP16 parameters (#1774)

Co-authored-by: NOlatunji Ruwase <olruwase@microsoft.com>
上级 baef92e2
......@@ -1721,10 +1721,9 @@ class DeepSpeedZeroOptimizer(object):
if self.deepspeed_adam_offload:
from deepspeed.ops.adam import DeepSpeedCPUAdam
if type(self.optimizer) == DeepSpeedCPUAdam and self.dtype == torch.half:
bit16_param_groups = [
bit16_param_groups = [[
bit16_partitions[partition_id]
for bit16_partitions in self.parallel_partitioned_bit16_groups
]
] for bit16_partitions in self.parallel_partitioned_bit16_groups]
self.optimizer.step(fp16_param_groups=bit16_param_groups)
else:
self.optimizer.step()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册