From a77d4e1f1f2d3cd1af53a458f0009d940a352ae1 Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Mon, 8 Apr 2024 12:35:59 -0700 Subject: [PATCH] Use unified path /data/local/tmp/llama (#2899) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/2899 Reviewed By: mergennachin Differential Revision: D55829514 Pulled By: kirklandsign fbshipit-source-id: 3e5d222b969c7b13fc8902dbda738edb3cb898dc (cherry picked from commit 3e256ffa676d2be3848decd1a8234cebcc8c9634) --- .gitignore | 1 + examples/models/llama2/README.md | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 6661daed13e..26a46f23f62 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ buck-out/ cmake-out/ cmake-android-out/ +cmake-out-android/ cmake-ios-out/ ethos-u-scratch/ executorch.egg-info diff --git a/examples/models/llama2/README.md b/examples/models/llama2/README.md index d392673d34a..4fefc37780b 100644 --- a/examples/models/llama2/README.md +++ b/examples/models/llama2/README.md @@ -208,14 +208,15 @@ cmake --build cmake-out-android/examples/models/llama2 -j16 --config Release **2.2 Upload model, tokenizer and llama runner binary to phone** ``` -adb push /data/local/tmp/ -adb push /data/local/tmp/ -adb push cmake-out-android/examples/models/llama2/llama_main /data/local/tmp/ +adb shell mkdir -p /data/local/tmp/llama +adb push /data/local/tmp/llama/ +adb push /data/local/tmp/llama/ +adb push cmake-out-android/examples/models/llama2/llama_main /data/local/tmp/llama/ ``` **2.3 Run model** ``` -adb shell "cd /data/local/tmp && ./llama_main --model_path --tokenizer_path --prompt "Once upon a time" --seq_len 120 +adb shell "cd /data/local/tmp/llama && ./llama_main --model_path --tokenizer_path --prompt "Once upon a time" --seq_len 120 ``` ## Step 6: Build iOS and/or Android apps