mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-08-06 02:24:31 +00:00
[chatgpt] allow shard init and display warning (#2986)
This commit is contained in:
parent
f5ca0397dd
commit
0ff8406b00
@ -79,8 +79,9 @@ class ColossalAIStrategy(DDPStrategy):
|
||||
self.stage = stage
|
||||
# TODO(ver217): support shard_init when using from_pretrained()
|
||||
if shard_init:
|
||||
warnings.warn(f'Shard init is not supported yet. Ignore.')
|
||||
shard_init = False
|
||||
warnings.warn(
|
||||
f'Shard init is not supported model.from_pretrained() yet. Please load weights after strategy.prepare()'
|
||||
)
|
||||
self.shard_init = shard_init
|
||||
self.gemini_config = dict(device=get_current_device(),
|
||||
placement_policy=placement_policy,
|
||||
|
Loading…
Reference in New Issue
Block a user