Skip to content

Expose EOS and BOS ids in tokenizer APIs #955

@ankan-ban

Description

@ankan-ban

In most LLM inference applications the token generation loop needs to know the EOS token id to figure out when to stop. The tokenizer already has this information, but it doesn't expose any API that the caller can use to retrieve it.

This results in applications/callers either hardcoding the EOS./BOS ids or having to resort to other metadata (e.g, the ONNXRuntime GenAI sdk has to duplicate this information in GenAI config file).

It would be great if such an API can be exposed from ORTX Tokenizer itself.

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