[Quantization] Deprecate Long Tail of Schemes (#31688)
Signed-off-by: Robert Shaw <robshaw@redhat.com> Signed-off-by: Robert Shaw <114415538+robertgshaw2-redhat@users.noreply.github.com> Co-authored-by: Robert Shaw <robshaw@redhat.com> Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
This commit is contained in:
co-authored by
Robert Shaw
Wentao Ye
parent
d62cfe546d
commit
5825bbc1f7
@@ -191,6 +191,8 @@ class ModelConfig:
|
||||
`quantization_config` attribute in the model config file. If that is
|
||||
`None`, we assume the model weights are not quantized and use `dtype` to
|
||||
determine the data type of the weights."""
|
||||
allow_deprecated_quantization: bool = False
|
||||
"""Whether to allow deprecated quantization methods."""
|
||||
enforce_eager: bool = False
|
||||
"""Whether to always use eager-mode PyTorch. If True, we will disable CUDA
|
||||
graph and always execute the model in eager mode. If False, we will use
|
||||
@@ -940,6 +942,21 @@ class ModelConfig:
|
||||
|
||||
current_platform.verify_quantization(self.quantization)
|
||||
|
||||
if self.quantization in me_quant.DEPRECATED_QUANTIZATION_METHODS:
|
||||
if self.allow_deprecated_quantization:
|
||||
logger.warning(
|
||||
"The quantization method %s is deprecated "
|
||||
"and will be removed in future versions of vLLM.",
|
||||
self.quantization,
|
||||
)
|
||||
else:
|
||||
raise ValueError(
|
||||
"The quantization method %s is deprecated "
|
||||
"and will be removed in future versions of vLLM. To bypass, "
|
||||
"set `--allow-deprecated-quantization`.",
|
||||
self.quantization,
|
||||
)
|
||||
|
||||
def _verify_cuda_graph(self) -> None:
|
||||
# CUDAGraph capture not supported for encoder-decoder models on ROCm
|
||||
unsupported_rocm = self.is_encoder_decoder
|
||||
|
||||
Reference in New Issue
Block a user