[Refactor] Remove Fp8OnlineLinearMethod as scheduled (#45463)
Signed-off-by: yewentao256 <zhyanwentao@126.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
d53f4593ce
commit
3f53e2138f
@@ -401,6 +401,9 @@ def get_and_maybe_dequant_weights(
|
||||
"""Return layer's unquantized weights in [out, in] layout"""
|
||||
from vllm.model_executor.layers.linear import UnquantizedLinearMethod
|
||||
from vllm.model_executor.layers.quantization.fp8 import Fp8LinearMethod
|
||||
from vllm.model_executor.layers.quantization.online.fp8 import (
|
||||
Fp8PerTensorOnlineLinearMethod,
|
||||
)
|
||||
|
||||
# LoRA linear wrappers store quantization metadata on `base_layer`.
|
||||
# Unwrap here so callers can pass either a raw linear layer or its LoRA
|
||||
@@ -418,7 +421,9 @@ def get_and_maybe_dequant_weights(
|
||||
|
||||
# Simple Fp8 case: rescale with tensor or block weight scales
|
||||
if (
|
||||
isinstance(layer.quant_method, Fp8LinearMethod)
|
||||
isinstance(
|
||||
layer.quant_method, (Fp8LinearMethod, Fp8PerTensorOnlineLinearMethod)
|
||||
)
|
||||
and not layer.quant_method.use_marlin
|
||||
# DeepGEMM transforms the scales using `transform_sf_into_required_layout` into
|
||||
# a layout that is not compatible with `scaled_dequantize`.
|
||||
|
||||
Reference in New Issue
Block a user