[Bug] 对Llama-3-70B-Instruct进行量化的时候会出现OOM的问题
- Dominant language
- Python
- Stars
- 8.1k
- Forks
- 748
- Avg merge
- 6d 2h
- Merged PRs (30d)
- 54
Description
### Checklist
- [X] 1. I have searched related issues but cannot get the expected help.
- [x] 2. The bug has not been fixed in the latest version.
### Describe the bug
RuntimeError: CUDA error: device-side assert triggered
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.
以上是错误信息,看起来是此表越界,但是我调试之后发现其中的参数输出和llama-3-8B(成功运行)是一致的。
最后发现我调整--calib-samples 128 --calib-seqlen 2048 两个参数的值为1时,模型进行成功量化,所以猜测是显存不够用,所以保证两个参数的值在可用范围内怎么进行量化,能不能多卡量化共享显存
### Reproduction
lmdeploy lite auto_awq Meta-Llama-3-70B-Instruct --work-dir ./Meta-Llama-3-70B-Instruct-4bit
### Environment
```Shell
Python: 3.8.16
NVCC: Cuda compilation tools, release 11.7, V11.7.64
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
NVIDIA A100 80GB
TorchVision: 0.17.2+cu121
LMDeploy: 0.4.2+
transformers: 4.40.0
gradio: 3.50.2
fastapi: 0.111.0
pydantic: 2.7.1
triton: 2.2.0
```
### Error traceback
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.