Skip to content

Conversation

@yuvmen
Copy link
Member

@yuvmen yuvmen commented Sep 29, 2025

tokenizers is used for tokenization of strings. While we do currently import titoken as well, we want to use tokenizers to count tokens the same way Seer does in Sentry for stacktrace token counts. We could consider converting usages of titoken to tokenizers to maintain a dependency on only one tokenization package, but for now we will have them both.

`tokenizers` is used for tokenization of strings. While we do currently import titoken as well, we want to use `tokenizers` to
count tokens the same way Seer does in Sentry for stacktrace token counts. We could consider converting usages of titoken
to `tokenizers` to maintain a dependency on only one tokenization package, but for now we will have them both.
Copy link
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

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

i would prefer if we could vendor the library -- otherwise we should audit these other dependencies it's adding

Copy link
Member

@joshuarli joshuarli left a comment

Choose a reason for hiding this comment

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

most of the extra stuff is from huggingface-hub: https://github.com/huggingface/huggingface_hub/blob/main/setup.py#L14

shrug

@joshuarli joshuarli merged commit 0ddbc16 into main Sep 29, 2025
15 checks passed
@joshuarli joshuarli deleted the yuvmen/add-tokenizers-package branch September 29, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants