[shardformer] add gpt2 test and layer class refactor (#4041)

* add gpt2 test and layer class refactor

* add dropout in gpt2 policy
This commit is contained in:
FoolPlayer
2023-06-20 11:45:16 +08:00
committed by Frank Lee
parent d857f3dbba
commit 4021b9a8a2
14 changed files with 1400 additions and 840 deletions

View File

@@ -4,7 +4,7 @@ import torch
import torch.nn as nn
from torch.distributed import ProcessGroup
from .layers import ParallelModule
from .parallelmodule import ParallelModule
from .utils import create_randomizer_with_offset