@trymirai/uzu 0.2.2 → 0.2.6
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/napi/uzu.d.ts +39 -0
- package/napi/uzu.js +8 -0
- package/napi/uzu.mjs +4 -0
- package/napi/uzu.node +0 -0
- package/package.json +1 -1
- package/src/napi/uzu.d.ts +39 -0
- package/src/napi/uzu.js +8 -0
- package/src/napi/uzu.mjs +4 -0
- 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
package/napi/uzu.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare class Engine {
|
|
|
10
10
|
getChatModels(types: Array<ModelType>): Promise<Array<ChatModel>>
|
|
11
11
|
getModelDownloadState(repoId: string): ModelDownloadState
|
|
12
12
|
createModelDownloadHandle(repoId: string): ModelDownloadHandle
|
|
13
|
+
benchmark(task: BenchmarksTask): Promise<Array<BenchmarksResult>>
|
|
13
14
|
constructor()
|
|
14
15
|
createChatSession(model: ChatModel, config: Config): ChatSession
|
|
15
16
|
registerLicenseStatusHandler(callback?: ((arg: LicenseStatus) => void) | undefined | null): void
|
|
@@ -43,6 +44,36 @@ export type AsyncBatchSize =
|
|
|
43
44
|
| { type: 'Default' }
|
|
44
45
|
| { type: 'Custom', size: number }
|
|
45
46
|
|
|
47
|
+
export interface BenchmarksDevice {
|
|
48
|
+
osName?: string
|
|
49
|
+
cpuName?: string
|
|
50
|
+
memoryTotal: number
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface BenchmarksResult {
|
|
54
|
+
task: BenchmarksTask
|
|
55
|
+
device: BenchmarksDevice
|
|
56
|
+
engineVersion: string
|
|
57
|
+
timestamp: number
|
|
58
|
+
precision?: DataType
|
|
59
|
+
memoryUsed?: number
|
|
60
|
+
tokensCountInput: number
|
|
61
|
+
tokensCountOutput: number
|
|
62
|
+
timeToFirstToken: number
|
|
63
|
+
promptTokensPerSecond: number
|
|
64
|
+
generateTokensPerSecond?: number
|
|
65
|
+
text: string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface BenchmarksTask {
|
|
69
|
+
identifier: string
|
|
70
|
+
repoId: string
|
|
71
|
+
numberOfRuns: number
|
|
72
|
+
tokensLimit: number
|
|
73
|
+
messages: Array<Message>
|
|
74
|
+
greedy: boolean
|
|
75
|
+
}
|
|
76
|
+
|
|
46
77
|
export interface ChatModel {
|
|
47
78
|
readonly repoId: string
|
|
48
79
|
readonly type: ModelType
|
|
@@ -76,6 +107,14 @@ export type ContextMode =
|
|
|
76
107
|
| { type: 'Static', input: Input }
|
|
77
108
|
| { type: 'Dynamic' }
|
|
78
109
|
|
|
110
|
+
export declare const enum DataType {
|
|
111
|
+
BFloat16 = 0,
|
|
112
|
+
Float16 = 1,
|
|
113
|
+
Float32 = 2,
|
|
114
|
+
Int4 = 3,
|
|
115
|
+
Int8 = 4
|
|
116
|
+
}
|
|
117
|
+
|
|
79
118
|
export declare const enum FinishReason {
|
|
80
119
|
Stop = 0,
|
|
81
120
|
Length = 1,
|
package/napi/uzu.js
CHANGED
|
@@ -26,11 +26,15 @@ const {
|
|
|
26
26
|
ModelDownloadHandle,
|
|
27
27
|
ProgressStream,
|
|
28
28
|
ProgressUpdate,
|
|
29
|
+
DataType,
|
|
29
30
|
FinishReason,
|
|
30
31
|
ModelDownloadPhase,
|
|
31
32
|
ModelType,
|
|
32
33
|
Role,
|
|
33
34
|
version,
|
|
35
|
+
BenchmarksDevice,
|
|
36
|
+
BenchmarksResult,
|
|
37
|
+
BenchmarksTask,
|
|
34
38
|
ChatModel,
|
|
35
39
|
ClassificationFeature,
|
|
36
40
|
Config,
|
|
@@ -65,11 +69,15 @@ module.exports = {
|
|
|
65
69
|
ModelDownloadHandle,
|
|
66
70
|
ProgressStream,
|
|
67
71
|
ProgressUpdate,
|
|
72
|
+
DataType,
|
|
68
73
|
FinishReason,
|
|
69
74
|
ModelDownloadPhase,
|
|
70
75
|
ModelType,
|
|
71
76
|
Role,
|
|
72
77
|
version,
|
|
78
|
+
BenchmarksDevice,
|
|
79
|
+
BenchmarksResult,
|
|
80
|
+
BenchmarksTask,
|
|
73
81
|
ChatModel,
|
|
74
82
|
ClassificationFeature,
|
|
75
83
|
Config,
|
package/napi/uzu.mjs
CHANGED
|
@@ -26,11 +26,15 @@ export const {
|
|
|
26
26
|
ModelDownloadHandle,
|
|
27
27
|
ProgressStream,
|
|
28
28
|
ProgressUpdate,
|
|
29
|
+
DataType,
|
|
29
30
|
FinishReason,
|
|
30
31
|
ModelDownloadPhase,
|
|
31
32
|
ModelType,
|
|
32
33
|
Role,
|
|
33
34
|
version,
|
|
35
|
+
BenchmarksDevice,
|
|
36
|
+
BenchmarksResult,
|
|
37
|
+
BenchmarksTask,
|
|
34
38
|
ChatModel,
|
|
35
39
|
ClassificationFeature,
|
|
36
40
|
Config,
|
package/napi/uzu.node
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/napi/uzu.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare class Engine {
|
|
|
10
10
|
getChatModels(types: Array<ModelType>): Promise<Array<ChatModel>>
|
|
11
11
|
getModelDownloadState(repoId: string): ModelDownloadState
|
|
12
12
|
createModelDownloadHandle(repoId: string): ModelDownloadHandle
|
|
13
|
+
benchmark(task: BenchmarksTask): Promise<Array<BenchmarksResult>>
|
|
13
14
|
constructor()
|
|
14
15
|
createChatSession(model: ChatModel, config: Config): ChatSession
|
|
15
16
|
registerLicenseStatusHandler(callback?: ((arg: LicenseStatus) => void) | undefined | null): void
|
|
@@ -43,6 +44,36 @@ export type AsyncBatchSize =
|
|
|
43
44
|
| { type: 'Default' }
|
|
44
45
|
| { type: 'Custom', size: number }
|
|
45
46
|
|
|
47
|
+
export interface BenchmarksDevice {
|
|
48
|
+
osName?: string
|
|
49
|
+
cpuName?: string
|
|
50
|
+
memoryTotal: number
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface BenchmarksResult {
|
|
54
|
+
task: BenchmarksTask
|
|
55
|
+
device: BenchmarksDevice
|
|
56
|
+
engineVersion: string
|
|
57
|
+
timestamp: number
|
|
58
|
+
precision?: DataType
|
|
59
|
+
memoryUsed?: number
|
|
60
|
+
tokensCountInput: number
|
|
61
|
+
tokensCountOutput: number
|
|
62
|
+
timeToFirstToken: number
|
|
63
|
+
promptTokensPerSecond: number
|
|
64
|
+
generateTokensPerSecond?: number
|
|
65
|
+
text: string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface BenchmarksTask {
|
|
69
|
+
identifier: string
|
|
70
|
+
repoId: string
|
|
71
|
+
numberOfRuns: number
|
|
72
|
+
tokensLimit: number
|
|
73
|
+
messages: Array<Message>
|
|
74
|
+
greedy: boolean
|
|
75
|
+
}
|
|
76
|
+
|
|
46
77
|
export interface ChatModel {
|
|
47
78
|
readonly repoId: string
|
|
48
79
|
readonly type: ModelType
|
|
@@ -76,6 +107,14 @@ export type ContextMode =
|
|
|
76
107
|
| { type: 'Static', input: Input }
|
|
77
108
|
| { type: 'Dynamic' }
|
|
78
109
|
|
|
110
|
+
export declare const enum DataType {
|
|
111
|
+
BFloat16 = 0,
|
|
112
|
+
Float16 = 1,
|
|
113
|
+
Float32 = 2,
|
|
114
|
+
Int4 = 3,
|
|
115
|
+
Int8 = 4
|
|
116
|
+
}
|
|
117
|
+
|
|
79
118
|
export declare const enum FinishReason {
|
|
80
119
|
Stop = 0,
|
|
81
120
|
Length = 1,
|
package/src/napi/uzu.js
CHANGED
|
@@ -26,11 +26,15 @@ const {
|
|
|
26
26
|
ModelDownloadHandle,
|
|
27
27
|
ProgressStream,
|
|
28
28
|
ProgressUpdate,
|
|
29
|
+
DataType,
|
|
29
30
|
FinishReason,
|
|
30
31
|
ModelDownloadPhase,
|
|
31
32
|
ModelType,
|
|
32
33
|
Role,
|
|
33
34
|
version,
|
|
35
|
+
BenchmarksDevice,
|
|
36
|
+
BenchmarksResult,
|
|
37
|
+
BenchmarksTask,
|
|
34
38
|
ChatModel,
|
|
35
39
|
ClassificationFeature,
|
|
36
40
|
Config,
|
|
@@ -65,11 +69,15 @@ module.exports = {
|
|
|
65
69
|
ModelDownloadHandle,
|
|
66
70
|
ProgressStream,
|
|
67
71
|
ProgressUpdate,
|
|
72
|
+
DataType,
|
|
68
73
|
FinishReason,
|
|
69
74
|
ModelDownloadPhase,
|
|
70
75
|
ModelType,
|
|
71
76
|
Role,
|
|
72
77
|
version,
|
|
78
|
+
BenchmarksDevice,
|
|
79
|
+
BenchmarksResult,
|
|
80
|
+
BenchmarksTask,
|
|
73
81
|
ChatModel,
|
|
74
82
|
ClassificationFeature,
|
|
75
83
|
Config,
|
package/src/napi/uzu.mjs
CHANGED
|
@@ -26,11 +26,15 @@ export const {
|
|
|
26
26
|
ModelDownloadHandle,
|
|
27
27
|
ProgressStream,
|
|
28
28
|
ProgressUpdate,
|
|
29
|
+
DataType,
|
|
29
30
|
FinishReason,
|
|
30
31
|
ModelDownloadPhase,
|
|
31
32
|
ModelType,
|
|
32
33
|
Role,
|
|
33
34
|
version,
|
|
35
|
+
BenchmarksDevice,
|
|
36
|
+
BenchmarksResult,
|
|
37
|
+
BenchmarksTask,
|
|
34
38
|
ChatModel,
|
|
35
39
|
ClassificationFeature,
|
|
36
40
|
Config,
|
package/src/napi/uzu.node
CHANGED
|
Binary file
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.2.
|
|
1
|
+
export const VERSION = '0.2.6';
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.2.
|
|
1
|
+
export declare const VERSION = "0.2.6";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.2.
|
|
1
|
+
export declare const VERSION = "0.2.6";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.2.
|
|
1
|
+
export const VERSION = '0.2.6';
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|