Skip to content

Commit 4ea6839

Browse files
authored
Add memory requirement and clarify image format for llava example
Differential Revision: D72988591 Pull Request resolved: #10153
1 parent a7cde32 commit 4ea6839

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

examples/models/llava/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,26 @@ model) for general-purpose visual and language understanding, achieving
2626
impressive chat capabilities mimicking spirits of the cutting edge multimodal
2727
models and setting a high bar for accuracy on Science QA.
2828

29-
## Instructions
29+
## Instructions to run Llava on Android/iOS
3030

3131
First you need to generate a .PTE file for the model, along with input image,
3232
and other artifacts. Then you need either a C++ runner, or Android or iOS
3333
application to test things out on device.
3434

35+
### Host machine requirements
36+
37+
The biggest requirement is to have a host machine with at least 32GiB memory, preferably 64GiB.
38+
39+
The model weights is 15GiB, and the other memory usage at export stage (`export_llava`) is around 10GiB. So you need at least 25GiB memory to run the export script.
40+
41+
3542
### Generate ExecuTorch .PTE and other artifacts
3643

3744
Run the following command to generate `llava.pte`, `tokenizer.bin` and an image
3845
tensor (serialized in TorchScript) `image.pt`.
3946

47+
> **Warning**: The C++ runner `llava_main` binary cannot process raw image inputs such as JPEG, PNG, or BMP files directly. You must convert these images to a `.pt` file format using the `examples/models/llava/image_util.py` script before using them with `llava_main`.
48+
4049
Prerequisite: run `install_executorch.sh` to install ExecuTorch and run
4150
`examples/models/llava/install_requirements.sh` to install dependencies.
4251

@@ -69,6 +78,13 @@ cmake-out/examples/models/llava/llava_main
6978

7079
### Build Mobile Apps
7180

81+
#### Device Requirements
82+
83+
To run the Android/iOS apps, you need a device with at least 12GiB memory.
84+
85+
- iPhone 13 Pro or above
86+
- Samsung Galaxy S23 or above
87+
7288
#### Android
7389

7490
We can run LLAVA using the LLAMA Demo Apps. Please refer to [this

0 commit comments

Comments
 (0)