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

使用AWQ量化internvl2-8b报错 #2948

Closed
H-cool opened this issue Jan 21, 2025 · 1 comment
Closed

使用AWQ量化internvl2-8b报错 #2948

H-cool opened this issue Jan 21, 2025 · 1 comment

Comments

@H-cool
Copy link

H-cool commented Jan 21, 2025

在使用如下命令运行后:
CUDA_VISIBLE_DEVICES=0 swift export
--model /root/hao/models/internvl2_8b
--model_type internvl2
--quant_bits 4 --quant_method awq
--dataset /root/hao/data/ocrdata/quant/quant.jsonl
--output_dir /root/hao/models/internvl2_8b_int4

显示报错:
[INFO:swift] Successfully registered /root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/llm/dataset/data/dataset_info.json
Traceback (most recent call last):
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/cli/export.py", line 2, in
from swift.llm import export_main
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/utils/import_utils.py", line 82, in getattr
module = self._get_module(self._class_to_module[name])
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/utils/import_utils.py", line 91, in _get_module
return importlib.import_module('.' + module_name, self.name)
File "/root/miniforge3/envs/awq/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/llm/export/init.py", line 2, in
from .export import SwiftExport, export_main
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/llm/export/export.py", line 7, in
from .merge_lora import merge_lora
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/llm/export/merge_lora.py", line 6, in
from swift.llm import ExportArguments, prepare_model_template, save_checkpoint
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/utils/import_utils.py", line 83, in getattr
value = getattr(module, name)
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/utils/import_utils.py", line 82, in getattr
module = self._get_module(self._class_to_module[name])
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/utils/import_utils.py", line 91, in _get_module
return importlib.import_module('.' + module_name, self.name)
File "/root/miniforge3/envs/awq/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/llm/infer/utils.py", line 8, in
from swift.tuners import Swift
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/utils/import_utils.py", line 82, in getattr
module = self._get_module(self._class_to_module[name])
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/utils/import_utils.py", line 91, in _get_module
return importlib.import_module('.' + module_name, self.name)
File "/root/miniforge3/envs/awq/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/tuners/base.py", line 22, in
from .mapping import SwiftTuners
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/tuners/mapping.py", line 5, in
from .longlora.longlora import LongLoRA, LongLoRAConfig
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/tuners/longlora/longlora.py", line 9, in
from swift import LoRA, LoRAConfig, SwiftOutput
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/utils/import_utils.py", line 83, in getattr
value = getattr(module, name)
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/utils/import_utils.py", line 82, in getattr
module = self._get_module(self._class_to_module[name])
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/utils/import_utils.py", line 91, in _get_module
return importlib.import_module('.' + module_name, self.name)
File "/root/miniforge3/envs/awq/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/tuners/lora.py", line 10, in
from .lora_layers import * # noqa
File "/root/miniforge3/envs/awq/lib/python3.10/site-packages/swift/tuners/lora_layers.py", line 221, in
from awq.modules.linear import WQLinear_GEMM
ModuleNotFoundError: No module named 'awq.modules'

版本如下:
Package Version Editable project location


absl-py 2.1.0
accelerate 0.34.2
addict 2.4.0
aiofiles 23.2.1
aiohappyeyeballs 2.4.4
aiohttp 3.11.11
aiosignal 1.3.2
aliyun-python-sdk-core 2.16.0
aliyun-python-sdk-kms 2.16.5
altair 5.5.0
annotated-types 0.7.0
anyio 4.8.0
async-timeout 5.0.1
attrdict 2.0.1
attributedict 0.3.0
attrs 24.3.0
awq 0.1.0 /root/llm-awq
binpacking 1.5.2
blessings 1.7
cachetools 5.5.0
certifi 2024.12.14
cffi 1.17.1
chardet 5.2.0
charset-normalizer 3.4.1
click 8.1.8
codecov 2.1.13
colorama 0.4.6
coloredlogs 15.0.1
colour-runner 0.1.1
contourpy 1.3.1
coverage 7.6.10
cpm-kernels 1.0.11
crcmod 1.7
cryptography 44.0.0
cycler 0.12.1
dacite 1.8.1
DataProperty 1.1.0
datasets 3.2.0
deepdiff 8.1.1
dill 0.3.8
distlib 0.3.9
distro 1.9.0
docstring_parser 0.16
einops 0.8.0
exceptiongroup 1.2.2
fastapi 0.115.6
ffmpy 0.5.0
filelock 3.16.1
fonttools 4.55.3
frozenlist 1.5.0
fsspec 2024.9.0
future 1.0.0
gradio 3.35.2
gradio_client 0.2.9
grpcio 1.69.0
h11 0.14.0
httpcore 1.0.7
httpx 0.28.1
huggingface-hub 0.27.1
humanfriendly 10.0
idna 3.10
importlib_metadata 8.6.1
inspecta 0.1.3
jieba 0.42.1
Jinja2 3.1.5
jiter 0.8.2
jmespath 0.10.0
joblib 1.4.2
jsonlines 4.0.0
jsonschema 4.23.0
jsonschema-specifications 2024.10.1
kiwisolver 1.4.8
linkify-it-py 2.0.3
lm-eval 0.3.0
Markdown 3.7
markdown-it-py 2.2.0
MarkupSafe 2.1.5
matplotlib 3.10.0
mbstrdecoder 1.1.4
mdit-py-plugins 0.3.3
mdurl 0.1.2
modelscope 1.22.3
mpmath 1.3.0
ms-swift 3.0.2.post1
multidict 6.1.0
multiprocess 0.70.16
narwhals 1.23.0
networkx 3.4.2
nltk 3.9.1
numexpr 2.10.2
numpy 1.26.4
nvidia-cublas-cu12 12.1.3.1
nvidia-cuda-cupti-cu12 12.1.105
nvidia-cuda-nvrtc-cu12 12.1.105
nvidia-cuda-runtime-cu12 12.1.105
nvidia-cudnn-cu12 8.9.2.26
nvidia-cufft-cu12 11.0.2.54
nvidia-curand-cu12 10.3.2.106
nvidia-cusolver-cu12 11.4.5.107
nvidia-cusparse-cu12 12.1.0.106
nvidia-nccl-cu12 2.20.5
nvidia-nvjitlink-cu12 12.6.85
nvidia-nvtx-cu12 12.1.105
openai 1.59.9
orderly-set 5.2.3
orjson 3.10.15
oss2 2.19.1
packaging 24.2
pandas 2.2.3
pathvalidate 3.2.3
peft 0.14.0
pillow 11.1.0
pip 24.3.1
platformdirs 4.3.6
pluggy 1.5.0
portalocker 3.1.1
propcache 0.2.1
protobuf 5.29.3
psutil 6.1.1
pyarrow 19.0.0
pybind11 2.13.6
pycountry 24.6.1
pycparser 2.22
pycryptodome 3.21.0
pydantic 1.10.19
pydantic_core 2.27.2
pydub 0.25.1
Pygments 2.19.1
pyparsing 3.2.1
pyproject-api 1.8.0
pytablewriter 1.2.1
python-dateutil 2.9.0.post0
python-multipart 0.0.20
pytz 2024.2
PyYAML 6.0.2
referencing 0.36.1
regex 2024.11.6
requests 2.32.3
rich 13.9.4
rootpath 0.1.1
rouge 1.0.1
rouge_score 0.1.2
rpds-py 0.22.3
ruff 0.9.2
sacrebleu 1.5.0
safehttpx 0.1.6
safetensors 0.5.2
scikit-learn 1.6.1
scipy 1.15.1
semantic-version 2.10.0
sentencepiece 0.2.0
setuptools 69.5.1
shellingham 1.5.4
shtab 1.7.1
simplejson 3.19.3
six 1.17.0
sniffio 1.3.1
sortedcontainers 2.4.0
sqlitedict 2.1.0
starlette 0.41.3
sympy 1.13.3
tabledata 1.3.4
tcolorpy 0.1.7
tensorboard 2.18.0
tensorboard-data-server 0.7.2
termcolor 2.5.0
texttable 1.7.0
threadpoolctl 3.5.0
tiktoken 0.8.0
timm 1.0.14
tokenizers 0.20.3
toml 0.10.2
tomli 2.2.1
tomlkit 0.13.2
torch 2.3.0
torchvision 0.18.0
tox 4.23.2
tqdm 4.67.1
tqdm-multiprocess 0.0.11
transformers 4.46.0
transformers-stream-generator 0.0.5
triton 2.3.0
trl 0.11.4
typeguard 4.4.1
typepy 1.3.4
typer 0.15.1
typing_extensions 4.12.2
tyro 0.9.11
tzdata 2024.2
uc-micro-py 1.0.3
urllib3 2.3.0
uvicorn 0.34.0
virtualenv 20.29.1
websockets 14.2
Werkzeug 3.1.3
wheel 0.45.1
xxhash 3.5.0
yarl 1.18.3
zipp 3.21.0
zstandard 0.23.0

@Jintao-Huang
Copy link
Collaborator

autoawq 不是 llm-awq

不过这个模型 可能awq不支持,试试gptq

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