A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 10:45 UTC
[Bugfix] Deprecate registration of custom configs to huggingface (#9083)
Chen Zhang committed
Oct 5, 2024 at 06:56 UTC
cfadb9c68798c0cc4d674de19970a8e3b5ea1273
3 files changed
+2
-16
tests/models/decoder_only/vision_language/test_internvl.py
+2
-1
@@ -97,7 +97,8 @@ def run_test(
97
self.tokenizer = hf_runner.tokenizer
98
self.dtype = hf_runner.model.dtype
99
100
- self.config = AutoConfig.from_pretrained(hf_runner.model_name)
100
+ self.config = AutoConfig.from_pretrained(hf_runner.model_name,
101
+ trust_remote_code=True)
102
self.vision_config = self.config.vision_config
103
self.use_thumbnail = self.config.use_thumbnail
104
self.min_num = self.config.min_dynamic_patch
tests/models/encoder_decoder/vision_language/test_mllama.py
-7
@@ -195,11 +195,6 @@ def _run_test(
195
def process(hf_inputs: BatchEncoding):
196
return hf_inputs
197
198
- from transformers.models.mllama import MllamaConfig as MllamaConfigHf
199
-
200
- # use transformer's MllamaConfig for hf_runner
201
- # and vllm's MllamaConfig for vllm_runner
202
- AutoConfig.register("mllama", MllamaConfigHf, exist_ok=True)
198
with hf_runner(model,
199
dtype=dtype,
200
model_kwargs={"device_map": "auto"},
@@ -213,8 +208,6 @@ def _run_test(
208
for prompts, images in inputs
209
]
210
216
- from vllm.transformers_utils.configs.mllama import MllamaConfig
217
- AutoConfig.register("mllama", MllamaConfig, exist_ok=True)
211
for hf_outputs, vllm_outputs in zip(hf_outputs_per_image,
212
vllm_outputs_per_image):
213
check_logprobs_close(
vllm/transformers_utils/config.py
-8
@@ -1,4 +1,3 @@
1
-import contextlib
1
import enum
2
import json
3
from pathlib import Path
@@ -61,13 +60,6 @@ _CONFIG_REGISTRY: Dict[str, Type[PretrainedConfig]] = {
60
**_CONFIG_REGISTRY_OVERRIDE_HF
61
}
62
64
-for name, cls in _CONFIG_REGISTRY.items():
65
- with contextlib.suppress(ValueError):
66
- if name in _CONFIG_REGISTRY_OVERRIDE_HF:
67
- AutoConfig.register(name, cls, exist_ok=True)
68
- else:
69
- AutoConfig.register(name, cls)
70
-
63
64
class ConfigFormat(str, enum.Enum):
65
AUTO = "auto"