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

Added GCP tokenizer for gemini models #34

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

riccardo-alle
Copy link
Contributor

@riccardo-alle riccardo-alle commented Aug 8, 2024

Feature Description

  • The Google API for counting tokens is not optimized for heavy parallel jobs, so it's better to perform token counting locally, using the official GCP tokenizer (source)

Added

  • gcp tokenizer added for local counting of tokens for Gemini models
  • sentencepiece dependency (needed for the tokenizer)

Modifed

  • README.md
  • pkg version bumped up to 1.0.8

allms/defaults/vertex_ai.py Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
tests/test_end_to_end.py Outdated Show resolved Hide resolved
@megatron6000
Copy link
Collaborator

Remember to bump the package version before merging

@riccardo-alle riccardo-alle merged commit 28a785d into main Aug 8, 2024
4 checks passed
@riccardo-alle riccardo-alle deleted the adding-gcp-tokenizer-for-gemini-models branch August 8, 2024 12:46
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.

3 participants