[None][fix] Add missing absolute pe in Qwen3-VL Vision Encoder (#11065)

Signed-off-by: Necofish <liuxiangyang@mail.ustc.edu.cn>
This commit is contained in:
Necofish 2026-01-30 08:59:36 +08:00 committed by GitHub
parent 54ba056924
commit 144b61715f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -739,9 +739,11 @@ class Qwen3VisionModel(torch.nn.Module):
# Getting positional embedding
rotary_pos_emb = self.rot_pos_emb(grid_thw)
pos_embeds = self.fast_pos_embed_interpolate(grid_thw)
# From this point, pure GPU operation
hidden_states = self.patch_embed(pixel_values)
hidden_states = hidden_states + pos_embeds
seq_len, _ = hidden_states.size()
hidden_states = hidden_states.reshape(seq_len, -1)