[BugFix] Kimi-K2.5: skip vision tower dtype conversion when using quantization (#42869)

Signed-off-by: gaozihao-shy <gaozihao-shy@users.noreply.github.com>
Signed-off-by: gaozihao <gaozihao3@huawei.com>
This commit is contained in:
gaozihao-shy
2026-05-18 05:07:16 +00:00
committed by GitHub
parent b50646e5ef
commit 23c15acd77
+6 -3
View File
@@ -339,9 +339,12 @@ class KimiK25ForConditionalGeneration(
quant_config=self._maybe_ignore_quant_config(quant_config),
prefix=maybe_prefix(prefix, "vision_tower"),
)
self.vision_tower = self.vision_tower.to(
device=self.device, dtype=model_config.dtype
)
if self._maybe_ignore_quant_config(quant_config) is not None:
self.vision_tower = self.vision_tower.to(device=self.device)
else:
self.vision_tower = self.vision_tower.to(
device=self.device, dtype=model_config.dtype
)
self.mm_projector = KimiK25MultiModalProjector(
config=config.vision_config,