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

Add an abstract class for Tokenizer #53

Merged
merged 13 commits into from
Apr 26, 2024

Conversation

bhavya01
Copy link
Collaborator

No description provided.

@bhavya01 bhavya01 marked this pull request as ready for review April 24, 2024 21:46
@bhavya01 bhavya01 self-assigned this Apr 24, 2024
@bhavya01
Copy link
Collaborator Author

I see that #40 changed the implementation to output only token IDs instead of strings. Will need to update this PR with the new changes.

@bhavya01 bhavya01 marked this pull request as draft April 25, 2024 02:11
@qihqi qihqi self-requested a review April 25, 2024 18:14
@qihqi qihqi requested a review from JoeZijunZhou April 25, 2024 18:21
@bhavya01 bhavya01 marked this pull request as ready for review April 25, 2024 18:26
Copy link
Collaborator

@JoeZijunZhou JoeZijunZhou left a comment

Choose a reason for hiding this comment

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

Could we add return types for encode?

jetstream/engine/engine_api.py Outdated Show resolved Hide resolved
jetstream/core/orchestrator.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@FanhaiLu1 FanhaiLu1 left a comment

Choose a reason for hiding this comment

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

Thanks, all looks good to me now.

@bhavya01 bhavya01 merged commit f6751d2 into AI-Hypercomputer:main Apr 26, 2024
3 checks passed
@bhavya01 bhavya01 deleted the tokenizer branch April 26, 2024 23:12
@vipannalla
Copy link
Collaborator

Thanks for the PR, this looks great. I'd appreciate if you can also add unittests (or update existing ones) for the changes.

@bhavya01 bhavya01 restored the tokenizer branch April 30, 2024 03:01
bhavya01 added a commit to bhavya01/JetStream that referenced this pull request May 1, 2024
* Add an abstract class for tokenizer

* Add sentence piece tokenizer as a subclass of Tokenizer

* Fix decode method for SentencePieceTokenizer

* Fix circular import issue

* fix type annotations

* fix linting issues

* Format files using pyink

* Update the tokenizer decode interface to return ids instead of str

* format using pyink

* Move Tokenizer class to a tokenizer_api.py file

* Update engine.build_tokenizer method to return SentencePieceTokenizer by default
jwyang-google pushed a commit that referenced this pull request May 6, 2024
* Add an abstract class for tokenizer

* Add sentence piece tokenizer as a subclass of Tokenizer

* Fix decode method for SentencePieceTokenizer

* Fix circular import issue

* fix type annotations

* fix linting issues

* Format files using pyink

* Update the tokenizer decode interface to return ids instead of str

* format using pyink

* Move Tokenizer class to a tokenizer_api.py file

* Update engine.build_tokenizer method to return SentencePieceTokenizer by default
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