diff --git a/optimum/bettertransformer/models/__init__.py b/optimum/bettertransformer/models/__init__.py index 1e95c40026e..7f115c27b6b 100644 --- a/optimum/bettertransformer/models/__init__.py +++ b/optimum/bettertransformer/models/__init__.py @@ -38,7 +38,7 @@ BartEncoderLayerBetterTransformer, BertLayerBetterTransformer, CLIPLayerBetterTransformer, - DetrEncoderLayerBetterTransformer + DetrEncoderLayerBetterTransformer, DistilBertLayerBetterTransformer, FSMTEncoderLayerBetterTransformer, MBartEncoderLayerBetterTransformer, diff --git a/optimum/bettertransformer/models/encoder_models.py b/optimum/bettertransformer/models/encoder_models.py index 0151f67d55e..22f434c528f 100644 --- a/optimum/bettertransformer/models/encoder_models.py +++ b/optimum/bettertransformer/models/encoder_models.py @@ -11,7 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from typing import TYPE_CHECKING import torch import torch.nn as nn @@ -22,10 +21,6 @@ from .base import BetterTransformerBaseLayer -if TYPE_CHECKING: - from transformers import PretrainedConfig - - class AlbertLayerBetterTransformer(BetterTransformerBaseLayer, nn.Module): def __init__(self, albert_layer, config): r"""