Repository navigation
add the rust server tokenizer, detokenizer, and egress modules - #32872
Merged
Merged
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
rainj-me
marked this pull request as ready for review
July 30, 2026 03:31
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
rainj-me
force-pushed
the
rainj-me/rust-server-tokenization
branch
from
July 30, 2026 03:32
53c9b4d to
029e8c9
Compare
13 of 30 tasks
merrymercy
approved these changes
Jul 30, 2026
mrain
reviewed
Jul 30, 2026
| // Token id 0 is NOT a match: Python guards with `if not matched`, and 0 is | ||
| // falsy there, so it trims nothing. Trimming on 0 drops a real generated token | ||
| // for any model whose stop id happens to be 0. | ||
| if !no_stop_trim && matches!(matched, Some(Matched::Token(t)) if *t != 0) { |
Contributor
There was a problem hiding this comment.
can matched be Matched::Tokens(Vec) here?
mrain
reviewed
Jul 30, 2026
| let _ = st.sink.try_send(EgressItem::Control(payload)); | ||
| // Egress FSM: a control request goes straight to Completed (no Streaming | ||
| // / Finalizing states — single response, never streamed). | ||
| st.fsm = RequestState::Completed; |
Contributor
There was a problem hiding this comment.
nit: dead code, st was removed from table then immediately dropped.
mrain
reviewed
Jul 30, 2026
| let _ = st | ||
| .sink | ||
| .try_send(EgressItem::Error(Error::Internal(message))); | ||
| st.fsm = RequestState::Completed; |
saturn-acc
pushed a commit
to saturn-acc/sglang
that referenced
this pull request
Aug 16, 2026
Atituiset
pushed a commit
to Atituiset/sglang
that referenced
this pull request
Sep 10, 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.
Motivation
Modifications
Accuracy Tests
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ✅ Run #30511448692
Latest PR Test (Extra): ❌ Run #30512245462