Skip to content

Commit 02b39bf

Browse files
authored
Android use new llm runner deps (#14361)
Use extension_llm_runner instead of old llama_runner llava_runner
1 parent b158753 commit 02b39bf

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

examples/qualcomm/oss_scripts/llama/runner/runner.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ Error Runner<T>::load() {
182182
eos_ids->insert(tokenizer_->encode("<|eot|>", 0, 0).get()[0]);
183183
eos_ids->insert(tokenizer_->encode("<|end_of_text|>", 0, 0).get()[0]);
184184
} else {
185-
tokenizer_ =
186-
example::load_llama_tokenizer(tokenizer_path_, Version::Default);
185+
tokenizer_ = llm::load_tokenizer(tokenizer_path_);
187186
if (tokenizer_ == nullptr) {
188187
ET_LOG(
189188
Error, "Failed to load tokenizer with %s", tokenizer_path_.c_str());

extension/android/CMakeLists.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -168,21 +168,8 @@ endif()
168168

169169
if(EXECUTORCH_BUILD_LLAMA_JNI)
170170
target_sources(executorch_jni PRIVATE jni/jni_layer_llama.cpp jni/log.cpp)
171-
list(APPEND link_libraries llama_runner)
171+
list(APPEND link_libraries extension_llm_runner)
172172
target_compile_definitions(executorch_jni PUBLIC EXECUTORCH_BUILD_LLAMA_JNI=1)
173-
add_subdirectory(
174-
${EXECUTORCH_ROOT}/examples/models/llama/runner
175-
${CMAKE_CURRENT_BINARY_DIR}/../../examples/models/llama/runner
176-
)
177-
178-
target_sources(
179-
executorch_jni
180-
PRIVATE ${EXECUTORCH_ROOT}/extension/llm/runner/llm_runner_helper.cpp
181-
)
182-
183-
target_include_directories(
184-
executorch_jni PRIVATE ${EXECUTORCH_ROOT}/extension/llm/runner
185-
)
186173

187174
if(QNN_SDK_ROOT)
188175
target_sources(

0 commit comments

Comments
 (0)