-
Notifications
You must be signed in to change notification settings - Fork 688
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
HuggingFaceTokenizer android load #2170
Comments
Currently Huggingface Tokenizer extension is not available for Android. We only added PyTorch and OnnxRuntime to Android. |
Do you have any support plans?
|
We don't have bandwidth currently. It shouldn't be hard to add Android support. No java code change is needed. The most of work is setup CI to build android native library. We can work with you if you want to contribute. |
@frankfliu do you know if someone is already working on this? |
currently I managed to recompile rust but during System.loadLibrary("tokenizers") in android emulator, following error occurs: any clues what could be a solution? |
update: it seems like gradle issue gradle/gradle#23023 |
Thanks for your discovery @BigSquirrel2000. Are you willing to contribute your working solution to DJL repo? For Android NDK build |
Hey, I would like to contribute to this issue. I came across this library while looking for a way to run the tokenizer in my Android app project. I've figured out how to build the rust library using See https://github.com/deepjavalibrary/djl/compare/master...naveen521kk:djl:tokenizer-android-support?expand=1 for the changes I made. I've tested the resultant build output in my Android app and it works - made a small wrapper for it in react native too. I could make a PR out of that branch if someone could help me configure the CI. Thanks! cc @frankfliu |
Really appreciate for your contribution. Your changes looks great, and I tried locally, it works. Please raise a PR, once it merged, we can add CI to publish it. |
Hey, I've created #3531, have a look at it. |
Description
I tried to load HuggingFaceTokenizer on android but failed.
HuggingFaceTokenizer tokenizer = HuggingFaceTokenizer.newInstance(assetFilePath(this, "tokenizer.json"), options);
Error Message
ai.djl.engine.EngineException: Failed to load Huggingface native library.
The text was updated successfully, but these errors were encountered: