-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
This is due to the code in executorch/extension/android/jni/jni_layer_llama.cpp.
The following shows the fix.
diff --git a/extension/android/jni/jni_layer_llama.cpp b/extension/android/jni/jni_layer_llama.cpp
index 25873a788b..1334189d3b 100644
--- a/extension/android/jni/jni_layer_llama.cpp
+++ b/extension/android/jni/jni_layer_llama.cpp
@@ -169,12 +169,12 @@ class ExecuTorchLlmJni : public facebook::jni::HybridClass<ExecuTorchLlmJni> {
#endif
model_type_category_ = model_type_category;
+ std::vector<std::string> data_files_vector;
if (model_type_category == MODEL_TYPE_CATEGORY_MULTIMODAL) {
multi_modal_runner_ = llm::create_multimodal_runner(
model_path->toStdString().c_str(),
llm::load_tokenizer(tokenizer_path->toStdString()));
} else if (model_type_category == MODEL_TYPE_CATEGORY_LLM) {
- std::vector<std::string> data_files_vector;
if (data_files != nullptr) {
// Convert Java List<String> to C++ std::vector<string>
auto list_class = facebook::jni::findClassStatic("java/util/List");
@@ -207,7 +207,8 @@ class ExecuTorchLlmJni : public facebook::jni::HybridClass<ExecuTorchLlmJni> {
decoder_model.c_str(),
model_path->toStdString().c_str(),
tokenizer_path->toStdString().c_str(),
- "");
+ "",
+ "");
model_type_category_ = MODEL_TYPE_CATEGORY_LLM;
#endif
#if defined(EXECUTORCH_BUILD_MEDIATEK)
Metadata
Metadata
Assignees
Labels
No labels