-
Notifications
You must be signed in to change notification settings - Fork 608
Android App with MediaTek Mode #6304
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6304
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 85f3304 with merge base 47bca20 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
I've confirmed that the output works (after a bit of hacky change to the if() condition in the In order to prevent a one-off, I'll need to make changes to how modelPath and tokenizerPath is selected. Maybe select 1 .pte modelPath or have a json file that contains the paths. |
I've added a temporary placeholder modelPath and tokenizerPath for the MTK backend to support model loading. |
e50117b
to
50b7da6
Compare
866265e
to
406e119
Compare
Open for review but TODO (once @kirklandsign makes jni changes) is to modify the LlamaModule initialization based on JNI change for how to select MediaTek backend. |
9e5983f
to
7252d67
Compare
@cmodi-meta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
It looks to me that the mtk_llama_runner
is added by you, and the rest of the changes are mostly related to android, and I'll lean on @kirklandsign to review them. I'll approve and @neuropilot-captain please let us know if you have any concern.
@cmodi-meta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@kirklandsign mentioned the code was mostly borrowed from the runner provided by MediaTek, meaning it's pretty much a fork. The risk is that once the llama runner from mediatek change, this new runner will fail. Let's describe it somewhere in the doc or code |
@cmodi-meta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@cmodi-meta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Purpose: Modify the existing demo Android App to support MediaTek e2e flow.
Pre-requisite: This diff should sit on top of #6208 changes. We plan to rebase to this once #6208 changes are complete in total.
Planned Changes:
How to Run:
executorch/examples/demo-apps/android/LlamaDemo
. Make sure to modify the tokenizer, embedding file and model file path in llama_runner_values.h before doing so.