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

'triton.compiler' has no attribute 'OutOfResources' #41

Open
davidray222 opened this issue Dec 31, 2024 · 2 comments
Open

'triton.compiler' has no attribute 'OutOfResources' #41

davidray222 opened this issue Dec 31, 2024 · 2 comments

Comments

@davidray222
Copy link

Thank you for this excellent work!!
may I ask some question?

I use llama-7b to quantize and use qalora.py,and occur
problem:
except triton.compiler.OutOfResources:
AttributeError: module 'triton.compiler' has no attribute 'OutOfResources'

my triton vision:
Version: 2.2.0
Summary: A language and compiler for custom Deep Learning operations
Home-page: https://github.com/openai/triton/
Author: Philippe Tillet
Author-email: [email protected]

@yuhuixu1993
Copy link
Owner

yuhuixu1993 commented Jan 1, 2025 via email

@davidray222
Copy link
Author

davidray222 commented Jan 7, 2025

thank you very much!!!!
I have successfully run it, based on other versions of Triton.

the next step is to use merge.py,right?
Thank you for taking the time to answer!

image
image
image

this is my merge code:
"import torch
model_path = "/mnt/8tb_raid/david_model/qa-lora/AutoGPTQ/examples/quantization/llama7b-quant4bit-g32/gptq_model-4bit-32g.bin"
lora_path = "/mnt/8tb_raid/david_model/qa-lora/output/checkpoint-10000/optimizer.pt"
merged_path = "/mnt/8tb_raid/david_model/qa-lora/lora_save/merged_model.bin"
scale = 16 /64
group_size = 128

model = torch.load(model_path, map_location='cpu')
lora = torch.load(lora_path, map_location='cpu')
tmp_keys = [key[17:-14] for key in lora.keys() if 'lora_A' in key]
for tmp_key in tmp_keys:
model[tmp_key+'.qzeros'] -= (lora['base_model.model.'+tmp_key+'.lora_B.weight'] @ lora['base_model.model.'+tmp_key+'.lora_A.weight']).t() * scale / group_size /model[tmp_key+'.scales']

torch.save(model, merged_path)

"

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