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

bug: Llama reproduce error with kernl #321

Open
2 tasks done
yychen016 opened this issue Apr 23, 2023 · 1 comment
Open
2 tasks done

bug: Llama reproduce error with kernl #321

yychen016 opened this issue Apr 23, 2023 · 1 comment

Comments

@yychen016
Copy link

Description

When trying to use kernl with default Llama 7B on A100 device, I get this error.

Steps to reproduce

import torch
from transformers import LlamaModel, LlamaConfig, LlamaTokenizer, LlamaForCausalLM
from kernl.model_optimization import optimize_model

config  = LlamaConfig()
model = LlamaForCausalLM(config).cuda()
optimize_model(model)

length = 5
input_ids = torch.randint(low=0, high=model.config.vocab_size, size=(1,length)).cuda()
with torch.inference_mode(), torch.cuda.amp.autocast():
	outputs = model.generate(input_ids=input_ids)

print(outputs.shape)

Expected Behavior

A properly working Llama model.

Actual Behavior

The following message occurs:
image
image
image
image

Your environment

  • A100

Self-service

  • I would be willing to help fix this bug myself.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@SinanAkkoyun
Copy link

It is the same for me, please help up to use LLaMA models :)

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