diff --git a/tests/test_config.py b/tests/test_config.py index 5c7d23d61c783..18f26082eaeb3 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,7 +1,7 @@ import pytest from vllm.config import ModelConfig -from vllm.model_executor.layers.pooler import (PoolingConfig, PoolingType) +from vllm.model_executor.layers.pooler import PoolingConfig, PoolingType @pytest.mark.parametrize(("model_id", "expected_task"), [ diff --git a/vllm/config.py b/vllm/config.py index dcc3d96c8fe1d..470295942a423 100644 --- a/vllm/config.py +++ b/vllm/config.py @@ -5,19 +5,19 @@ Mapping, Optional, Set, Tuple, Type, Union) import torch -from transformers import PretrainedConfig import vllm.envs as envs +from transformers import PretrainedConfig from vllm.logger import init_logger -from vllm.model_executor.layers.quantization import QUANTIZATION_METHODS from vllm.model_executor.layers.pooler import PoolingConfig +from vllm.model_executor.layers.quantization import QUANTIZATION_METHODS from vllm.model_executor.models import ModelRegistry from vllm.platforms import current_platform from vllm.tracing import is_otel_available, otel_import_error_traceback from vllm.transformers_utils.config import (ConfigFormat, get_config, get_hf_image_processor_config, - get_pooling_config, - get_hf_text_config) + get_hf_text_config, + get_pooling_config) from vllm.utils import (GiB_bytes, cuda_device_count_stateless, get_cpu_memory, is_hip, is_openvino, is_xpu, print_warning_once) diff --git a/vllm/model_executor/layers/pooler.py b/vllm/model_executor/layers/pooler.py index a447d630e8f9f..d7cb111742836 100644 --- a/vllm/model_executor/layers/pooler.py +++ b/vllm/model_executor/layers/pooler.py @@ -1,5 +1,5 @@ -from enum import IntEnum from dataclasses import dataclass +from enum import IntEnum import torch import torch.nn as nn diff --git a/vllm/model_executor/model_loader/loader.py b/vllm/model_executor/model_loader/loader.py index b70e9d96ffe76..dabb13f035735 100644 --- a/vllm/model_executor/model_loader/loader.py +++ b/vllm/model_executor/model_loader/loader.py @@ -18,9 +18,9 @@ import torch from huggingface_hub import HfApi, hf_hub_download from torch import nn -from transformers import AutoModelForCausalLM, PretrainedConfig from transformers.utils import SAFE_WEIGHTS_INDEX_NAME +from transformers import AutoModelForCausalLM, PretrainedConfig from vllm.config import (CacheConfig, DeviceConfig, LoadConfig, LoadFormat, LoRAConfig, ModelConfig, MultiModalConfig, ParallelConfig, SchedulerConfig) @@ -28,9 +28,9 @@ get_tensor_model_parallel_world_size) from vllm.envs import VLLM_USE_MODELSCOPE from vllm.logger import init_logger +from vllm.model_executor.layers.pooler import PoolingConfig from vllm.model_executor.layers.quantization.base_config import ( QuantizationConfig) -from vllm.model_executor.layers.pooler import PoolingConfig from vllm.model_executor.model_loader.tensorizer import ( TensorizerConfig, is_vllm_tensorized, load_with_tensorizer, serialize_vllm_model, tensorizer_weights_iterator)