mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-07 20:10:17 +00:00
[pipeline] Add Pipeline Forward for GPT2Model Shardformer (#4224)
* * fix typehint & docstring in sharder.py * * update pipeline forward for GPT2Model * * add test for pipeline forward of GPT2Model * * add cache cleaning in gpt2 test * * change assert to raise command
This commit is contained in:
committed by
Hongxin Liu
parent
37d22f6878
commit
208ac8f2ba
@@ -129,7 +129,7 @@ class Linear1D_Col(ParallelModule):
|
||||
**kwargs)
|
||||
|
||||
with torch.no_grad():
|
||||
# the weigh to the linear layer is a transpose
|
||||
# the weight to the linear layer is a transpose
|
||||
# thus shard on row is equal to shard on column
|
||||
sharded_weight = shard_rowwise(module.weight.data, process_group)
|
||||
linear_1d.weight.data.copy_(sharded_weight)
|
||||
|
Reference in New Issue
Block a user