Exception: data did not match any variant of untagged enum ModelWrapper at line 646524 column 3
#2
by
Maverick17
- opened
I can't run your code. The tokenizer name should be "deepseek-ai/deepseek-vl2", I guess.
---> 12 vl_chat_processor: DeepseekVLV2Processor = DeepseekVLV2Processor.from_pretrained(model_path)
13 tokenizer = vl_chat_processor.tokenizer
14
/usr/local/lib/python3.10/dist-packages/transformers/processing_utils.py in from_pretrained(cls, pretrained_model_name_or_path, cache_dir, force_download, local_files_only, token, revision, **kwargs)
890 # Determine if kwargs is a flat dictionary or contains nested dictionaries
891 if any(key in default_kwargs for key in kwargs):
--> 892 # kwargs is dictionary-based, and some keys match modality names
893 for modality, subdict in kwargs.items():
894 if modality in default_kwargs:
/usr/local/lib/python3.10/dist-packages/transformers/processing_utils.py in _get_arguments_from_pretrained(cls, pretrained_model_name_or_path, **kwargs)
936
937 </Tip>
--> 938
939 Args:
940 pretrained_model_name_or_path (`str` or `os.PathLike`):
/usr/local/lib/python3.10/dist-packages/transformers/tokenization_utils_base.py in from_pretrained(cls, pretrained_model_name_or_path, cache_dir, force_download, local_files_only, token, revision, trust_remote_code, *init_inputs, **kwargs)
2269 for key in cls.SPECIAL_TOKENS_ATTRIBUTES & init_kwargs.keys():
2270 if added_tokens_map != {} and init_kwargs[key] is not None:
-> 2271 if key != "additional_special_tokens":
2272 init_kwargs[key] = added_tokens_map.get(str(init_kwargs[key]), init_kwargs[key])
2273
/usr/local/lib/python3.10/dist-packages/transformers/tokenization_utils_base.py in _from_pretrained(cls, resolved_vocab_files, pretrained_model_name_or_path, init_configuration, token, cache_dir, local_files_only, _commit_hash, _is_local, trust_remote_code, *init_inputs, **kwargs)
2503 save_directory=save_directory,
2504 file_names=file_names,
-> 2505 legacy_format=legacy_format,
2506 filename_prefix=filename_prefix,
2507 )
/usr/local/lib/python3.10/dist-packages/transformers/models/llama/tokenization_llama_fast.py in __init__(self, vocab_file, tokenizer_file, clean_up_tokenization_spaces, unk_token, bos_token, eos_token, add_bos_token, add_eos_token, use_default_system_prompt, legacy, add_prefix_space, **kwargs)
155 kwargs["from_slow"] = True
156
--> 157 super().__init__(
158 vocab_file=vocab_file,
159 tokenizer_file=tokenizer_file,
/usr/local/lib/python3.10/dist-packages/transformers/tokenization_utils_fast.py in __init__(self, *args, **kwargs)
113 fast_tokenizer = copy.deepcopy(tokenizer_object)
114 elif fast_tokenizer_file is not None and not from_slow:
--> 115 # We have a serialization from tokenizers which let us directly build the backend
116 fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)
117 elif slow_tokenizer:
Exception: data did not match any variant of untagged enum ModelWrapper at line 646524 column 3