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

Transformers broke again (AttributeError: 'GPTQ' object has no attribute 'inp1') #280

Open
EyeDeck opened this issue Jul 29, 2023 · 1 comment

Comments

@EyeDeck
Copy link

EyeDeck commented Jul 29, 2023

CUDA_VISIBLE_DEVICES=0 python llama.py /mnt/g/models/conceptofmind_LLongMA-2-13b c4 --wbits 4 --true-sequential --act-order --groupsize 32 --save_safetensors /mnt/g/models/LLongMA-2-13b-16k-GPTQ/4bit-32g-tsao.safetensors
Found cached dataset json (/home/anon/.cache/huggingface/datasets/allenai___json/allenai--c4-6fbe877195f42de5/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51)
Found cached dataset json (/home/anon/.cache/huggingface/datasets/allenai___json/allenai--c4-efc3d4f4606f44bd/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51)
Token indices sequence length is longer than the specified maximum sequence length for this model (8924 > 8192). Running this sequence through the model will result in indexing errors
Starting ...
Ready.
Quantizing layer 1/40..
+------------------+--------------+------------+-----------+-------+
|       name       | weight_error | fp_inp_SNR | q_inp_SNR | time  |
+==================+==============+============+===========+=======+
Traceback (most recent call last):
  File "/home/anon/GPTQ-for-LLaMa/llama.py", line 492, in <module>
    quantizers = llama_sequential(model, dataloader, DEV)
  File "/home/anon/miniconda3/envs/gptq/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/home/anon/GPTQ-for-LLaMa/llama.py", line 114, in llama_sequential
    scale, zero, g_idx, error = gptq[name].fasterquant(percdamp=args.percdamp, groupsize=args.groupsize, actorder=args.act_order, name=name)
  File "/home/anon/GPTQ-for-LLaMa/gptq.py", line 221, in fasterquant
    self.print_loss(name=name, q_weight=Q, weight_error=error, timecost=(time.time() - tick))
  File "/home/anon/GPTQ-for-LLaMa/gptq.py", line 110, in print_loss
    if self.inp1 is not None:
AttributeError: 'GPTQ' object has no attribute 'inp1'

Not sure exactly what commit broke it, but I rolled back to an arbitrary commit from about 2 weeks ago and it works again

pip uninstall transformers
pip install git+https://github.com/huggingface/transformers@e9ad51306fdcc3fb79d837d667e21c6d075a2451
@epicfilemcnulty
Copy link

Yep, getting the same error when trying to quantize llama2-13B with the latest transformers

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