You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
model = AutoModelForCausalLM.from_pretrained(
'./checkpoints-llama3-8b/bunny-llama3-8b/checkpoint-500',
torch_dtype=torch.float16, # float32 for cpu
device_map='auto',
trust_remote_code=True)
Traceback (most recent call last):
File "/home/xmyu/miniconda3/envs/bunny/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1023, in from_pretrained
config_class = CONFIG_MAPPING[config_dict["model_type"]]
File "/home/xmyu/miniconda3/envs/bunny/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 725, in getitem
raise KeyError(key)
KeyError: 'bunny-llama'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/xmyu/Bunny_text/checkpoints-llama3-8b/bunny-llama3-8b/test.py", line 17, in
model = AutoModelForCausalLM.from_pretrained(
File "/home/xmyu/miniconda3/envs/bunny/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 526, in from_pretrained
config, kwargs = AutoConfig.from_pretrained(
File "/home/xmyu/miniconda3/envs/bunny/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1025, in from_pretrained
raise ValueError(
ValueError: The checkpoint you are trying to load has model type bunny-llama 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.
请问我该如何正确加载模型?
The text was updated successfully, but these errors were encountered:
你好,当我想要加载我自己训练好的基于 llama3-8b 的 bunny 模型时:
model = AutoModelForCausalLM.from_pretrained(
'./checkpoints-llama3-8b/bunny-llama3-8b/checkpoint-500',
torch_dtype=torch.float16, # float32 for cpu
device_map='auto',
trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(
'./checkpoints-llama3-8b/bunny-llama3-8b/checkpoint-500',
trust_remote_code=True)
报错:
Traceback (most recent call last):
File "/home/xmyu/miniconda3/envs/bunny/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1023, in from_pretrained
config_class = CONFIG_MAPPING[config_dict["model_type"]]
File "/home/xmyu/miniconda3/envs/bunny/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 725, in getitem
raise KeyError(key)
KeyError: 'bunny-llama'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/xmyu/Bunny_text/checkpoints-llama3-8b/bunny-llama3-8b/test.py", line 17, in
model = AutoModelForCausalLM.from_pretrained(
File "/home/xmyu/miniconda3/envs/bunny/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 526, in from_pretrained
config, kwargs = AutoConfig.from_pretrained(
File "/home/xmyu/miniconda3/envs/bunny/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1025, in from_pretrained
raise ValueError(
ValueError: The checkpoint you are trying to load has model type
bunny-llama
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.请问我该如何正确加载模型?
The text was updated successfully, but these errors were encountered: