mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Add q8 model
This commit is contained in:
parent
ec7cae6bbf
commit
c73fe16ddc
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ build/
|
||||
local.properties
|
||||
crashreporting.properties
|
||||
keystore.properties
|
||||
key.jks
|
2
java/res/raw/.gitignore
vendored
2
java/res/raw/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*.gguf
|
||||
*tokenizer.model
|
BIN
java/res/raw/ml3_q8.gguf
Normal file
BIN
java/res/raw/ml3_q8.gguf
Normal file
Binary file not shown.
BIN
java/res/raw/ml3_tokenizer.model
Normal file
BIN
java/res/raw/ml3_tokenizer.model
Normal file
Binary file not shown.
@ -83,16 +83,16 @@ public class LanguageModel extends Dictionary {
|
||||
@Override public void run() {
|
||||
if(mNativeState != 0) return;
|
||||
|
||||
String modelPath = getPathToModelResource(context, R.raw.ml3, R.raw.ml3_tokenizer, true);
|
||||
String modelPath = getPathToModelResource(context, R.raw.ml3_q8, R.raw.ml3_tokenizer, false);
|
||||
mNativeState = openNative(modelPath);
|
||||
|
||||
if(mNativeState == 0){
|
||||
modelPath = getPathToModelResource(context, R.raw.ml3, R.raw.ml3_tokenizer, true);
|
||||
modelPath = getPathToModelResource(context, R.raw.ml3_q8, R.raw.ml3_tokenizer, true);
|
||||
mNativeState = openNative(modelPath);
|
||||
}
|
||||
|
||||
if(mNativeState == 0){
|
||||
throw new RuntimeException("Failed to load R.raw.ml3, R.raw.ml3_tokenizer model");
|
||||
throw new RuntimeException("Failed to load R.raw.ml3_q8, R.raw.ml3_tokenizer model");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -17,7 +17,7 @@ LOCAL_PATH := $(call my-dir)
|
||||
############ some local flags
|
||||
# If you change any of those flags, you need to rebuild both libjni_latinime_common_static
|
||||
# and the shared library that uses libjni_latinime_common_static.
|
||||
FLAG_DBG ?= true
|
||||
FLAG_DBG ?= false
|
||||
FLAG_DO_PROFILE ?= false
|
||||
|
||||
######################################
|
||||
|
Loading…
Reference in New Issue
Block a user