Skip to content

Add an API for tokens to ids #1876

@winstxnhdw

Description

@winstxnhdw

Currently, we have to do

ids = [tokenizer.token_to_id(token) for token in tokens]

Would be nice if this was all in Rust, and we can just do

ids = tokenizer.tokens_to_ids(tokens)

Even better if we just have a tokens_to_texts API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions