Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ public void onStats(float tps) {
}

private void setLocalModel(String modelPath, String tokenizerPath, float temperature) {
if (mModule != null) {
mModule.resetNative();
mModule = null;
}
Message modelLoadingMessage = new Message("Loading model...", false, MessageType.SYSTEM, 0);
ETLogging.getInstance().log("Loading model " + modelPath + " with tokenizer " + tokenizerPath);
runOnUiThread(
Expand All @@ -119,6 +115,12 @@ private void setLocalModel(String modelPath, String tokenizerPath, float tempera
mMessageAdapter.add(modelLoadingMessage);
mMessageAdapter.notifyDataSetChanged();
});
if (mModule != null) {
ETLogging.getInstance().log("Start deallocating existing module instance");
mModule.resetNative();
mModule = null;
ETLogging.getInstance().log("Completed deallocating existing module instance");
}
long runStartTime = System.currentTimeMillis();
mModule =
new LlamaModule(
Expand Down
Loading