mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Update model
This commit is contained in:
parent
5778cd15a0
commit
4683ad93b5
Binary file not shown.
@ -95,16 +95,16 @@ public class LanguageModel extends Dictionary {
|
|||||||
@Override public void run() {
|
@Override public void run() {
|
||||||
if(mNativeState != 0) return;
|
if(mNativeState != 0) return;
|
||||||
|
|
||||||
String modelPath = getPathToModelResource(context, R.raw.ml3_q8, R.raw.ml3_tokenizer, false);
|
String modelPath = getPathToModelResource(context, R.raw.ml4_f16, R.raw.ml3_tokenizer, false);
|
||||||
mNativeState = openNative(modelPath);
|
mNativeState = openNative(modelPath);
|
||||||
|
|
||||||
if(mNativeState == 0){
|
if(mNativeState == 0){
|
||||||
modelPath = getPathToModelResource(context, R.raw.ml3_q8, R.raw.ml3_tokenizer, true);
|
modelPath = getPathToModelResource(context, R.raw.ml4_f16, R.raw.ml3_tokenizer, true);
|
||||||
mNativeState = openNative(modelPath);
|
mNativeState = openNative(modelPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mNativeState == 0){
|
if(mNativeState == 0){
|
||||||
throw new RuntimeException("Failed to load R.raw.ml3_q8, R.raw.ml3_tokenizer model");
|
throw new RuntimeException("Failed to load R.raw.ml4_f16, R.raw.ml3_tokenizer model");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -55,8 +55,8 @@ LanguageModel *LlamaAdapter::createLanguageModel(const std::string &paths) {
|
|||||||
|
|
||||||
llama_context_params ctx_params = llama_context_default_params();
|
llama_context_params ctx_params = llama_context_default_params();
|
||||||
ctx_params.n_ctx = LLAMA_CONTEXT_SIZE;
|
ctx_params.n_ctx = LLAMA_CONTEXT_SIZE;
|
||||||
ctx_params.n_threads = 1;
|
//ctx_params.n_threads = 1;
|
||||||
ctx_params.n_threads_batch = 1;
|
//ctx_params.n_threads_batch = 1;
|
||||||
|
|
||||||
llama_model_params model_params = llama_model_default_params();
|
llama_model_params model_params = llama_model_default_params();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user