Open Roachxzq opened 3 weeks ago
Because our model doesn't include the tokenizer file, it only includes the projector weight, you should load the tokenizer using base model weight. Our released projector is based on lmsys/vicuna-7b-v1.5-16k, you can use AutoTokenizer.from_pretrained(" lmsys/vicuna-7b-v1.5-16k")
Hello, it's a great work for me! I try to download model on huggingface.
Load model directly
from transformers import AutoTokenizer address = "./src/model/llaga-simteg-HO-classification" config = AutoTokenizer.from_pretrained(address, padding_side="left")
face the problem:
KeyError Traceback (most recent call last) File c:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\models\auto\configuration_auto.py:993, in AutoConfig.from_pretrained(cls, pretrained_model_name_or_path, **kwargs) 992 try: --> 993 config_class = CONFIG_MAPPING[config_dict["model_type"]] 994 except KeyError:
File c:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\models\auto\configuration_auto.py:695, in _LazyConfigMapping.getitem(self, key) 694 if key not in self._mapping: --> 695 raise KeyError(key) 696 value = self._mapping[key]
KeyError: 'llaga'
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last) [d:](file://\src\LLaGA-master\test.py in line 9 [5](file:///src/model/llaga-simteg-HO-classification" [6](file://src/model/GraphWiz_LLaMA2_7B_DPO" 7 # address = "meta-llama/Meta-Llama-Guard-2-8B" 8 # address = 'src/model/vicuna-7b-v1.5' ----> 9 config = AutoTokenizer.from_pretrained(address, padding_side="left")
File c:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\models\auto\tokenization_auto.py:854, in AutoTokenizer.from_pretrained(cls, pretrained_model_name_or_path, *inputs, **kwargs) ... 1001 else: 1002 # Fallback: use pattern matching on the string. 1003 # We go from longer names to shorter names to catch roberta before bert (for instance)
ValueError: The checkpoint you are trying to load has model type
llaga
but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.Reinstall the latest transformers but it didn't work...