Skip to content
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

Crash when loading Llama 3.2 #25

Closed
dsvf opened this issue Sep 26, 2024 · 9 comments
Closed

Crash when loading Llama 3.2 #25

dsvf opened this issue Sep 26, 2024 · 9 comments

Comments

@dsvf
Copy link

dsvf commented Sep 26, 2024

Not much to add... Download seems to work fine, but when I try to load the model, the app just closes.
Downloading and loading e.g. Qwen works fine. Also, the Llama 3.2 3B Q4 gguf from HF works well with ChatterUI, so my device (Samsung Galaxy S23) is in principle capable.

I have adb ready if you want me to test a debug build.

@a-ghorbani
Copy link
Owner

My guess is that the app might not be detecting the correct architecture. the app is relying on this code to load the right lib: https://github.com/mybigday/llama.rn/blob/f35545b92241d8cc9ee2b22b5ca4c02b395db9bb/android/src/main/java/com/rnllama/LlamaContext.java#L249-L280

Can you please share adb logcat | grep -i rnllama and adb logcat | grep -i "fatal"

@dsvf
Copy link
Author

dsvf commented Sep 26, 2024

09-26 23:40:56.583 22955 23001 D RNLlamaContext: CPU features: Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint i8mm bf16 bti
09-26 23:40:56.583 22955 23001 D RNLlamaContext: Loading librnllama_v8_4_fp16_dotprod.so
09-26 23:40:56.685 22955 23001 I RNLLAMA_ANDROID_JNI: [RNLlama] is_model_loaded false
09-26 23:40:57.089 23062 23062 F DEBUG   :       #00 pc 000000000019000c  /data/app/~~2tpNUTiQeWDVF25W55iPlA==/com.pocketpalai-40LK3F8n7t6T_BmTb_tQgg==/split_config.arm64_v8a.apk!librnllama_v8_4_fp16_dotprod.so (offset 0x12da000) (Java_com_rnllama_LlamaContext_loadModelDetails+104) (BuildId: cc19b1db93c0b29ad31f7f4c8865a6ad4ffa0a30)
09-26 23:40:57.089 23062 23062 F DEBUG   :       #03 pc 00000000004863ee  /data/app/~~2tpNUTiQeWDVF25W55iPlA==/com.pocketpalai-40LK3F8n7t6T_BmTb_tQgg==/base.apk (com.rnllama.LlamaContext.<init>+446)
09-26 23:40:57.089 23062 23062 F DEBUG   :       #05 pc 00000000004868ce  /data/app/~~2tpNUTiQeWDVF25W55iPlA==/com.pocketpalai-40LK3F8n7t6T_BmTb_tQgg==/base.apk (com.rnllama.RNLlama$1.doInBackground+46)
09-26 23:40:57.089 23062 23062 F DEBUG   :       #07 pc 0000000000486980  /data/app/~~2tpNUTiQeWDVF25W55iPlA==/com.pocketpalai-40LK3F8n7t6T_BmTb_tQgg==/base.apk (com.rnllama.RNLlama$1.doInBackground+4)
09-26 23:40:57.136 22594 22594 I Dc.IafdService: handleAppError, pkgName : com.pocketpalai, userId : 0, errorType : 0, repeat : true component : com.pocketpalai-40LK3F8n7t6T_BmTb_tQgg==/split_config.arm64_v8a.apk!librnllama_v8_4_fp16_dotprod.so (offset 0x12da000) (Java_com_rnllama_LlamaContext_loadModelDetails+104) (BuildId: cc19b1db93c0b29ad31f7f4c8865a6ad4ffa0a30)errorStack:       #00 pc 000000000019000c  /data/app/~~2tpNUTiQeWDVF25W55iPlA==/com.pocketpalai-40LK3F8n7t6T_BmTb_tQgg==/split_config.arm64_v8a.apk!librnllama_v8_4_fp16_dotprod.so (offset 0x12da000) (Java_com_rnllama_LlamaContext_loadModelDetails+104) (BuildId: cc19b1db93c0b29ad31f7f4c8865a6ad4ffa0a30)

and

09-26 23:42:07.460 23218 23283 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x910 in tid 23283 (AsyncTask #2), pid 23218 (com.pocketpalai)

@dsvf
Copy link
Author

dsvf commented Sep 26, 2024

Okay, what works is Llama-3.2-3b-instruct-q4_k_m.gguf when downloaded and included as a local model.

@LoganTann
Copy link

Had the same issue with Llama 3.2 3B and Quen 2 1.5B on my pixel 7 phone. The app just crashes when I try to load the model.

If I have time I'll also check the logs

@ImadSaddik
Copy link

I have Vivo X50 with 12 GB of RAM and I am also experiencing the same issue with Llama 3.2 1B model.

@thunder95
Copy link

same issue

@a-ghorbani a-ghorbani mentioned this issue Oct 31, 2024
6 tasks
@a-ghorbani
Copy link
Owner

Hey, I’ve just released version 1.4.5 (#72) https://play.google.com/store/apps/details?id=com.pocketpalai.
Could you please try this version and let me know if it resolves the issue?

@ImadSaddik
Copy link

Yes @a-ghorbani, it is working now.

@a-ghorbani
Copy link
Owner

I’m closing this now, but if you face any new crashes, feel free to open a new one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants