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

[Bug]: App crush when try Load new model. PocketPal 1.6.0 (39) #140

Open
bi4key opened this issue Dec 17, 2024 · 5 comments
Open

[Bug]: App crush when try Load new model. PocketPal 1.6.0 (39) #140

bi4key opened this issue Dec 17, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@bi4key
Copy link

bi4key commented Dec 17, 2024

[Bug]: App crush when try Load new model. PocketPal 1.6.0 (39)

Model: Falcon3-1B-Instruct-GGUF
Phone: Pixel 6a
OS: GrapheneOS (Android 15)

I put 3 crush side by side, from 3 different app, when I try ADD or LOAD model.

Maybe will be simple find there a bug. Because model crush on all apps or maybe model is buggy.

Model: https://huggingface.co/tiiuae/Falcon3-1B-Instruct-GGUF/resolve/main/Falcon3-1B-Instruct-q4_k_m.gguf

PocketPal, Model : Added correctly? Yes. Load correctly? No.

App: PocketPal 1.6.0 (39)

Model Falcon3-1B-Instruct-GGUF from Hugging Face via on app downloader

type: crash
osVersion: google/bluejay/bluejay:15/AP4A.241205.013/2024121200:user/release-keys
userType: full.secondary
flags: dev options enabled
package: com.pocketpalai:39, targetSdk 35
process: com.pocketpalai
installer: dev.imranr.obtainium

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000258

backtrace:
      #00 pc 00000000000f527c  /data/app/~~UQqTGDKRkzuuS0wNR-yPzw==/com.pocketpalai-y1Zf-x-bolVy_VaBYMpcEw==/base.apk!librnllama_v8_2_fp16_dotprod.so (offset 0x1654000) (BuildId: 87000683c79bb9b3259b81dcf1788038c8478d10)
      #01 pc 0000000000192228  /data/app/~~UQqTGDKRkzuuS0wNR-yPzw==/com.pocketpalai-y1Zf-x-bolVy_VaBYMpcEw==/base.apk!librnllama_v8_2_fp16_dotprod.so (offset 0x1654000) (BuildId: 87000683c79bb9b3259b81dcf1788038c8478d10)
      #02 pc 00000000001961d0  /data/app/~~UQqTGDKRkzuuS0wNR-yPzw==/com.pocketpalai-y1Zf-x-bolVy_VaBYMpcEw==/base.apk!librnllama_v8_2_fp16_dotprod.so (offset 0x1654000) (BuildId: 87000683c79bb9b3259b81dcf1788038c8478d10)
      #03 pc 0000000000195438  /data/app/~~UQqTGDKRkzuuS0wNR-yPzw==/com.pocketpalai-y1Zf-x-bolVy_VaBYMpcEw==/base.apk!librnllama_v8_2_fp16_dotprod.so (offset 0x1654000) (Java_com_rnllama_LlamaContext_initContext+1512) (BuildId: 87000683c79bb9b3259b81dcf1788038c8478d10)
      #04 pc 00000000011da480  /data/app/~~UQqTGDKRkzuuS0wNR-yPzw==/com.pocketpalai-y1Zf-x-bolVy_VaBYMpcEw==/oat/arm64/base.odex (art_jni_trampoline+288)
      #05 pc 00000000011d92dc  /data/app/~~UQqTGDKRkzuuS0wNR-yPzw==/com.pocketpalai-y1Zf-x-bolVy_VaBYMpcEw==/oat/arm64/base.odex (com.rnllama.LlamaContext.<init>+2732)
      #06 pc 00000000011de50c  /data/app/~~UQqTGDKRkzuuS0wNR-yPzw==/com.pocketpalai-y1Zf-x-bolVy_VaBYMpcEw==/oat/arm64/base.odex (com.rnllama.RNLlama$2.doInBackground+268)
      #07 pc 00000000011dcb08  /data/app/~~UQqTGDKRkzuuS0wNR-yPzw==/com.pocketpalai-y1Zf-x-bolVy_VaBYMpcEw==/oat/arm64/base.odex ([DEDUPED] ?.doInBackground+72)
      #08 pc 0000000000518118  /system/framework/arm64/boot-framework.oat (android.os.AsyncTask$3.call+136) (BuildId: 4cd8f4d99dd38f01916fc6074d14df8bb5fe36f8)
      #09 pc 0000000000211174  /system/framework/arm64/boot.oat (java.util.concurrent.FutureTask.run+164) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #10 pc 000000000021b8f4  /system/framework/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+724) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #11 pc 0000000000220948  /system/framework/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+56) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #12 pc 00000000000b0690  /system/framework/arm64/boot.oat (java.lang.Thread.run+64) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #13 pc 000000000040c594  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #14 pc 0000000000244ea4  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #15 pc 00000000004cf794  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1092) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #16 pc 00000000004cf338  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #17 pc 0000000000075d34  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+132) (BuildId: 6da77815db33dd5f45155da4abb6f173)
      #18 pc 0000000000066890  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 6da77815db33dd5f45155da4abb6f173)

SmolChat, Model : Added correctly? Yes. Load correctly? No.

App: SmolChat-v0.0.2

type: crash
osVersion: google/bluejay/bluejay:15/AP4A.241205.013/2024121200:user/release-keys
userType: full.secondary
flags: dev options enabled
package: io.shubham0204.smollmandroid:1, targetSdk 34
process: io.shubham0204.smollmandroid
processUptime: 829 + 776 ms
installer: dev.imranr.obtainium

java.lang.IllegalStateException: load_model() failed
	at io.shubham0204.smollm.SmolLM.loadModel(Native Method)
	at io.shubham0204.smollm.SmolLM.access$loadModel(SmolLM.kt:24)
	at io.shubham0204.smollm.SmolLM$create$2.invokeSuspend(SmolLM.kt:39)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@cb67ec3, Dispatchers.Default]

ChatterUI, Model : Added correctly? No. Load correctly? No.

App: ChatterUI v0.8.3-beta4

type: crash
osVersion: google/bluejay/bluejay:15/AP4A.241205.013/2024121200:user/release-keys
userType: full.secondary
flags: dev options enabled
package: com.Vali98.ChatterUI:1, targetSdk 34
process: com.Vali98.ChatterUI
installer: com.android.packageinstaller

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000001160

backtrace:
      #00 pc 00000000001ace90  /data/app/~~grwaZZ8YM_sg775DZvkvbA==/com.Vali98.ChatterUI-Ncs9htWBOUhFQttvvMOPgA==/lib/arm64/librnllama_v8_2_fp16_dotprod.so (Java_com_rnllama_LlamaContext_loadModelDetails+104) (BuildId: d2dc21013607b7189b803bbe3f31b06377759600)
      #01 pc 00000000000a2b6c  /system/framework/arm64/boot.oat (art_jni_trampoline+108) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #02 pc 0000000000ea5f3c  /data/app/~~grwaZZ8YM_sg775DZvkvbA==/com.Vali98.ChatterUI-Ncs9htWBOUhFQttvvMOPgA==/oat/arm64/base.odex (com.rnllama.LlamaContext.<init>+3068)
      #03 pc 0000000000eab44c  /data/app/~~grwaZZ8YM_sg775DZvkvbA==/com.Vali98.ChatterUI-Ncs9htWBOUhFQttvvMOPgA==/oat/arm64/base.odex (com.rnllama.RNLlama$2.doInBackground+268)
      #04 pc 0000000000bd6db8  /data/app/~~grwaZZ8YM_sg775DZvkvbA==/com.Vali98.ChatterUI-Ncs9htWBOUhFQttvvMOPgA==/oat/arm64/base.odex ([DEDUPED] ?.doInBackground+72)
      #05 pc 0000000000518118  /system/framework/arm64/boot-framework.oat (android.os.AsyncTask$3.call+136) (BuildId: 4cd8f4d99dd38f01916fc6074d14df8bb5fe36f8)
      #06 pc 0000000000211174  /system/framework/arm64/boot.oat (java.util.concurrent.FutureTask.run+164) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #07 pc 000000000021b8f4  /system/framework/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+724) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #08 pc 0000000000220948  /system/framework/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+56) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #09 pc 00000000000b0690  /system/framework/arm64/boot.oat (java.lang.Thread.run+64) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #10 pc 000000000040c594  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #11 pc 0000000000244ea4  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #12 pc 00000000004cf794  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1092) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #13 pc 00000000004cf338  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #14 pc 0000000000075d34  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+132) (BuildId: 6da77815db33dd5f45155da4abb6f173)
      #15 pc 0000000000066890  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 6da77815db33dd5f45155da4abb6f173)
@bi4key bi4key added the bug Something isn't working label Dec 17, 2024
@bi4key
Copy link
Author

bi4key commented Dec 17, 2024

OK., this maybe is a problem. Response from other source:

"Falcon 3 is extremely new, its likely that llama.cpp simply doesn't support it yet. Will need to wait until this is added on their end. Closed for now."

@I-I-IT
Copy link

I-I-IT commented Dec 17, 2024

I had the same problem with LLama either 8B imported or ever since with all models, even offical small ones like Qwen

(GitHub cut it early but basically it crash at the end)

pocketpal-crash.mp4

@bi4key
Copy link
Author

bi4key commented Dec 17, 2024

Strange. If app crush sometimes show monit, and there is a button to see crush log, if you will try again and this show, you can copy and paste this log here, will be simple to find a bug.

BTW.
And small models like Llama 3.2 1B Q4 work?
And what phone and Android you have?

@I-I-IT
Copy link

I-I-IT commented Dec 17, 2024

Strange. If app crush sometimes show monit, and there is a button to see crush log, if you will try again and this show, you can copy and paste this log here, will be simple to find a bug.

IDK what you are saying for sure, but Android doesn't detect any crash.

I have Android 15 with Pixel 9.

Llama 3 1B 4K does work, but I should be able to have 3B as I have 12GB of RAM.

@a-ghorbani
Copy link
Owner

wrt Falcon3 we need to wait for llama.cpp to support it: ggerganov/llama.cpp#10883

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants