Install & Compatibility
Where this runs
tested against v0.2.9 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✕ timeout
py 3.11
✕ build_error
✕ timeout
py 3.12
✕ build_error
✓ 86.1s
py 3.13
✕ build_error
✓ 75.05s
py 3.9
✕ build_error
✕ timeout
5325MB installed
● package 5325MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AutoAWQForCausalLM
✓ from awq import AutoAWQForCausalLM
AutoAWQConfig
✓ from awq import AutoAWQConfig
✗ from awq.utils import AutoAWQConfig
AutoAWQConfig is directly importable from awq, not from awq.utils.
Load a pre-quantized AWQ model and generate text.
from awq import AutoAWQForCausalLM, AutoAWQConfig
from transformers import AutoTokenizer
model_path = 'casperhansen/mixtral-instruct-awq'
quant_config = AutoAWQConfig(bits=4, group_size=128, zero_point=True)
model = AutoAWQForCausalLM.from_pretrained(model_path, config=quant_config, device_map='auto')
tokenizer = AutoTokenizer.from_pretrained(model_path)
inputs = tokenizer("Hello, how are you?", return_tensors='pt')
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0]))
Errors
Common errors & fixes
ImportError: cannot import name 'AutoAWQForCausalLM' from 'awq'
Typo: the import uses 'AutoAWQForCausalLM' but the correct symbol may be case-sensitive; also check that the library is installed with correct version.
fixRun: pip install autoawq --upgrade and use: from awq import AutoAWQForCausalLM
ModuleNotFoundError: No module named 'awq'
AutoAWQ is not installed, or installed but the module name is 'autoawq' (some users mistakenly import 'autoawq' instead of 'awq').
fixInstall the package: pip install autoawq, then use: from awq import ...
Upgrade
Version history
0.2.9latest on PyPI · released May 11, 2025
Audit
Dependencies
torchrequiredCore dependency for tensor computation and GPU support; requires >=2.2.0.
transformersrequiredRequired for model loading and tokenization; compatibility may break with versions >4.51.3.