Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions vllm/model_executor/layers/quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@


try:
import awq_inference_engine # with CUDA kernels
import awq_inference_engine
KERNELS_INSTALLED = True
except ImportError as ex:
raise ImportError(
"Unable to import awq_inference_engine: run setup.py"
" to install AWQ CUDA kernels")
KERNELS_INSTALLED = False


class ScaledActivation(nn.Module):
Expand All @@ -34,6 +33,11 @@ def __init__(
):
super().__init__()

if not KERNELS_INSTALLED:
raise ImportError(
"Unable to import awq_ext: run setup.py"
" to install AWQ CUDA kernels")

if w_bit not in [4]:
raise NotImplementedError("Only 4-bit are supported for now.")

Expand Down