Skip to content

Commit bf781cd

Browse files
committed
Fix
1 parent fe90c33 commit bf781cd

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

llm/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo/PromptFormat.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ object PromptFormat {
9393
return "USER: $USER_PLACEHOLDER ASSISTANT:"
9494
}
9595

96+
@JvmStatic
97+
fun getGemmaPreImagePrompt(): String {
98+
return "<start_of_turn>user\n<start_of_image>"
99+
}
100+
101+
@JvmStatic
102+
fun getGemmaMultimodalUserPrompt(): String {
103+
return "$USER_PLACEHOLDER<end_of_turn>\n<start_of_turn>model"
104+
}
105+
96106
@JvmStatic
97107
fun getFormattedLlamaGuardPrompt(userPrompt: String): String {
98108
return getUserPromptTemplate(ModelType.LLAMA_GUARD_3)

llm/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo/ui/viewmodel/SelectPresetModelViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class SelectPresetModelViewModel : ViewModel() {
181181

182182
// Save the module settings
183183
val moduleSettings = ModuleSettings(
184-
modelFilePath = listOf(modelFile.absolutePath),
184+
modelFilePath = modelFile.absolutePath,
185185
tokenizerFilePath = tokenizerFile.absolutePath,
186186
modelType = modelInfo.modelType,
187187
userPrompt = PromptFormat.getUserPromptTemplate(modelInfo.modelType),

0 commit comments

Comments
 (0)