Skip to content

[Frontend] Exploit tokenizers "new stream" in FastIncrementalDetokenizer#34217

Merged
hmellor merged 2 commits intovllm-project:mainfrom
njhill:detok-prefill
Feb 11, 2026
Merged

[Frontend] Exploit tokenizers "new stream" in FastIncrementalDetokenizer#34217
hmellor merged 2 commits intovllm-project:mainfrom
njhill:detok-prefill

Conversation

@njhill
Copy link
Member

@njhill njhill commented Feb 10, 2026

Finally remembered to revisit #18840.

Faster incremental detokenizer initialization.

Includes some unrelated minor code simplifications in detokenizer.py.

@mergify mergify bot added the v1 label Feb 10, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 effectively leverages the new native prefill feature in tokenizers>=0.22.0 to simplify and speed up the initialization of FastIncrementalDetokenizer. The change removes a significant amount of complex workaround code for priming the decode stream, which greatly improves code clarity and maintainability. The other minor refactorings in the file also enhance readability. The changes are correct and well-implemented. Overall, this is a great improvement.

Signed-off-by: Nick Hill <nickhill123@gmail.com>
Signed-off-by: Nick Hill <nickhill123@gmail.com>
@njhill njhill added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 10, 2026
Copy link
Contributor

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@hmellor hmellor merged commit e09546c into vllm-project:main Feb 11, 2026
45 checks passed
@njhill njhill deleted the detok-prefill branch February 11, 2026 17:00
@njhill
Copy link
Member Author

njhill commented Feb 11, 2026

Thanks again @ArthurZucker!! Sorry I realized afterwards I should have included you as co-author.

@ArthurZucker
Copy link
Contributor

No no absolutely not! Happy its finally getting used hehe 🤗

eldarkurtic pushed a commit to eldarkurtic/vllm that referenced this pull request Feb 19, 2026
…zer (vllm-project#34217)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
Signed-off-by: Eldar Kurtic <research@neuralmagic.com>
llsj14 pushed a commit to llsj14/vllm that referenced this pull request Mar 1, 2026
tunglinwood pushed a commit to tunglinwood/vllm that referenced this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants