mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-22 09:31:58 -05:00
[PR #18108] [MERGED] fix: "Cannot handle batch sizes > 1 if no padding token is defined" for some reranking models #11469
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/18108
Author: @YetheSamartaka
Created: 10/7/2025
Status: ✅ Merged
Merged: 10/7/2025
Merged by: @tjbck
Base:
dev← Head:main📝 Commits (1)
f69426fFixed: Cannot handle batch sizes > 1 if no padding token is defined📊 Changes
1 file changed (+16 additions, -0 deletions)
View changed files
📝
backend/open_webui/routers/retrieval.py(+16 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Fixes "Cannot handle batch sizes > 1 if no padding token is defined" for some reranking models.
For reranker models that do not have this defined in their config by using the eos_token_id if present as pad_token_id.
Can be tested on https://huggingface.co/Qwen/Qwen3-Reranker-0.6B where before this change, it was not working at all and now it is working as supposed
It resolves this issue outlined in this discussion:
https://github.com/open-webui/open-webui/discussions/16027
Fixed
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.