File tree Expand file tree Collapse file tree 3 files changed +2
-16
lines changed
decoder_only/vision_language
encoder_decoder/vision_language Expand file tree Collapse file tree 3 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,8 @@ def __init__(self, hf_runner: HfRunner):
97
97
self .tokenizer = hf_runner .tokenizer
98
98
self .dtype = hf_runner .model .dtype
99
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 )
101
102
self .vision_config = self .config .vision_config
102
103
self .use_thumbnail = self .config .use_thumbnail
103
104
self .min_num = self .config .min_dynamic_patch
Original file line number Diff line number Diff line change @@ -195,11 +195,6 @@ def _run_test(
195
195
def process (hf_inputs : BatchEncoding ):
196
196
return hf_inputs
197
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 )
203
198
with hf_runner (model ,
204
199
dtype = dtype ,
205
200
model_kwargs = {"device_map" : "auto" },
@@ -213,8 +208,6 @@ def process(hf_inputs: BatchEncoding):
213
208
for prompts , images in inputs
214
209
]
215
210
216
- from vllm .transformers_utils .configs .mllama import MllamaConfig
217
- AutoConfig .register ("mllama" , MllamaConfig , exist_ok = True )
218
211
for hf_outputs , vllm_outputs in zip (hf_outputs_per_image ,
219
212
vllm_outputs_per_image ):
220
213
check_logprobs_close (
Original file line number Diff line number Diff line change 1
- import contextlib
2
1
import enum
3
2
import json
4
3
from pathlib import Path
61
60
** _CONFIG_REGISTRY_OVERRIDE_HF
62
61
}
63
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
-
71
63
72
64
class ConfigFormat (str , enum .Enum ):
73
65
AUTO = "auto"
You can’t perform that action at this time.
0 commit comments