Skip to content

Incremental Detokenization #1666

@robertgshaw2-redhat

Description

@robertgshaw2-redhat

Hello, thank you for building such a great foundational library.

I work on the vllm-project, and we have some nasty, slow code related to the challenges of incremental detokenization for streaming use cases. This is needed to defeat cleanup algorithms in the decode where the tokenizer decides to add a space or not depending on the surrounding ids. Relevant code:

We are trying to optimize this code as it can be expensive for high batch size serving. Before we do this, I was wondering if tokenizers has any plans to handle incremental detokenization internally?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions