-
Notifications
You must be signed in to change notification settings - Fork 228
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
Llama2-7B mobile app crashes on Samsung S23 8GB RAM #3599
Comments
@kirklandsign Could you help looking at it? |
@salykova could you provide more details on how to reproduce it, including the phone models, the Android version, etc.? |
Device: Samsung S23, 8GB RAM, Android 14 Steps to reproduce:
|
I've also tested both LLama2-7B and LLama3-8B models via adb binary-based approach and the inference works. Seems like the problem with the App or it requires much more RAM than adb-binary |
cc @digantdesai - regarding s23 :) |
Hi @salykova the app requires slightly more RAM for Dalvik VM and graphics. However, I think the main issue is for binary, it has a high priority, so when OOM killer kills processes, it's usually killed last. I have seen situations like SystemUI killed before the binary killed. For the app, it is a normal user app, and usually it's killed before system processes. Unfortunately I don't have a good solution at the moment. I do see 8GB RAM runs sometimes, and 16GB runs almost all the time. |
Hi @kirklandsign thanks for your response! Is it not possible to give the app higher priority? Sorry, I'm not an Android Developer and have no experience with it. Also, I've found this option in the documentation https://developer.android.com/guide/topics/manifest/application-element.html#largeHeap. Can this increase stability of the app in theory? |
Hi @salykova unfortunately I don't have a good way to adjust the priority, especially for non-rooted device. |
Hi all,
I've succefully compiled .pte with default quantization parameters and tokenizer.bin for LLama2-7B according to the tutorial. However, during the inference the android app crashes with no error message (I assume its due to insufficient RAM). Is it currently possible to run 7B models on 8GB RAM phones?
P.S. ~ 4GB RAM out of 8GB is available
The text was updated successfully, but these errors were encountered: