Unverified Commit 0ff8406b authored by ver217's avatar ver217 Committed by GitHub
Browse files

[chatgpt] allow shard init and display warning (#2986)

parent f5ca0397
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment