Comments (7)
Seems like there were breaking changes to the Transformers library branch for LLaMA support recently huggingface/transformers#21955 (comment)
Once I updated the library and converted the weights using the newest version, I was able to run the benchmark.
Median: 0.03748023509979248
PPL: 6.315393447875977
max memory(MiB): 4676.1708984375
from gptq-for-llama.
I cannot reproduce this problem.
It's probably a problem caused by your cuda version being low.
from gptq-for-llama.
It also fails for me, but with a different error.
CUDA_VISIBLE_DEVICES=0 CUDA_LAUNCH_BLOCKING=1 python llama.py decapoda-research/llama-7b-hf c4 --load llama7b-4bit.pt --benchmark 2048
Benchmarking ...
Traceback (most recent call last):
File "/home/x/llama/GPTQ-for-LLaMa/llama.py", line 407, in <module>
benchmark(model, input_ids, check=args.check)
File "/home/x/llama/GPTQ-for-LLaMa/llama.py", line 306, in benchmark
out = model(
File "/home/x/.conda/envs/gptq/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/x/.local/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 852, in forward
outputs = self.model.decoder(
File "/home/x/.conda/envs/gptq/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/x/.local/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 624, in forward
layer_outputs = decoder_layer(
File "/home/x/.conda/envs/gptq/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1212, in _call_impl
result = forward_call(*input, **kwargs)
File "/home/x/.local/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 317, in forward
hidden_states = self.feed_forward(hidden_states)
File "/home/x/.conda/envs/gptq/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/x/.local/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 103, in forward
return self.w2(self.act_fn(self.w1(x)) * self.w3(x))
File "/home/x/.conda/envs/gptq/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/x/llama/GPTQ-for-LLaMa/quant.py", line 165, in forward
y = self.bias.clone()
RuntimeError: CUDA error: an illegal memory access was encountered
I'm using cuda version 11.7, installed from anaconda
from gptq-for-llama.
I have not been able to reproduce this issue either.
Running using cuda 11.3 and torch 1.12.1+cu11.3 might help.
from gptq-for-llama.
Just a reference.
4090, WSL2, python 3.10, gcc and g++ 9.5, cuda 11.3, pytorch: pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
.
Seems ok.
Median: 0.015739798545837402
PPL: 6.336050987243652
max memory(MiB): 4740.1552734375
from gptq-for-llama.
hmm... i don't know
from gptq-for-llama.
Latest commits for transformers and this repo seem to work for me too. Not sure what the previous issue was but its gone now so I can get testing
Median: 0.01520681381225586
PPL: 6.328521251678467
max memory(MiB): 4676.1708984375
from gptq-for-llama.
Related Issues (20)
- llama_inference 4bits error
- inference with the saved model error: AttributeError: module 'torch.backends.cuda' has no attribute 'sdp_kernel' HOT 2
- Could not obtain official perplexity using bloom_eval()
- can it support openllama model?
- Issue with GPTQ HOT 1
- High PPL when groupsize != -1 for OPT model after replace linear layer with quantlinear. HOT 1
- Help: Quantized llama-7b model with custom prompt format produces only gibberish HOT 1
- Why does the model quantization prompt KILLED at the end? HOT 2
- Would GPTQ be able to support LLaMa2? HOT 1
- Can i quantize HF version of llama model
- Transformers broke again (AttributeError: 'GPTQ' object has no attribute 'inp1') HOT 1
- LoRa and diff with bitsandbytes
- neox.py needs to add "import math"
- error: block with no terminator, has llvm.cond_br %5624, ^bb2, ^bb3
- Support Mistral.
- Syntax changed in triton.testing.do_bench() causing error when running llama_inference.py
- datasets.utils.info_utils.ExpectedMoreSplits: {'validation'} HOT 1
- Error when load GPTQ model
- GPTQ vs bitsandbytes
- add support for minicpm
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gptq-for-llama.