Skip to content

Commit

Permalink
fix import errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bmullick-amd authored Dec 18, 2024
1 parent 8b78df7 commit b554266
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions vllm/model_executor/models/t5.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import copy
import os
from typing import Iterable, List, Optional, Tuple
import torch
from torch import nn
import torch.nn.functional as F
import torch # type: ignore
from torch import nn # type: ignore
import torch.nn.functional as F # type: ignore
from transformers import T5Config
from transformers.utils import logging

Expand All @@ -39,7 +39,6 @@
ParallelLMHead, VocabParallelEmbedding)
from vllm.model_executor.model_loader.weight_utils import default_weight_loader
from vllm.model_executor.sampling_metadata import SamplingMetadata
# from flash_attn import flash_attn_func

logger = logging.get_logger(__name__)

Expand Down Expand Up @@ -68,9 +67,8 @@ def load_tf_weights_in_t5(model, config, tf_checkpoint_path):
"""Load tf checkpoints in a pytorch model."""
try:
import re

import numpy as np
import tensorflow as tf
import numpy as np # type: ignore
import tensorflow as tf # type: ignore
except ImportError:
logger.error(
"TensorFlow is to be installed. Please see "
Expand Down

0 comments on commit b554266

Please sign in to comment.