[PR #10789] fix: qwen25vl assign samebatch in multimodal input #13367

Closed
opened 2026-04-13 00:25:05 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/ollama/ollama/pull/10789

State: closed
Merged: Yes


setting samebatch on the vision start token is problematic because it will be shared with other inputs that also use images. this will cause the input to be cached and the runner will not see SameBatch. SameBatch will also be incorrect since it may be for a different image.

assigning samebatch to the input tokens resolves this by ensure it's assigned correctly to inputs corresponding to the image.

not setting same batch correctly may cause panics during inference since images are no longer guaranteed to be in the same batch.

**Original Pull Request:** https://github.com/ollama/ollama/pull/10789 **State:** closed **Merged:** Yes --- setting samebatch on the vision start token is problematic because it will be shared with other inputs that also use images. this will cause the input to be cached and the runner will not see SameBatch. SameBatch will also be incorrect since it may be for a different image. assigning samebatch to the input tokens resolves this by ensure it's assigned correctly to inputs corresponding to the image. not setting same batch correctly may cause panics during inference since images are no longer guaranteed to be in the same batch.
GiteaMirror added the pull-request label 2026-04-13 00:25:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13367