mybigday / llama.rn

React Native binding of llama.cpp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failure to initLlama on Xiaomi phones.

Vali-98 opened this issue · comments

Hello again, I've received reports from users of ChatterUI that model loading fails on Xiaomi branded phones:

Confirmed not working:

  • Xiaomi Poco F5 - Android 14
  • Redmi 10C - Android 13

I've also queried about other phones, and got a few responses for working devices.

Confirmed working:

  • Samsung A71 - Android 13
  • Samsung M52 - Android 13

Version used:

  • llama.rn 0.3.0-rc.14

Logcat response on the tested Poco F5:

RNLLAMA_ANDROID_JNI: [RNLlama] is_model_loaded false

There aren't enough users to confirm this is a trend across all Xiaomi phones, but it is peculiar.

I don't have a Xiaomi phone now. One possibility that comes to my mind is related to -march:

target_compile_options(${target_name} PRIVATE -march=armv8.4-a+fp16+dotprod)

Can you try armv8.2-a+fp16+dotprod or other options?

Can you try armv8.2-a+fp16+dotprod or other options?

Tested this, does not amend the issue. As an added side not, this was working a while back, but some changes on Xiaomi's platform seems to have broken it.

I also tested version rc.9 to rc.13, all also non-functional. I assume this is an issue on the OS side for whatever reason, but I can't figure out what. Attempting to remove guardrails such as app optimization yielded no results either.

However, this was all successful on emulator and Samsung devices.

This issue seems to be resolved after updating to Expo SDK 50.