Reduce AutoWeightsLoader kwargs (#53106)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -1150,7 +1150,7 @@ class SupportsLateInteraction(Protocol):
|
||||
class SupportsQuant:
|
||||
"""The interface required for all models that support quantization."""
|
||||
|
||||
hf_to_vllm_mapper: ClassVar["WeightsMapper | None"] = None
|
||||
hf_to_vllm_mapper: "WeightsMapper | None" = None
|
||||
packed_modules_mapping: ClassVar[dict[str, list[str]]]
|
||||
quant_config: QuantizationConfig | None = None
|
||||
|
||||
@@ -1184,8 +1184,7 @@ class SupportsQuant:
|
||||
if self.quant_config is None:
|
||||
return
|
||||
if (hf_to_vllm_mapper := self.hf_to_vllm_mapper) is not None:
|
||||
unstacked_mapper = hf_to_vllm_mapper.get_unstacked_mapper()
|
||||
self.quant_config.apply_vllm_mapper(unstacked_mapper)
|
||||
self.quant_config.apply_vllm_mapper(hf_to_vllm_mapper.get_rename_mapper())
|
||||
if packed_modules_mapping := getattr(self, "packed_modules_mapping", None):
|
||||
self.quant_config.packed_modules_mapping.update(packed_modules_mapping)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user