From 14fcb55565c4cc038462d89472d29550d5c4b69e Mon Sep 17 00:00:00 2001 From: Aleksandras Kostarevas Date: Tue, 14 Nov 2023 20:40:00 +0200 Subject: [PATCH] Save LoRA-merged model after training --- java/AndroidManifest.xml | 1 + .../inputmethod/latin/xlm/AdapterTrainer.kt | 26 ++- .../inputmethod/latin/xlm/LanguageModel.java | 56 +----- .../futo/inputmethod/latin/xlm/ModelPaths.kt | 75 ++++++++ .../inputmethod/latin/xlm/TrainingWorker.kt | 60 +------ ...o_inputmethod_latin_xlm_AdapterTrainer.cpp | 53 +++++- ...to_inputmethod_latin_xlm_LanguageModel.cpp | 18 +- native/jni/src/ggml/LanguageModel.cpp | 10 -- native/jni/src/ggml/llama.cpp | 163 ++++++++++++++++++ native/jni/src/ggml/llama.h | 2 + 10 files changed, 322 insertions(+), 142 deletions(-) create mode 100644 java/src/org/futo/inputmethod/latin/xlm/ModelPaths.kt diff --git a/java/AndroidManifest.xml b/java/AndroidManifest.xml index eb764e8ff..dd2450a35 100644 --- a/java/AndroidManifest.xml +++ b/java/AndroidManifest.xml @@ -34,6 +34,7 @@ +