Closed LCmoon0126 closed 2 months ago
Because android have APK size limit, the model is usually larger than that cap. So we will need to store the model online and download it after APK get started.
There are some advanced option to do local bundling per https://llm.mlc.ai/docs/deploy/android.html#bundle-model-weights, which may work for local source assuming you copy the files correctly. If not it should be possible to use that path and update the code a bit to support local bundling
Because android have APK size limit, the model is usually larger than that cap. So we will need to store the model online and download it after APK get started.
There are some advanced option to do local bundling per https://llm.mlc.ai/docs/deploy/android.html#bundle-model-weights, which may work for local source assuming you copy the files correctly. If not it should be possible to use that path and update the code a bit to support local bundling
Got it, thank you very much
🐛 Bug
To Reproduce
Steps to reproduce the behavior:
{ "device": "android", "model_list": [ { "model": "/Users/licheng/Desktop/AI/models/gemma2/gemma-2-2b/gemma-2-2b-q4f16_1-MLC", "model_id": "gemma-2-2b-it-q4f16_1-MLC", "estimated_vram_bytes": 3000000000, "bundle_weight": true } ] }
Download model config failed: no protocol: /Users/licheng/Desktop/AI/models/gemma2/gemma-2-2b/gemma-2-2b-q4f16_1-MLC/resolve/main/mlc-chat-config.json
Expected behavior
Environment
conda
, source):pip
, source):python -c "import tvm; print('\n'.join(f'{k}: {v}' for k, v in tvm.support.libinfo().items()))"
, applicable if you compile models):Additional context
I see in the doc about ackage_libraries_and_weights, it says in mlc-package-config.json the 'model':
Is that means I can't use a local convert model in Android? Thank you very much