@trymirai/uzu 0.1.46 → 0.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bridging/samplingMethod.d.mts +1 -2
- package/bridging/samplingMethod.d.mts.map +1 -1
- package/bridging/samplingMethod.d.ts +1 -2
- package/bridging/samplingMethod.d.ts.map +1 -1
- package/bridging/samplingMethod.js +12 -8
- package/bridging/samplingMethod.js.map +1 -1
- package/bridging/samplingMethod.mjs +12 -8
- package/bridging/samplingMethod.mjs.map +1 -1
- package/napi/uzu.d.ts +1 -2
- package/napi/uzu.node +0 -0
- package/package.json +1 -1
- package/src/bridging/samplingMethod.ts +12 -9
- package/src/napi/uzu.d.ts +1 -2
- package/src/napi/uzu.node +0 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/README.md
CHANGED
|
@@ -4,8 +4,7 @@ export declare class SamplingMethod implements ToNapi<NapiSamplingMethod> {
|
|
|
4
4
|
private readonly napiSamplingMethod;
|
|
5
5
|
private constructor();
|
|
6
6
|
static greedy(): SamplingMethod;
|
|
7
|
-
static
|
|
8
|
-
static topP(topP: number): SamplingMethod;
|
|
7
|
+
static stochastic(temperature: number | null, topK: number | null, topP: number | null): SamplingMethod;
|
|
9
8
|
toNapi(): NapiSamplingMethod;
|
|
10
9
|
}
|
|
11
10
|
//# sourceMappingURL=samplingMethod.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"samplingMethod.d.mts","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;OACxC,EAAE,MAAM,EAAE;AAEjB,qBAAa,cAAe,YAAW,MAAM,CAAC,kBAAkB,CAAC;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,OAAO;IAIP,MAAM,CAAC,MAAM,IAAI,cAAc;IAK/B,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"samplingMethod.d.mts","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;OACxC,EAAE,MAAM,EAAE;AAEjB,qBAAa,cAAe,YAAW,MAAM,CAAC,kBAAkB,CAAC;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,OAAO;IAIP,MAAM,CAAC,MAAM,IAAI,cAAc;IAK/B,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,cAAc;IAgBvG,MAAM,IAAI,kBAAkB;CAG/B"}
|
|
@@ -4,8 +4,7 @@ export declare class SamplingMethod implements ToNapi<NapiSamplingMethod> {
|
|
|
4
4
|
private readonly napiSamplingMethod;
|
|
5
5
|
private constructor();
|
|
6
6
|
static greedy(): SamplingMethod;
|
|
7
|
-
static
|
|
8
|
-
static topP(topP: number): SamplingMethod;
|
|
7
|
+
static stochastic(temperature: number | null, topK: number | null, topP: number | null): SamplingMethod;
|
|
9
8
|
toNapi(): NapiSamplingMethod;
|
|
10
9
|
}
|
|
11
10
|
//# sourceMappingURL=samplingMethod.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"samplingMethod.d.ts","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;OACxC,EAAE,MAAM,EAAE;AAEjB,qBAAa,cAAe,YAAW,MAAM,CAAC,kBAAkB,CAAC;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,OAAO;IAIP,MAAM,CAAC,MAAM,IAAI,cAAc;IAK/B,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"samplingMethod.d.ts","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;OACxC,EAAE,MAAM,EAAE;AAEjB,qBAAa,cAAe,YAAW,MAAM,CAAC,kBAAkB,CAAC;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,OAAO;IAIP,MAAM,CAAC,MAAM,IAAI,cAAc;IAK/B,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,cAAc;IAgBvG,MAAM,IAAI,kBAAkB;CAG/B"}
|
|
@@ -9,15 +9,19 @@ class SamplingMethod {
|
|
|
9
9
|
const napiSamplingMethod = { type: 'Greedy' };
|
|
10
10
|
return new SamplingMethod(napiSamplingMethod);
|
|
11
11
|
}
|
|
12
|
-
static
|
|
13
|
-
|
|
14
|
-
type: '
|
|
15
|
-
temperature,
|
|
12
|
+
static stochastic(temperature, topK, topP) {
|
|
13
|
+
let napiSamplingMethod = {
|
|
14
|
+
type: 'Stochastic',
|
|
16
15
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
if (temperature !== null) {
|
|
17
|
+
napiSamplingMethod.temperature = temperature;
|
|
18
|
+
}
|
|
19
|
+
if (topK !== null) {
|
|
20
|
+
napiSamplingMethod.topK = topK;
|
|
21
|
+
}
|
|
22
|
+
if (topP !== null) {
|
|
23
|
+
napiSamplingMethod.topP = topP;
|
|
24
|
+
}
|
|
21
25
|
return new SamplingMethod(napiSamplingMethod);
|
|
22
26
|
}
|
|
23
27
|
toNapi() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"samplingMethod.js","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":";;;AAGA,MAAa,cAAc;IAGvB,YAAoB,kBAAsC;QACtD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,MAAM;QACT,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAClE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"samplingMethod.js","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":";;;AAGA,MAAa,cAAc;IAGvB,YAAoB,kBAAsC;QACtD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,MAAM;QACT,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAClE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,WAA0B,EAAE,IAAmB,EAAE,IAAmB;QAClF,IAAI,kBAAkB,GAAuB;YACzC,IAAI,EAAE,YAAY;SACrB,CAAC;QACF,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;YACvB,kBAAkB,CAAC,WAAW,GAAG,WAAW,CAAC;QACjD,CAAC;QACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAChB,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;QACnC,CAAC;QACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAChB,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;QACnC,CAAC;QACD,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;CACJ;AA/BD,wCA+BC"}
|
|
@@ -6,15 +6,19 @@ export class SamplingMethod {
|
|
|
6
6
|
const napiSamplingMethod = { type: 'Greedy' };
|
|
7
7
|
return new SamplingMethod(napiSamplingMethod);
|
|
8
8
|
}
|
|
9
|
-
static
|
|
10
|
-
|
|
11
|
-
type: '
|
|
12
|
-
temperature,
|
|
9
|
+
static stochastic(temperature, topK, topP) {
|
|
10
|
+
let napiSamplingMethod = {
|
|
11
|
+
type: 'Stochastic',
|
|
13
12
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
if (temperature !== null) {
|
|
14
|
+
napiSamplingMethod.temperature = temperature;
|
|
15
|
+
}
|
|
16
|
+
if (topK !== null) {
|
|
17
|
+
napiSamplingMethod.topK = topK;
|
|
18
|
+
}
|
|
19
|
+
if (topP !== null) {
|
|
20
|
+
napiSamplingMethod.topP = topP;
|
|
21
|
+
}
|
|
18
22
|
return new SamplingMethod(napiSamplingMethod);
|
|
19
23
|
}
|
|
20
24
|
toNapi() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"samplingMethod.mjs","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,cAAc;IAGvB,YAAoB,kBAAsC;QACtD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,MAAM;QACT,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAClE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"samplingMethod.mjs","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,cAAc;IAGvB,YAAoB,kBAAsC;QACtD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,MAAM;QACT,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAClE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,WAA0B,EAAE,IAAmB,EAAE,IAAmB;QAClF,IAAI,kBAAkB,GAAuB;YACzC,IAAI,EAAE,YAAY;SACrB,CAAC;QACF,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;YACvB,kBAAkB,CAAC,WAAW,GAAG,WAAW,CAAC;QACjD,CAAC;QACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAChB,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;QACnC,CAAC;QACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAChB,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;QACnC,CAAC;QACD,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;CACJ"}
|
package/napi/uzu.d.ts
CHANGED
|
@@ -174,8 +174,7 @@ export interface RunStats {
|
|
|
174
174
|
|
|
175
175
|
export type SamplingMethod =
|
|
176
176
|
| { type: 'Greedy' }
|
|
177
|
-
| { type: '
|
|
178
|
-
| { type: 'TopP', topP: number }
|
|
177
|
+
| { type: 'Stochastic', temperature?: number, topK?: number, topP?: number }
|
|
179
178
|
|
|
180
179
|
export type SamplingPolicy =
|
|
181
180
|
| { type: 'Default' }
|
package/napi/uzu.node
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -13,16 +13,19 @@ export class SamplingMethod implements ToNapi<NapiSamplingMethod> {
|
|
|
13
13
|
return new SamplingMethod(napiSamplingMethod);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
static
|
|
17
|
-
|
|
18
|
-
type: '
|
|
19
|
-
temperature,
|
|
16
|
+
static stochastic(temperature: number | null, topK: number | null, topP: number | null): SamplingMethod {
|
|
17
|
+
let napiSamplingMethod: NapiSamplingMethod = {
|
|
18
|
+
type: 'Stochastic',
|
|
20
19
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (temperature !== null) {
|
|
21
|
+
napiSamplingMethod.temperature = temperature;
|
|
22
|
+
}
|
|
23
|
+
if (topK !== null) {
|
|
24
|
+
napiSamplingMethod.topK = topK;
|
|
25
|
+
}
|
|
26
|
+
if (topP !== null) {
|
|
27
|
+
napiSamplingMethod.topP = topP;
|
|
28
|
+
}
|
|
26
29
|
return new SamplingMethod(napiSamplingMethod);
|
|
27
30
|
}
|
|
28
31
|
|
package/src/napi/uzu.d.ts
CHANGED
|
@@ -174,8 +174,7 @@ export interface RunStats {
|
|
|
174
174
|
|
|
175
175
|
export type SamplingMethod =
|
|
176
176
|
| { type: 'Greedy' }
|
|
177
|
-
| { type: '
|
|
178
|
-
| { type: 'TopP', topP: number }
|
|
177
|
+
| { type: 'Stochastic', temperature?: number, topK?: number, topP?: number }
|
|
179
178
|
|
|
180
179
|
export type SamplingPolicy =
|
|
181
180
|
| { type: 'Default' }
|
package/src/napi/uzu.node
CHANGED
|
Binary file
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.
|
|
1
|
+
export const VERSION = '0.1.47';
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.47";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.47";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.1.
|
|
1
|
+
export const VERSION = '0.1.47';
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|