Skip to content

Commit

Permalink
feat: remove lora_base
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Jul 27, 2024
1 parent f95f600 commit 96e8e9a
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 63 deletions.
3 changes: 0 additions & 3 deletions android/src/main/java/com/rnllama/LlamaContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ public LlamaContext(int id, ReactApplicationContext reactContext, ReadableMap pa
params.hasKey("lora") ? params.getString("lora") : "",
// float lora_scaled,
params.hasKey("lora_scaled") ? (float) params.getDouble("lora_scaled") : 1.0f,
// String lora_base,
params.hasKey("lora_base") ? params.getString("lora_base") : "",
// float rope_freq_base,
params.hasKey("rope_freq_base") ? (float) params.getDouble("rope_freq_base") : 0.0f,
// float rope_freq_scale
Expand Down Expand Up @@ -306,7 +304,6 @@ protected static native long initContext(
boolean use_mmap,
String lora,
float lora_scaled,
String lora_base,
float rope_freq_base,
float rope_freq_scale
);
Expand Down
4 changes: 0 additions & 4 deletions android/src/main/jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ Java_com_rnllama_LlamaContext_initContext(
jboolean use_mmap,
jstring lora_str,
jfloat lora_scaled,
jstring lora_base_str,
jfloat rope_freq_base,
jfloat rope_freq_scale
) {
Expand All @@ -158,10 +157,8 @@ Java_com_rnllama_LlamaContext_initContext(
defaultParams.use_mmap = use_mmap;

const char *lora_chars = env->GetStringUTFChars(lora_str, nullptr);
const char *lora_base_chars = env->GetStringUTFChars(lora_base_str, nullptr);
if (lora_chars != nullptr && lora_chars[0] != '\0') {
defaultParams.lora_adapter.push_back({lora_chars, lora_scaled});
// defaultParams.lora_base = lora_base_chars;
defaultParams.use_mmap = false;
}

Expand All @@ -180,7 +177,6 @@ Java_com_rnllama_LlamaContext_initContext(

env->ReleaseStringUTFChars(model_path_str, model_path_chars);
env->ReleaseStringUTFChars(lora_str, lora_chars);
env->ReleaseStringUTFChars(lora_base_str, lora_base_chars);

return reinterpret_cast<jlong>(llama->ctx);
}
Expand Down
13 changes: 0 additions & 13 deletions cpp/ggml.c.rej

This file was deleted.

16 changes: 8 additions & 8 deletions docs/API/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ llama.rn

#### Defined in

[index.ts:43](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L43)
[index.ts:43](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L43)

___

Expand All @@ -53,7 +53,7 @@ ___

#### Defined in

[index.ts:41](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L41)
[index.ts:41](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L41)

___

Expand All @@ -63,7 +63,7 @@ ___

#### Defined in

[index.ts:39](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L39)
[index.ts:39](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L39)

___

Expand All @@ -80,7 +80,7 @@ ___

#### Defined in

[index.ts:29](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L29)
[index.ts:29](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L29)

## Functions

Expand All @@ -104,7 +104,7 @@ ___

#### Defined in

[grammar.ts:824](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L824)
[grammar.ts:824](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L824)

___

Expand All @@ -124,7 +124,7 @@ ___

#### Defined in

[index.ts:165](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L165)
[index.ts:166](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L166)

___

Expand All @@ -138,7 +138,7 @@ ___

#### Defined in

[index.ts:181](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L181)
[index.ts:182](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L182)

___

Expand All @@ -158,4 +158,4 @@ ___

#### Defined in

[index.ts:161](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L161)
[index.ts:162](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L162)
28 changes: 14 additions & 14 deletions docs/API/classes/LlamaContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#### Defined in

[index.ts:62](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L62)
[index.ts:62](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L62)

## Properties

Expand All @@ -51,7 +51,7 @@

#### Defined in

[index.ts:56](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L56)
[index.ts:56](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L56)

___

Expand All @@ -61,7 +61,7 @@ ___

#### Defined in

[index.ts:54](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L54)
[index.ts:54](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L54)

___

Expand All @@ -71,7 +71,7 @@ ___

#### Defined in

[index.ts:60](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L60)
[index.ts:60](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L60)

___

Expand All @@ -81,7 +81,7 @@ ___

#### Defined in

[index.ts:58](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L58)
[index.ts:58](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L58)

## Methods

Expand All @@ -104,7 +104,7 @@ ___

#### Defined in

[index.ts:134](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L134)
[index.ts:135](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L135)

___

Expand All @@ -125,7 +125,7 @@ ___

#### Defined in

[index.ts:89](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L89)
[index.ts:90](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L90)

___

Expand All @@ -145,7 +145,7 @@ ___

#### Defined in

[index.ts:126](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L126)
[index.ts:127](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L127)

___

Expand All @@ -165,7 +165,7 @@ ___

#### Defined in

[index.ts:130](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L130)
[index.ts:131](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L131)

___

Expand All @@ -187,7 +187,7 @@ Load cached prompt & completion state from a file.

#### Defined in

[index.ts:78](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L78)
[index.ts:77](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L77)

___

Expand All @@ -201,7 +201,7 @@ ___

#### Defined in

[index.ts:156](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L156)
[index.ts:157](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L157)

___

Expand All @@ -225,7 +225,7 @@ Save current cached prompt & completion state to a file.

#### Defined in

[index.ts:85](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L85)
[index.ts:86](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L86)

___

Expand All @@ -239,7 +239,7 @@ ___

#### Defined in

[index.ts:118](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L118)
[index.ts:119](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L119)

___

Expand All @@ -259,4 +259,4 @@ ___

#### Defined in

[index.ts:122](https://github.com/mybigday/llama.rn/blob/a2b459e/src/index.ts#L122)
[index.ts:123](https://github.com/mybigday/llama.rn/blob/f95f600/src/index.ts#L123)
32 changes: 16 additions & 16 deletions docs/API/classes/SchemaGrammarConverter.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#### Defined in

[grammar.ts:211](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L211)
[grammar.ts:211](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L211)

## Properties

Expand All @@ -56,7 +56,7 @@

#### Defined in

[grammar.ts:201](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L201)
[grammar.ts:201](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L201)

___

Expand All @@ -66,7 +66,7 @@ ___

#### Defined in

[grammar.ts:203](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L203)
[grammar.ts:203](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L203)

___

Expand All @@ -76,7 +76,7 @@ ___

#### Defined in

[grammar.ts:199](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L199)
[grammar.ts:199](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L199)

___

Expand All @@ -90,7 +90,7 @@ ___

#### Defined in

[grammar.ts:207](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L207)
[grammar.ts:207](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L207)

___

Expand All @@ -100,7 +100,7 @@ ___

#### Defined in

[grammar.ts:209](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L209)
[grammar.ts:209](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L209)

___

Expand All @@ -114,7 +114,7 @@ ___

#### Defined in

[grammar.ts:205](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L205)
[grammar.ts:205](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L205)

## Methods

Expand All @@ -135,7 +135,7 @@ ___

#### Defined in

[grammar.ts:693](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L693)
[grammar.ts:693](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L693)

___

Expand All @@ -156,7 +156,7 @@ ___

#### Defined in

[grammar.ts:224](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L224)
[grammar.ts:224](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L224)

___

Expand All @@ -179,7 +179,7 @@ ___

#### Defined in

[grammar.ts:710](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L710)
[grammar.ts:710](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L710)

___

Expand All @@ -200,7 +200,7 @@ ___

#### Defined in

[grammar.ts:312](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L312)
[grammar.ts:312](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L312)

___

Expand All @@ -220,7 +220,7 @@ ___

#### Defined in

[grammar.ts:518](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L518)
[grammar.ts:518](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L518)

___

Expand All @@ -241,7 +241,7 @@ ___

#### Defined in

[grammar.ts:323](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L323)
[grammar.ts:323](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L323)

___

Expand All @@ -255,7 +255,7 @@ ___

#### Defined in

[grammar.ts:813](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L813)
[grammar.ts:813](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L813)

___

Expand All @@ -276,7 +276,7 @@ ___

#### Defined in

[grammar.ts:247](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L247)
[grammar.ts:247](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L247)

___

Expand All @@ -297,4 +297,4 @@ ___

#### Defined in

[grammar.ts:529](https://github.com/mybigday/llama.rn/blob/a2b459e/src/grammar.ts#L529)
[grammar.ts:529](https://github.com/mybigday/llama.rn/blob/f95f600/src/grammar.ts#L529)
2 changes: 1 addition & 1 deletion example/ios/.xcode.env.local
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export NODE_BINARY=/var/folders/4z/1d45cfts3936kdm7v9jl349r0000gn/T/yarn--1716945640903-0.9230388944694827/node
export NODE_BINARY=/var/folders/4z/1d45cfts3936kdm7v9jl349r0000gn/T/yarn--1722061680584-0.19771203690487615/node
Loading

0 comments on commit 96e8e9a

Please sign in to comment.