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 np padded token support #49

Merged
merged 4 commits into from
Apr 23, 2024
Merged

Conversation

FanhaiLu1
Copy link
Collaborator

Current code only return jax padded token, this PR added np padded token support. It bring two benefits:

1: Frame framework independent. Not depend on Jax framework
2: Serialization benefits

The change will not impact current behaviors, existing code can still use Jax padded tokens without any change.

@vipannalla
Copy link
Collaborator

Looks good to me. Can you please add/update tests for the new padding option in test_token_utils.py

Copy link
Collaborator

@vipannalla vipannalla left a comment

Choose a reason for hiding this comment

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

Awesome!

@FanhaiLu1
Copy link
Collaborator Author

Looks good to me. Can you please add/update tests for the new padding option in test_token_utils.py

Thanks, added.

@FanhaiLu1 FanhaiLu1 merged commit 565a326 into AI-Hypercomputer:main Apr 23, 2024
2 of 3 checks passed
@FanhaiLu1 FanhaiLu1 deleted the np branch April 24, 2024 03:50
jwyang-google pushed a commit that referenced this pull request May 6, 2024
* add comments

* add unit test

* remove logging

* format token code
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.

2 participants