Update model

This commit is contained in:
Aleksandras Kostarevas 2023-11-07 17:04:46 +02:00
parent 5778cd15a0
commit 4683ad93b5
3 changed files with 5 additions and 5 deletions

View File

@ -95,16 +95,16 @@ public class LanguageModel extends Dictionary {
@Override public void run() {
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);
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);
}
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");
}
}
};

View File

@ -55,8 +55,8 @@ LanguageModel *LlamaAdapter::createLanguageModel(const std::string &paths) {
llama_context_params ctx_params = llama_context_default_params();
ctx_params.n_ctx = LLAMA_CONTEXT_SIZE;
ctx_params.n_threads = 1;
ctx_params.n_threads_batch = 1;
//ctx_params.n_threads = 1;
//ctx_params.n_threads_batch = 1;
llama_model_params model_params = llama_model_default_params();