-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Can't seem to run GPT-J in CPU mode: "LayerNormKernelImpl" not implemented for 'Half' #16378
Comments
Hey @monsieurpooh , this is because the model was saved in You can pass the model = GPTJForCausalLM.from_pretrained("KoboldAI/GPT-J-6B-Adventure", torch_dtype=torch.float32) |
Thanks for the quick response; however, I tried your suggestion and it did not work and I got the same error. Here's the minimal repro code:
The output was:
|
Nevermind. I removed "low_cpu_mem_usage" arg. It seems to be working now. Thanks again. |
@patil-suraj I have same problem for GPT-Neox model. Any quick treatment |
Environment info
transformers
version: 4.15.0Who can help
@patrickvonplaten @Narsil
Information
Model I am using (KoboldAI/GPT-J-6B-Adventure):
The problem arises when using:
GPTJForCausalLM.from_pretrained
andinput_ids = tokenizer(prompt, return_tensors="pt").input_ids
without using anything cuda-related.The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
"LayerNormKernelImpl" not implemented for 'Half'
Expected behavior
Runs it without that error
The text was updated successfully, but these errors were encountered: