-
Notifications
You must be signed in to change notification settings - Fork 58
Migrate to PyTorch tokenizers #781
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
Conversation
e896b8e to
cc00c58
Compare
packages/react-native-executorch/common/rnexecutorch/TokenizerModule.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/TokenizerModule.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/TokenizerModule.cpp
Outdated
Show resolved
Hide resolved
chmjkb
left a comment
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.
Please fix tests b4 merging 👍🏻
packages/react-native-executorch/common/rnexecutorch/host_objects/JsiConversions.h
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/TokenizerModule.cpp
Show resolved
Hide resolved
chmjkb
left a comment
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.
Please remove the Error.get() calls
| inline jsi::Value getJsiValue(bool val, jsi::Runtime &runtime) { | ||
| return jsi::Value(val); | ||
| } |
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.
I think this should be above the template and below
inline jsi::Value getJsiValue(int val, jsi::Runtime &runtime) {
return {runtime, val};
}
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.
Could you tell the reason for that, aesthetic one?
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.
+1 for msluszniak.
Could you elaborate?
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.
aesthetic one
packages/react-native-executorch/common/rnexecutorch/TokenizerModule.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/TokenizerModule.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/TokenizerModule.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/TokenizerModule.cpp
Outdated
Show resolved
Hide resolved
| if (result.ok()) { | ||
| return static_cast<uint64_t>(result.get()); // TODO: CHANGE RETURN TYPE | ||
| } | ||
| return -1; |
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.
like above, maybe reject promise on js side
packages/react-native-executorch/common/rnexecutorch/host_objects/JsiConversions.h
Show resolved
Hide resolved
752f379 to
8aaf940
Compare
chmjkb
left a comment
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.
looks good on my end, thank u 🙏🏻
|
@chmjkb I guess you wanted to approve, not add another review ;) |
Description
This PR migrates us from tokenisers-cpp to PyTorch tokenisers bundled with executorch
Introduces a breaking change?
Type of change
Tested on
Testing instructions
This changes need to be tested manually. Try running all our apps that consume tokenizers and see whether the output is ok.
By "OK" I mean
Related issues
Checklist