From 09580451ac0a4708cbb64b4b32f58afd292248ae Mon Sep 17 00:00:00 2001 From: kk <43161300+kkHuang-amd@users.noreply.github.com> Date: Mon, 16 Sep 2024 22:11:27 +0800 Subject: [PATCH] [Grok-1] fix the run-time error "Can't pickle : it's not the same object as transformers_modules.configuration_grok1.Grok1Config" in fp16/bf16 run (#184) Co-authored-by: wunhuang --- vllm/transformers_utils/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vllm/transformers_utils/config.py b/vllm/transformers_utils/config.py index 199c1caa2164e..64b2e29764cdf 100644 --- a/vllm/transformers_utils/config.py +++ b/vllm/transformers_utils/config.py @@ -138,6 +138,10 @@ def get_config( raise RuntimeError(err_msg) from e else: raise e + if config.model_type in _CONFIG_REGISTRY: + config_class = _CONFIG_REGISTRY[config.model_type] + config = config_class.from_pretrained( + model, revision=revision, code_revision=code_revision) elif config_format == ConfigFormat.MISTRAL: config = load_params_config(model, revision)