mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-05 19:13:01 +00:00
[shardformer] refactored some doc and api (#4137)
* [shardformer] refactored some doc and api * polish code
This commit is contained in:
@@ -11,7 +11,7 @@ def build_model(model_fn):
|
||||
shard_config = ShardConfig(enable_fused_normalization=True)
|
||||
model_copy = copy.deepcopy(org_model)
|
||||
shard_former = ShardFormer(shard_config=shard_config)
|
||||
sharded_model = shard_former.shard_model(model_copy).cuda()
|
||||
sharded_model = shard_former.optimize(model_copy).cuda()
|
||||
return org_model, sharded_model
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user