Skip to content

Fix the double BOS problem in the HF chat template#888

Merged
Ying1123 merged 1 commit intomainfrom
fix-double-bos
Aug 2, 2024
Merged

Fix the double BOS problem in the HF chat template#888
Ying1123 merged 1 commit intomainfrom
fix-double-bos

Conversation

@Ying1123
Copy link
Copy Markdown
Contributor

@Ying1123 Ying1123 commented Aug 2, 2024

Previously, we applied the HF chat template to get the prompt in the text format and then encode it again, but this can result in double BOS tokens. This PR fixed it by setting tokenized=True when applying the HF chat template.

@Ying1123 Ying1123 changed the title Fix the double BOS problem in chat template Fix the double BOS problem in the HF chat template Aug 2, 2024
@Ying1123 Ying1123 merged commit fbd6b94 into main Aug 2, 2024
@Ying1123 Ying1123 deleted the fix-double-bos branch August 2, 2024 07:30
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant