feat: enable SGLANG_PATCH_TOKENIZER by default - #23409
Merged
Merged
Conversation
Default matches the existing TODO in environ.py. Kimi tiktoken tokenizers benefit from cached all_special_tokens / all_special_ids (large ITL impact under high batch size). Users can set SGLANG_PATCH_TOKENIZER=0 to restore the previous behavior. Made-with: Cursor
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
ByronHsu
force-pushed
the
enable-patch-tokenizer-default
branch
from
April 21, 2026 22:20
4f3daf6 to
d3c6460
Compare
5 tasks
Collaborator
|
/tag-and-rerun-ci |
ch-wan
approved these changes
Apr 21, 2026
This was referenced Apr 22, 2026
ByronHsu
added a commit
that referenced
this pull request
Apr 23, 2026
caitengwei
pushed a commit
to caitengwei/sglang
that referenced
this pull request
Jun 1, 2026
Chronostasys
pushed a commit
to MindLab-Research/sglang
that referenced
this pull request
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Default matches the existing TODO in environ.py. Kimi tiktoken tokenizers benefit from cached all_special_tokens / all_special_ids. Users can set SGLANG_PATCH_TOKENIZER=0 to restore the previous behavior.
Ref: #16427
Made-with: Cursor
Motivation
Modifications
Accuracy Tests
Speed Tests and Profiling
Before
After
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ci