[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user