Something about no meta tensors no data

#15
by ashercn97 - opened

Getting this error about there being no meta tensor data so cant convert. What does this mean? it is on the model:ashercn97/hippo-7b-4

Cannot copy out of meta tensor; no data!

Also what is the model id? I jsut did this: ashercn97/hippo-7b-4 but idk if that is the model id

Safetensors org

The model you're trying to convert contains a lot of bogus data:

https://colab.research.google.com/drive/1gm_d2RxONnx9q1iP-Z0Yt2jSIKZ1Mp_a?usp=sharing

Those meta tensors shouldn't be there. This conversion scripts doesn't assume these are unwanted (meta tensors can be legit weights not correctly saved).

How do i fix it @Narsil ?

Safetensors org

Try removing those from the pytorch_model.bin if you own those.

Could be as simple as

weights = torch.load(..)
weights = {k: v for k, v in weights.items() if v.device() != torch.device("meta")}
save_file(weights, "model.safetensors")

But it could be more complex, depends on what is actually in the file.

Sign up or log in to comment