A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 3, 22:45 UTC
[Bug] Fix kimi dtype issue with `mm_projector_forward` (#42081)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Wentao Ye committed
May 11, 2026 at 11:45 UTC
3f9c0c25b3312c6b9e9fa70c4b9849eb53a335ba
1 file changed
+3
vllm/model_executor/models/kimi_k25_vit.py
+3
@@ -618,6 +618,9 @@ def mm_projector_forward(mm_projector: torch.nn.Module, vt_output: list[torch.Te
618
"""Apply MM projector to vision tower outputs."""
619
num_embedding_list = [x.shape[0] for x in vt_output]
620
batched = torch.cat(vt_output, dim=0)
621
+ projector_dtype = mm_projector.pre_norm.weight.dtype
622
+ if batched.dtype != projector_dtype:
623
+ batched = batched.to(projector_dtype)
624
proj_out = mm_projector(batched)
625
proj_out = proj_out.reshape(-1, proj_out.shape[-1])
626
proj_out = torch.split(proj_out, num_embedding_list)