@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / f815c99954
Fork 0

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 2, 20:45 UTC

[Bugfix] fix device mismatch in MiniCPM-o-4_5 resampler (#43194)

Signed-off-by: Yan Ma <yan.ma@intel.com>

Yan Ma committed May 26, 2026 at 13:12 UTC f815c9995491aed8ace3d7f2a6ddd5065269b06a
1 file changed +3 -1
vllm/model_executor/models/minicpmv.py
+3 -1
@@ -378,7 +378,9 @@ class Resampler4_5(Resampler2_5):
378 ) # D
379
380 pos_embed_2d.append(
381 - self.pos_embed[:tgt_h, :tgt_w, :].reshape((tgt_h * tgt_w, -1)).to(dtype)
381 + self.pos_embed[:tgt_h, :tgt_w, :]
382 + .reshape((tgt_h * tgt_w, -1))
383 + .to(device=device, dtype=dtype)
384 ) # patches * D
385 key_padding_mask[i, patch_len[i] :] = True
386