LLaVA icon indicating copy to clipboard operation
LLaVA copied to clipboard

[Question] KeyError: 'LlavaConfig' of using cli

Open chrisx599 opened this issue 1 year ago • 3 comments

Question

'''

python -m llava.serve.cli \

--model-path checkpoints/llava-v1.5-7b-lora \
--model-base checkpoints/vicuna-7b-v1.5 \
--image-file "https://lmg.jj20.com/up/allimg/tp03/1Z921110450D60-0-lp.jpg" \
--load-4bit

[2023-12-25 13:22:09,390] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect) Traceback (most recent call last): File "/root/miniconda3/envs/llava/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/root/miniconda3/envs/llava/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/zhaobai46a02/LLaVA/llava/serve/cli.py", line 125, in main(args) File "/zhaobai46a02/LLaVA/llava/serve/cli.py", line 32, in main tokenizer, model, image_processor, context_len = load_pretrained_model(args.model_path, args.model_base, model_name, args.load_8bit, args.load_4bit, device=args.device) File "/zhaobai46a02/LLaVA/llava/model/builder.py", line 48, in load_pretrained_model tokenizer = AutoTokenizer.from_pretrained(model_base, use_fast=False) File "/root/miniconda3/envs/llava/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 718, in from_pretrained tokenizer_class_py, tokenizer_class_fast = TOKENIZER_MAPPING[type(config)] File "/root/miniconda3/envs/llava/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 671, in getitem model_type = self._reverse_config_mapping[key.name] KeyError: 'LlavaConfig' ''' I have already dowload the weight of llava-v1.5-7b-lora and vicuna-7b-v1.5, but when i use cli, it happens like this

chrisx599 avatar Dec 25 '23 13:12 chrisx599

I have the same issue. Did you fix it

Lee-ray-a avatar Jan 15 '24 01:01 Lee-ray-a

@Lee-ray-a @chrisx599 Did you manage to solve this?

attnmamba avatar Feb 01 '24 04:02 attnmamba

has anyone fixed it?

cyj95 avatar Feb 01 '24 08:02 cyj95