Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Anthropic tokenizer from Hugging Face #3467

Merged
merged 3 commits into from
Mar 24, 2025

Conversation

yifanmai
Copy link
Collaborator

The Anthropic tokenizer was removed from the Anthropic library, so this switches the Anthropic tokenizer to use the unofficial Hugging Face version instead. I manually diff-ed the tokenizer.json files and checked that they are identical.

Also upgrade the Anthropic library.

Fixes #3212
Addresses #3324

@yifanmai yifanmai merged commit e6fa7eb into main Mar 24, 2025
8 checks passed
@yifanmai yifanmai deleted the yifanmai/remove-anthropic-tokenizer branch March 24, 2025 21:41
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.

Switch AnthropicTokenizer to use client.beta.messages.count_tokens()
1 participant