-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
fix: double bos token #27517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: double bos token #27517
Conversation
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run You ask your reviewers to trigger select CI tests on top of Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a fix to prevent duplicate beginning-of-sequence (BOS) tokens during input preprocessing. The change checks if a prompt already starts with the BOS token text. If so, it disables the tokenizer's automatic addition of special tokens, provided the user hasn't explicitly configured this behavior. The implementation is safe and only applies to tokenizers that expose a bos_token string attribute. My review finds the logic to be sound and without any high or critical severity issues.
…oject#26225) Signed-off-by: inc-jeong <[email protected]> Signed-off-by: InChang Jeong <[email protected]> Co-authored-by: USER <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…llm-project#24097) Signed-off-by: chenjun <[email protected]> Signed-off-by: kliuae <[email protected]> Co-authored-by: valarLip <[email protected]> Co-authored-by: TJian <[email protected]> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: mgoin <[email protected]> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: ahao-anyscale <[email protected]> Signed-off-by: 0xrushi <[email protected]>
) Signed-off-by: angelayi <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…m-project#26956) Signed-off-by: Richard Zou <[email protected]> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: Chendi Xue <[email protected]> Signed-off-by: Chendi Xue <[email protected]> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…ect / index_copy to reduce d2h) (vllm-project#26437) Signed-off-by: Vadim Gimpelson <[email protected]> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: Bram Wasti <[email protected]> Co-authored-by: Wentao Ye <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…#26978) Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…llm-project#26987) Signed-off-by: Akash Kaothalkar <[email protected]> Co-authored-by: Akash Kaothalkar <[email protected]> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: zhewenli <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…oject#26992) Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…ation (vllm-project#26885) Signed-off-by: wangyafeng <[email protected]> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: Lukas Geiger <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…26654) Signed-off-by: Sungjae Lee <[email protected]> Co-authored-by: Mengqing Cao <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…roject#27008) Signed-off-by: bogdanm <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: Matthew Bonanni <[email protected]> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: Mark McLoughlin <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…GGING_FACE_HUB_TOKEN`) (vllm-project#27020) Signed-off-by: Kay Yan <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…ct#24057) Signed-off-by: Tahsin Tunan <[email protected]> Signed-off-by: Harry Mellor <[email protected]> Co-authored-by: Nick Hill <[email protected]> Co-authored-by: Harry Mellor <[email protected]> Signed-off-by: 0xrushi <[email protected]>
|
Someone else has already opened #27515, can you work with them on that PR instead? |
Signed-off-by: 0xrushi <[email protected]>
|
This pull request has merge conflicts that must be resolved before it can be |
Oh I didn't notice, closing this |
Purpose
When using
tokenizer.apply_chat_template()to manually format chat messages and then passing the resulting string tollm.generate(), vLLM incorrectly inserts an extra BOS token during tokenization.Resolves #27486
Test Plan
Test Result
assert = success
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.