fix: NVFP4 quantization out_dtype should match model dtype, not torch default (#48861)
Signed-off-by: Chris Fontes <2224082+fattchris@users.noreply.github.com> Co-authored-by: Chris Fontes <chris@fontes.io> Co-authored-by: Chris Fontes <chris@fontes.dev> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Chris Fontes
Chris Fontes
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
f57123aa2d
commit
0b37d8389f
@@ -450,7 +450,7 @@ class ModelOptFp8LinearMethod(LinearMethodBase):
|
||||
|
||||
def __init__(self, quant_config: ModelOptFp8Config) -> None:
|
||||
self.quant_config = quant_config
|
||||
self.out_dtype = torch.get_default_dtype()
|
||||
self.out_dtype = get_current_vllm_config().model_config.dtype
|
||||
self.input_dtype = get_current_vllm_config().model_config.dtype
|
||||
|
||||
def create_weights(
|
||||
@@ -543,7 +543,7 @@ class ModelOptFp8PcPtLinearMethod(LinearMethodBase):
|
||||
|
||||
def __init__(self, quant_config: ModelOptFp8Config) -> None:
|
||||
self.quant_config = quant_config
|
||||
self.out_dtype = torch.get_default_dtype()
|
||||
self.out_dtype = get_current_vllm_config().model_config.dtype
|
||||
self.input_dtype = get_current_vllm_config().model_config.dtype
|
||||
|
||||
def create_weights(
|
||||
@@ -640,7 +640,7 @@ class ModelOptFp8PbWoLinearMethod(LinearMethodBase):
|
||||
static=True, group_shape=GroupShape(block_n, block_k)
|
||||
)
|
||||
|
||||
self.out_dtype = torch.get_default_dtype()
|
||||
self.out_dtype = get_current_vllm_config().model_config.dtype
|
||||
self.input_dtype = get_current_vllm_config().model_config.dtype
|
||||
|
||||
def create_weights(
|
||||
|
||||
Reference in New Issue
Block a user