Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SafetensorError: Error while deserializing header: HeaderTooLarge #10

Open
Nicolas-dds opened this issue Apr 27, 2024 · 0 comments
Open

Comments

@Nicolas-dds
Copy link

SafetensorError Traceback (most recent call last)
Cell In[2], line 11
7 # MODEL_PATH = '/home/quang/working/LLMs/oobabooga_linux/text-generation-webui/models/TheBloke_Wizard-Vicuna-7B-Uncensored-GPTQ'
8 # CHECKPOINT_PATH = '/home/quang/working/LLMs/oobabooga_linux/text-generation-webui/models/TheBloke_Wizard-Vicuna-7B-Uncensored-GPTQ/Wizard-Vicuna-7B-Uncensored-GPTQ-4bit-128g.no-act-order.safetensors'
10 DEVICE = torch.device('cuda:0')
---> 11 model, tokenizer = load_model_main(MODEL_PATH, CHECKPOINT_PATH, DEVICE)

File /mnt/c/Users/nlave/Maestria/Tesis/generativeAgent_LLM/server/model.py:56, in load_model_main(model_para, checkpoint_para, device)
55 def load_model_main(model_para, checkpoint_para, device):
---> 56 model = load_quant(model_para, checkpoint_para, 4, 128)
57 model.to(device)
58 tokenizer = AutoTokenizer.from_pretrained(model_para)

File /mnt/c/Users/nlave/Maestria/Tesis/generativeAgent_LLM/server/model.py:47, in load_quant(model, checkpoint, wbits, groupsize)
45 if checkpoint.endswith('.safetensors'):
46 from safetensors.torch import load_file as safe_load
---> 47 model.load_state_dict(safe_load(checkpoint))
48 else:
49 model.load_state_dict(torch.load(checkpoint))

File /mnt/c/Users/nlave/Maestria/Tesis/generativeAgent_LLM/env/lib/python3.10/site-packages/safetensors/torch.py:308, in load_file(filename, device)
285 """
286 Loads a safetensors file into torch format.
287
(...)
305 ```
306 """
307 result = {}
--> 308 with safe_open(filename, framework="pt", device=device) as f:
309 for k in f.keys():
310 result[k] = f.get_tensor(k)

SafetensorError: Error while deserializing header: HeaderTooLarge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant