зеркало из https://github.com/microsoft/DeepSpeed.git
Update replace_module.py, test-gptj.py related fix (#2269)
Fix RuntimeError: Boolean value of Tensor with more than one value is ambiguous when running test-gptj.py
This commit is contained in:
Родитель
55b7b9e008
Коммит
a7ee688a6f
|
@ -656,7 +656,7 @@ def replace_transformer_layer(orig_layer_impl,
|
|||
if z_inference:
|
||||
with deepspeed.zero.GatheredParameters(child.bias, modifier_rank=0):
|
||||
new_bias.data.copy_(child.bias.data)
|
||||
elif child.bias:
|
||||
elif child.bias is not None:
|
||||
new_bias.data.copy_(child.bias.data)
|
||||
return LinearAllreduce(data, child.bias if child.bias is None else \
|
||||
torch.nn.parameter.Parameter(new_bias.to(torch.cuda.current_device())), mp_group)
|
||||
|
|
Загрузка…
Ссылка в новой задаче