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

Android MLCChat failed ,[Bug] #2302

Open
View999888 opened this issue May 9, 2024 · 7 comments
Open

Android MLCChat failed ,[Bug] #2302

View999888 opened this issue May 9, 2024 · 7 comments
Labels
bug Confirmed bugs

Comments

@View999888
Copy link

1d61b3b81f3a81ff1e3399f529ac703

How can this error be resolved?

Stack trace:
org.apache.tvm.Base$TVMError: InternalError: Check failed: (chat_ != nullptr) is false: Chat is not initialized via reload
Stack trace:
File "/Users/rageshantonyd/Documents/working_prj/mlc-llm/cpp/llm_chat.cc", line 1744

at org.apache.tvm.Base.checkCall(Base.java:173)
at org.apache.tvm.Function.invoke(Function.java:130)
at ai.mlc.mlcllm.ChatModule.prefill(ChatModule.java:54)
at ai.mlc.mlcchat.AppViewModel$ChatState$requestGenerate$1$1.invoke(AppViewModel.kt:666)
at ai.mlc.mlcchat.AppViewModel$ChatState$requestGenerate$1$1.invoke(AppViewModel.kt:666)
at ai.mlc.mlcchat.AppViewModel$ChatState.callBackend(AppViewModel.kt:548)
at ai.mlc.mlcchat.AppViewModel$ChatState.requestGenerate$lambda$4(AppViewModel.kt:666)
at ai.mlc.mlcchat.AppViewModel$ChatState.$r8$lambda$lluIrcsPALEW5nCb2tohZYadhTY(Unknown Source:0)
at ai.mlc.mlcchat.AppViewModel$ChatState$$ExternalSyntheticLambda3.run(Unknown Source:6)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:929)

Error message:
InternalError: Check failed: (chat_ != nullptr) is false: Chat is not initialized via reload
Stack trace:
File "/Users/rageshantonyd/Documents/working_prj/mlc-llm/cpp/llm_chat.cc", line 1744

@View999888 View999888 added the bug Confirmed bugs label May 9, 2024
@View999888 View999888 changed the title MLCChat failed ,[Bug] Android MLCChat failed ,[Bug] May 9, 2024
@View999888
Copy link
Author

问题 1 :如何获取到app_config.json 中的model_lib_path_for_prepare_libs中的模型文件
问题 2 :apk 怎么和模型文件相互联系的

@abhishekdewan101
Copy link

I had the same issue running on both emulator and device.

@BlindDeveloper
Copy link

@View999888
Good day, if you try 7 or 8b models you need 8 gb ram.
@abhishekdewan101
Mlc llm working on device only.

@View999888
Copy link
Author

ERROR: No module named ‘tvm’

tvm

How to generate 'tvm' ?
Please have a workaround address

@MasterJH5574
Copy link
Collaborator

Hi folks, we just did an android build flow refactor yesterday. The new android build flow requires fewer steps. The documentation has been revamped to the new flow https://llm.mlc.ai/docs/deploy/android.html. Could you check out and try again?

Before doing that, please also upgrade your mlc-llm and tvm to use the latest nightly by following instructions in https://llm.mlc.ai/docs/install/mlc_llm.html.

@MasterJH5574
Copy link
Collaborator

ERROR: No module named ‘tvm’

tvm

How to generate 'tvm' ? Please have a workaround address

@View999888 You need to install tvm by following https://llm.mlc.ai/docs/install/mlc_llm.html.

@lengjing606
Copy link

@View999888 你的已经ok了吗 我发现demo apk都有问题

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

No branches or pull requests

5 participants