-
Notifications
You must be signed in to change notification settings - Fork 293
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
removing tensorflow_text for aarch64 compatiblity #883
base: main
Are you sure you want to change the base?
Conversation
646f83b
to
08378df
Compare
I'm not sure why Unit Test / Common test (v4-8) (pull_request) is failing |
1f7ce19
to
bb1666a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, can we also have @aireenmei review?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, LGTM in general
MaxText/tokenizer.py
Outdated
for k in data_keys: | ||
if isinstance(tokenizer, TikTokenTokenizer): | ||
features[k] = tf.py_function(_process_string, [features[k]], Tout=[tf.int32])[0] | ||
elif isinstance(tokenizer, SentencePieceTokenizer): | ||
features[k] = tokenizer.encode(features[k]) | ||
features[k] = tf.py_function(_process_string, [features[k]], Tout=[tf.int32])[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check the performance here? Using a py_function for TikToken affected the performance and that's why the recommendation is to use pygrain/hf with tiktoken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, the performance consideration is something I completely missed. From some of my tests it's either tf.py_function
or SentencePiece
from sentencepiece
that acquires the GIL and significantly impacts performance.
I looked into a bit, but for me even calling an empty tf.py_function
throttles the loader down a lot (4x-6x).
Do you have any ideas? @khatwanimohit
bb1666a
to
b750691
Compare
b750691
to
d3ec05f
Compare
No description provided.