Comments (3)
I haven’t seen this before with 32 tokens, which is odd. I used the same benchmark script. Can you try to install from the main branch?
from autoawq.
I did, I installed AutoAWQ today after pulling with pip install -e .
, updated transformers
etc
I am running with CUDA 12.2, could that be the culprit?
from autoawq.
@casper-hansen I also tried it with 12.1 now (docker: pytorch/pytorch:2.2.2-cuda12.1-cudnn8-devel
):
Installation:
cd AutoAWQ
pip install transformers
pip install -e .
Same error:
# python examples/benchmark.py --model_path /models/mistral/small-instruct-v0.2/awq/gemv_fast/
-- Loading model...
Replacing layers...: 100%|████████████████████████████████████████████████████████████████████████████████████| 32/32 [00:01<00:00, 28.65it/s]
We've detected an older driver with an RTX 4000 series GPU. These drivers have issues with P2P. This can affect the multi-gpu inference when using accelerate device_map.Please make sure to update your driver to the latest version which resolves this.
Fusing layers...: 100%|██████████████████████████████████████████████████████████████████████████████████████| 32/32 [00:00<00:00, 548.60it/s]
-- Warming up...
-- Generating 32 tokens, 32 in context...
Traceback (most recent call last):
File "/workspace/AutoAWQ/examples/benchmark.py", line 111, in run_round
context_time, generate_time = generator(model, input_ids, n_generate)
File "/workspace/AutoAWQ/examples/benchmark.py", line 54, in generate_torch
out = model(inputs, use_cache=True)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/workspace/AutoAWQ/awq/models/base.py", line 108, in forward
return self.model(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/accelerate/hooks.py", line 166, in new_forward
output = module._old_forward(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/transformers/models/mistral/modeling_mistral.py", line 1157, in forward
outputs = self.model(
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/workspace/AutoAWQ/awq/modules/fused/model.py", line 127, in forward
h, _, _ = layer(
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/workspace/AutoAWQ/awq/modules/fused/block.py", line 130, in forward
out = h + self.mlp.forward(self.norm_2(h))
File "/opt/conda/lib/python3.10/site-packages/accelerate/hooks.py", line 166, in new_forward
output = module._old_forward(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/transformers/models/mistral/modeling_mistral.py", line 179, in forward
return self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/activation.py", line 393, in forward
return F.silu(input, inplace=self.inplace)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/functional.py", line 2075, in silu
return torch._C._nn.silu(input)
RuntimeError: CUDA error: an illegal memory access was encountered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/workspace/AutoAWQ/examples/benchmark.py", line 210, in <module>
main(args)
File "/workspace/AutoAWQ/examples/benchmark.py", line 178, in main
stats, model_version = run_round(
File "/workspace/AutoAWQ/examples/benchmark.py", line 117, in run_round
raise RuntimeError(ex)
RuntimeError: CUDA error: an illegal memory access was encountered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
from autoawq.
Related Issues (20)
- need support for transformers > 4.38 HOT 3
- [QST] AWQ Kernels
- RuntimeError: expected mat1 and mat2 to have the same dtype HOT 4
- weird error with python convert-to-awq.py HOT 1
- CUDA out of memory when quantize 32B model HOT 2
- Support for JAIS HOT 1
- v0.2.5 issue tracker HOT 4
- GPU not detected HOT 1
- didn't support ZeRO3? HOT 2
- gemv_fast kernel only suppor 128 group_size HOT 1
- DeepSeek-VL support HOT 2
- can autoawq support int2,int3,int8 quantization? HOT 3
- AttributeError: 'LlavaForConditionalGeneration' object has no attribute 'quantize' HOT 3
- VLM quantization-aware? HOT 1
- using autoawq to quantize gemma-2b-it model and export to llama.cpp got wrong generated token
- Bug - mixtral qlora(after b&b peft train) quantization broadcast problem HOT 3
- [BUG] Load StarCoder2 AWQ using Transformers HOT 1
- Inference Parallelism Issue HOT 1
- quick question around Token indices sequence length is longer than the specified maximum sequence length for this model (77697 > 32768). Running this sequence through the model will result in indexing errors
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 autoawq.