Skip to content

Commit

Permalink
feat: no longer need disable mmap for lora
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Nov 16, 2024
1 parent da3e9a7 commit 38fa660
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion android/src/main/jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ Java_com_rnllama_LlamaContext_initContext(
const char *lora_chars = env->GetStringUTFChars(lora_str, nullptr);
if (lora_chars != nullptr && lora_chars[0] != '\0') {
defaultParams.lora_adapters.push_back({lora_chars, lora_scaled});
defaultParams.use_mmap = false;
}

defaultParams.rope_freq_base = rope_freq_base;
Expand Down
1 change: 0 additions & 1 deletion ios/RNLlamaContext.mm
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ + (instancetype)initWithParams:(NSDictionary *)params onProgress:(void (^)(unsig
float lora_scaled = 1.0f;
if (params[@"lora_scaled"]) lora_scaled = [params[@"lora_scaled"] floatValue];
defaultParams.lora_adapters.push_back({[params[@"lora"] UTF8String], lora_scaled});
defaultParams.use_mmap = false;
}

if (params[@"rope_freq_base"]) defaultParams.rope_freq_base = [params[@"rope_freq_base"] floatValue];
Expand Down

0 comments on commit 38fa660

Please sign in to comment.