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

Problem loading safetensor file format #110

Open
ortegaalfredo opened this issue May 22, 2023 · 3 comments
Open

Problem loading safetensor file format #110

ortegaalfredo opened this issue May 22, 2023 · 3 comments

Comments

@ortegaalfredo
Copy link

Hi! I'm trying to load the model at https://huggingface.co/Neko-Institute-of-Science/LLaMA-13B-4bit-128g

And it only generates garbage. I'm just doing inference of the model, not training yet.
This is an example output:

Loading Model ...
The safetensors archive passed at ./models/llama-13b-4bit/llama-13b-4bit-128g.safetensors does not contain metadata. Make sure to save your model with the `save_pretrained` method. Defaulting to 'pt' metadata.
Loaded the model in 6.03 seconds.                                                                                
Fitting 4bit scales and zeros to half
Apply AMP Wrapper ...
I think the meaning of life isbahrist InitSTMo�Ãbahbah�OF MomoãbahSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMoMo

Any guidance about how to load those models?

@johnsmith0031
Copy link
Owner

try this:

import matmul_utils_4bit
matmul_utils_4bit.faster = False

@ortegaalfredo
Copy link
Author

Not working yet.

File "/home/guest/ai/finetune/alpaca_lora_4bit/matmul_utils_4bit.py", line 131, in matmul4bit
output = _matmul4bit_v2(x, qweight, scales, zeros, g_idx)
File "/home/guest/ai/finetune/alpaca_lora_4bit/matmul_utils_4bit.py", line 73, in _matmul4bit_v2
quant_cuda.vecquant4matmul(x, qweight, y, scales, zeros, g_idx)
RuntimeError: expected scalar type Float but found Half

@johnsmith0031
Copy link
Owner

Try converting all scales to float?

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

2 participants