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
Traceback (most recent call last):
File "/opt/ai/WisdomShell/CodeShell-7B-Chat-int4/finetune/test.py", line 8, in<module>
model = AutoModelForCausalLM.from_pretrained("output_models", trust_remote_code=True, local_files_only=True).to(device)
File "/root/anaconda3/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 560, in from_pretrained
return model_class.from_pretrained(
File "/root/.cache/huggingface/modules/transformers_modules/output_models/modeling_codeshell.py", line 1056, in from_pretrained
model = load_state_dict_for_qunantied_model(model, state_dict)
File "/root/.cache/huggingface/modules/transformers_modules/output_models/quantizer.py", line 379, in load_state_dict_for_qunantied_model
set_value(model, name, state_dict, is_4bit)
File "/root/.cache/huggingface/modules/transformers_modules/output_models/quantizer.py", line 293, in set_value
weight_data = state_dict[f'{name}.data']
KeyError: 'transformer.h.0.attn.c_attn.weight.data'
请问这是怎么回事?
The text was updated successfully, but these errors were encountered:
Jingzhenzxz
changed the title
请问怎么运行微调后的模型?
运行微调后的int4模型失败:KeyError: 'transformer.h.0.attn.c_attn.weight.data'
Nov 6, 2023
我微调了int4模型,目录为:
![image](https://private-user-images.githubusercontent.com/47069834/280695537-2c6f522b-0a4f-422e-a996-c9ef1a6a755b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzY4MTcsIm5iZiI6MTczOTE3NjUxNywicGF0aCI6Ii80NzA2OTgzNC8yODA2OTU1MzctMmM2ZjUyMmItMGE0Zi00MjJlLWE5OTYtYzllZjFhNmE3NTViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA4MzUxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY0YTRkNGZhNmEyODFhZGQ5NWE3YjNmMGMzMDhiZjQzYjlmYzRhZmQ2Y2Q3MmJjODY1MjNjYmVjMzc4ZjUwYjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wzJxyjO4mkoux-euBUcSzoGLvAejWMjW04DjSzEugTY)
我执行了下述测试代码(test.py):
提示错误:
请问这是怎么回事?
The text was updated successfully, but these errors were encountered: