Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Android demo app poor model performance #1277

@fran-aubry

Description

@fran-aubry

🐛 Describe the bug

I wanted to try the new Llama 3.2 1B parameter model on mobile. I downloaded the model and generated the pte like so:

python torchchat.py download llama3.2-1b
python torchchat.py export llama3.2-1b --quantize torchchat/quant_config/mobile.json --output-pte-path llama3_2-1b.pte

Then I pushed llama3_2-1b.pte file and tokenizer.model files to the mobile phone using adb.

I executed the demo app in torchchat/edge/android/torchchat using Android Studio with .aar file provided on the TorchChat repo readme.

However, when I chat with the AI its responses are very useless and feel quite different than what I get with the same prompt on my computer:

example
terminal-interaction

Is there a problem with the default quantization parameters? I tried to not quantize but then the app crashed when loading the model.

Versions

Collecting environment information...
PyTorch version: 2.5.0.dev20240901
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 14.4 (arm64)
GCC version: Could not collect
Clang version: 15.0.0 (clang-1500.3.9.4)
CMake version: version 3.30.4
Libc version: N/A

Python version: 3.10.0 (default, Mar 3 2022, 03:54:28) [Clang 12.0.0 ] (64-bit runtime)
Python platform: macOS-14.4-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Apple M2 Pro

Versions of relevant libraries:
[pip3] executorch==0.5.0a0+286799c
[pip3] numpy==1.26.4
[pip3] torch==2.5.0.dev20240901
[pip3] torchao==0.5.0+git0916b5b
[pip3] torchaudio==2.5.0.dev20240901
[pip3] torchsr==1.0.4
[pip3] torchtune==0.3.0.dev20240928+cpu
[pip3] torchvision==0.20.0.dev20240901
[conda] executorch 0.5.0a0+286799c pypi_0 pypi
[conda] numpy 1.26.4 pypi_0 pypi
[conda] torch 2.5.0.dev20240901 pypi_0 pypi
[conda] torchaudio 2.5.0.dev20240901 pypi_0 pypi
[conda] torchsr 1.0.4 pypi_0 pypi
[conda] torchtune 0.3.0.dev20240928+cpu pypi_0 pypi
[conda] torchvision 0.20.0.dev20240901 pypi_0 pypi

Metadata

Metadata

Assignees

Labels

ExecuTorchIssues related to ExecuTorch installation, export, or build. Mobile uses separate tagsMobile - AndroidIssues Related to the Android WorkflowactionableItems in the backlog waiting for an appropriate impl/fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions