mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-05-31 11:25:27 +00:00
try import deepspeed when using zero (#130)
This commit is contained in:
parent
b7975d2bcd
commit
9ef05ed1fc
@ -29,6 +29,7 @@ def convert_to_zero(model: nn.Module,
|
||||
:return: (model, optimizer)
|
||||
:rtype: Tuple
|
||||
"""
|
||||
import deepspeed
|
||||
assert level == 2 or level == 3, 'Only ZERO Optimizer Level 2 and 3 are provided'
|
||||
model = NaiveAMPModel(model, output_to_fp32=False)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user