[shardformer] add gpt2 policy and modify shard and slicer to support (#3883)

* add gpt2 policy and modify shard and slicer to support

* remove unused code

* polish code
This commit is contained in:
FoolPlayer
2023-06-07 16:09:40 +08:00
committed by Frank Lee
parent 70173e3123
commit 79f8d5d54b
7 changed files with 233 additions and 44 deletions

View File

@@ -1,4 +1,3 @@
from dataclasses import dataclass
from typing import Any, Callable, Dict, List, Tuple, Type
import torch.nn as nn