diff --git a/extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/LlmModule.java b/extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/LlmModule.java index 874c0db3c03..5e080e0c369 100644 --- a/extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/LlmModule.java +++ b/extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/LlmModule.java @@ -70,7 +70,12 @@ public LlmModule( */ public LlmModule( int modelType, String modulePath, String tokenizerPath, float temperature, String dataPath) { - this(modelType, modulePath, tokenizerPath, temperature, List.of(dataPath)); + this( + modelType, + modulePath, + tokenizerPath, + temperature, + dataPath != null ? List.of(dataPath) : List.of()); } /** Constructs a LLM Module for a model with given model path, tokenizer, temperature. */