web-llm-runner 0.1.1
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/LICENSE +211 -0
- package/README.md +564 -0
- package/lib/cache_util.d.ts +19 -0
- package/lib/cache_util.d.ts.map +1 -0
- package/lib/config.d.ts +199 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/conversation.d.ts +107 -0
- package/lib/conversation.d.ts.map +1 -0
- package/lib/embedding.d.ts +38 -0
- package/lib/embedding.d.ts.map +1 -0
- package/lib/engine.d.ts +140 -0
- package/lib/engine.d.ts.map +1 -0
- package/lib/error.d.ts +208 -0
- package/lib/error.d.ts.map +1 -0
- package/lib/extension_service_worker.d.ts +54 -0
- package/lib/extension_service_worker.d.ts.map +1 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +13767 -0
- package/lib/index.js.map +1 -0
- package/lib/integrity.d.ts +44 -0
- package/lib/integrity.d.ts.map +1 -0
- package/lib/llm_chat.d.ts +258 -0
- package/lib/llm_chat.d.ts.map +1 -0
- package/lib/message.d.ts +87 -0
- package/lib/message.d.ts.map +1 -0
- package/lib/openai_api_protocols/chat_completion.d.ts +834 -0
- package/lib/openai_api_protocols/chat_completion.d.ts.map +1 -0
- package/lib/openai_api_protocols/completion.d.ts +270 -0
- package/lib/openai_api_protocols/completion.d.ts.map +1 -0
- package/lib/openai_api_protocols/embedding.d.ts +125 -0
- package/lib/openai_api_protocols/embedding.d.ts.map +1 -0
- package/lib/openai_api_protocols/index.d.ts +20 -0
- package/lib/openai_api_protocols/index.d.ts.map +1 -0
- package/lib/service_worker.d.ts +53 -0
- package/lib/service_worker.d.ts.map +1 -0
- package/lib/support.d.ts +117 -0
- package/lib/support.d.ts.map +1 -0
- package/lib/types.d.ts +202 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/utils.d.ts +7 -0
- package/lib/utils.d.ts.map +1 -0
- package/lib/web_worker.d.ts +132 -0
- package/lib/web_worker.d.ts.map +1 -0
- package/lib/wrapper/WebLLMWrapper.d.ts +20 -0
- package/lib/wrapper/WebLLMWrapper.d.ts.map +1 -0
- package/lib/wrapper/llm-worker.d.ts +2 -0
- package/lib/wrapper/llm-worker.d.ts.map +1 -0
- package/package.json +60 -0
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { AppConfig, ChatOptions } from "./config";
|
|
2
|
+
import { ChatCompletionRequest, ChatCompletionRequestBase, ChatCompletionRequestStreaming, ChatCompletionRequestNonStreaming, ChatCompletion, ChatCompletionChunk, CompletionCreateParams, Completion, CompletionCreateParamsBase, CompletionCreateParamsStreaming, CompletionCreateParamsNonStreaming, EmbeddingCreateParams, CreateEmbeddingResponse } from "./openai_api_protocols/index";
|
|
3
|
+
import * as API from "./openai_api_protocols/index";
|
|
4
|
+
/**
|
|
5
|
+
* Report during intialization.
|
|
6
|
+
*/
|
|
7
|
+
export interface InitProgressReport {
|
|
8
|
+
progress: number;
|
|
9
|
+
timeElapsed: number;
|
|
10
|
+
text: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Callbacks used to report initialization process.
|
|
14
|
+
*/
|
|
15
|
+
export type InitProgressCallback = (report: InitProgressReport) => void;
|
|
16
|
+
/**
|
|
17
|
+
* A stateful logitProcessor used to post-process logits after forwarding the input and before
|
|
18
|
+
* sampling the next token. If used with `GenerationConfig.logit_bias`, logit_bias is applied after
|
|
19
|
+
* `processLogits()` is called.
|
|
20
|
+
*/
|
|
21
|
+
export interface LogitProcessor {
|
|
22
|
+
/**
|
|
23
|
+
* Process logits after forward() and before sampling implicitly, happens on the CPU.
|
|
24
|
+
* @param logits The logits right after forward().
|
|
25
|
+
* Returns the processed logits.
|
|
26
|
+
*/
|
|
27
|
+
processLogits: (logits: Float32Array) => Float32Array;
|
|
28
|
+
/**
|
|
29
|
+
* Use the sampled token to update the LogitProcessor's internal state. Called implicitly
|
|
30
|
+
* right after the next token is sampled/committed.
|
|
31
|
+
* @param token Token sampled from the processed logits.
|
|
32
|
+
*/
|
|
33
|
+
processSampledToken: (token: number) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Called when in `MLCEngine.resetChat()`. Can clear internal states.
|
|
36
|
+
*/
|
|
37
|
+
resetState: () => void;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Common interface of MLCEngine that UI can interact with
|
|
41
|
+
*/
|
|
42
|
+
export interface MLCEngineInterface {
|
|
43
|
+
/**
|
|
44
|
+
* An object that exposes chat-related APIs.
|
|
45
|
+
*/
|
|
46
|
+
chat: API.Chat;
|
|
47
|
+
/**
|
|
48
|
+
* An object that exposes text completion APIs.
|
|
49
|
+
*/
|
|
50
|
+
completions: API.Completions;
|
|
51
|
+
/**
|
|
52
|
+
* An object that exposes embeddings APIs.
|
|
53
|
+
*/
|
|
54
|
+
embeddings: API.Embeddings;
|
|
55
|
+
/**
|
|
56
|
+
* Set an initialization progress callback function
|
|
57
|
+
* which reports the progress of model loading.
|
|
58
|
+
*
|
|
59
|
+
* This function can be useful to implement an UI that
|
|
60
|
+
* update as we loading the model.
|
|
61
|
+
*
|
|
62
|
+
* @param initProgressCallback The callback function
|
|
63
|
+
*/
|
|
64
|
+
setInitProgressCallback: (initProgressCallback: InitProgressCallback) => void;
|
|
65
|
+
/**
|
|
66
|
+
* @returns The current initialization progress callback function.
|
|
67
|
+
*/
|
|
68
|
+
getInitProgressCallback: () => InitProgressCallback | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Setter for the engine's appConfig.
|
|
71
|
+
*/
|
|
72
|
+
setAppConfig: (appConfig: AppConfig) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Reload the chat with a new model.
|
|
75
|
+
*
|
|
76
|
+
* @param modelId model_id of the model to load, either string or string[]. When multiple models
|
|
77
|
+
* are provided, we load all models sequentially. Each modelId needs to either be in
|
|
78
|
+
* `webllm.prebuiltAppConfig`, or in `engineConfig.appConfig`.
|
|
79
|
+
* @param chatOpts Extra options to optionally override the `mlc-chat-config.json` of `modelId`.
|
|
80
|
+
* The size of which needs to match that of `modelId`; chatOpts[i] will be used for modelId[i].
|
|
81
|
+
* @returns A promise when reload finishes.
|
|
82
|
+
* @throws Throws error when device lost (mostly due to OOM); users should re-call reload(),
|
|
83
|
+
* potentially with a smaller model or smaller context window size.
|
|
84
|
+
* @note This is an async function.
|
|
85
|
+
*/
|
|
86
|
+
reload: (modelId: string | string[], chatOpts?: ChatOptions | ChatOptions[]) => Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* OpenAI-style API. Generate a chat completion response for the given conversation and
|
|
89
|
+
* configuration. Use `engine.chat.completions.create()` to invoke this API.
|
|
90
|
+
*
|
|
91
|
+
* @param request A OpenAI-style ChatCompletion request.
|
|
92
|
+
*
|
|
93
|
+
* @note The API is completely functional in behavior. That is, a previous request would not
|
|
94
|
+
* affect the current request's result. Thus, for multi-round chatting, users are responsible for
|
|
95
|
+
* maintaining the chat history. With that being said, as an implicit internal optimization, if we
|
|
96
|
+
* detect that the user is performing multi-round chatting, we will preserve the KV cache and only
|
|
97
|
+
* prefill the new tokens.
|
|
98
|
+
* @note For requests sent to the same modelId, will block until all previous requests finish.
|
|
99
|
+
* @note For more, see https://platform.openai.com/docs/api-reference/chat
|
|
100
|
+
*/
|
|
101
|
+
chatCompletion(request: ChatCompletionRequestNonStreaming): Promise<ChatCompletion>;
|
|
102
|
+
chatCompletion(request: ChatCompletionRequestStreaming): Promise<AsyncIterable<ChatCompletionChunk>>;
|
|
103
|
+
chatCompletion(request: ChatCompletionRequestBase): Promise<AsyncIterable<ChatCompletionChunk> | ChatCompletion>;
|
|
104
|
+
chatCompletion(request: ChatCompletionRequest): Promise<AsyncIterable<ChatCompletionChunk> | ChatCompletion>;
|
|
105
|
+
/**
|
|
106
|
+
* OpenAI-style API. Completes a CompletionCreateParams, a text completion with no chat template.
|
|
107
|
+
* Use `engine.completions.create()` to invoke this API.
|
|
108
|
+
*
|
|
109
|
+
* @param request An OpenAI-style Completion request.
|
|
110
|
+
*
|
|
111
|
+
* @note For requests sent to the same modelId, will block until all previous requests finish.
|
|
112
|
+
* @note For more, see https://platform.openai.com/docs/api-reference/completions
|
|
113
|
+
*/
|
|
114
|
+
completion(request: CompletionCreateParamsNonStreaming): Promise<Completion>;
|
|
115
|
+
completion(request: CompletionCreateParamsStreaming): Promise<AsyncIterable<Completion>>;
|
|
116
|
+
completion(request: CompletionCreateParamsBase): Promise<AsyncIterable<Completion> | Completion>;
|
|
117
|
+
completion(request: CompletionCreateParams): Promise<AsyncIterable<Completion> | Completion>;
|
|
118
|
+
/**
|
|
119
|
+
* OpenAI-style API. Creates an embedding vector representing the input text.
|
|
120
|
+
* Use `engine.embeddings.create()` to invoke this API.
|
|
121
|
+
*
|
|
122
|
+
* @param request An OpenAI-style Embeddings request.
|
|
123
|
+
*
|
|
124
|
+
* @note For requests sent to the same modelId, will block until all previous requests finish.
|
|
125
|
+
* @note For more, see https://platform.openai.com/docs/api-reference/embeddings/create
|
|
126
|
+
*/
|
|
127
|
+
embedding(request: EmbeddingCreateParams): Promise<CreateEmbeddingResponse>;
|
|
128
|
+
/**
|
|
129
|
+
* @returns A text summarizing the runtime stats.
|
|
130
|
+
* @param modelId Only required when multiple models are loaded.
|
|
131
|
+
* @note This is an async function
|
|
132
|
+
*/
|
|
133
|
+
runtimeStatsText: (modelId?: string) => Promise<string>;
|
|
134
|
+
/**
|
|
135
|
+
* Interrupt the generate process if it is already running.
|
|
136
|
+
*/
|
|
137
|
+
interruptGenerate: () => void;
|
|
138
|
+
/**
|
|
139
|
+
* Explicitly unload the currently loaded model(s) and release the related resources. Waits until
|
|
140
|
+
* the webgpu device finishes all submitted work and destroys itself.
|
|
141
|
+
* @note This is an asynchronous function.
|
|
142
|
+
*/
|
|
143
|
+
unload: () => Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Reset the current chat session by clear all memories.
|
|
146
|
+
* @param keepStats: If True, do not reset the statistics.
|
|
147
|
+
* @param modelId Only required when multiple models are loaded.
|
|
148
|
+
*/
|
|
149
|
+
resetChat: (keepStats?: boolean, modelId?: string) => Promise<void>;
|
|
150
|
+
/**
|
|
151
|
+
* Get the current generated response.
|
|
152
|
+
* @param modelId Only required when multiple models are loaded.
|
|
153
|
+
* @returns The current output message.
|
|
154
|
+
*/
|
|
155
|
+
getMessage: (modelId?: string) => Promise<string>;
|
|
156
|
+
/**
|
|
157
|
+
* Returns the device's maxStorageBufferBindingSize, can be used to guess whether the device
|
|
158
|
+
* has limited resources like an Android phone.
|
|
159
|
+
*/
|
|
160
|
+
getMaxStorageBufferBindingSize(): Promise<number>;
|
|
161
|
+
/**
|
|
162
|
+
* Returns the device's gpu vendor (e.g. arm, qualcomm, apple) if available. Otherwise return
|
|
163
|
+
* an empty string.
|
|
164
|
+
*/
|
|
165
|
+
getGPUVendor(): Promise<string>;
|
|
166
|
+
/**
|
|
167
|
+
* Forward the given input tokens to the model, then sample the next token.
|
|
168
|
+
*
|
|
169
|
+
* This function has side effects as the model will update its KV cache.
|
|
170
|
+
*
|
|
171
|
+
* @param inputIds The input tokens.
|
|
172
|
+
* @param isPrefill True if prefill, false if decode; only used for statistics.
|
|
173
|
+
* @param modelId Only required when multiple models are loaded.
|
|
174
|
+
* @returns Next token sampled.
|
|
175
|
+
* @note This is an async function.
|
|
176
|
+
*/
|
|
177
|
+
forwardTokensAndSample(inputIds: Array<number>, isPrefill: boolean, modelId?: string): Promise<number>;
|
|
178
|
+
/**
|
|
179
|
+
* Set MLCEngine logging output level
|
|
180
|
+
*
|
|
181
|
+
* @param logLevel The new log level
|
|
182
|
+
*/
|
|
183
|
+
setLogLevel(logLevel: LogLevel): void;
|
|
184
|
+
}
|
|
185
|
+
export declare const LOG_LEVELS: {
|
|
186
|
+
TRACE: number;
|
|
187
|
+
DEBUG: number;
|
|
188
|
+
INFO: number;
|
|
189
|
+
WARN: number;
|
|
190
|
+
ERROR: number;
|
|
191
|
+
SILENT: number;
|
|
192
|
+
};
|
|
193
|
+
export type LogLevel = keyof typeof LOG_LEVELS;
|
|
194
|
+
export type LatencyBreakdown = {
|
|
195
|
+
logitProcessorTime: number[];
|
|
196
|
+
logitBiasTime: number[];
|
|
197
|
+
penaltyTime: number[];
|
|
198
|
+
sampleTime: number[];
|
|
199
|
+
totalTime: number[];
|
|
200
|
+
grammarBitmaskTime: number[];
|
|
201
|
+
};
|
|
202
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,8BAA8B,EAC9B,iCAAiC,EACjC,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,EACV,0BAA0B,EAC1B,+BAA+B,EAC/B,kCAAkC,EAClC,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,GAAG,MAAM,8BAA8B,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;AAExE;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,aAAa,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,YAAY,CAAC;IAEtD;;;;OAIG;IACH,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAE7C;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE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AE,CAAC;IACxB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B,CAAC"}
|
package/lib/utils.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppConfig, ChatOptions, ModelRecord } from "./config";
|
|
2
|
+
export declare function areArraysEqual(arr1?: Array<any>, arr2?: Array<any>): boolean;
|
|
3
|
+
export declare function areModelRecordsEqual(record1: ModelRecord, record2: ModelRecord): boolean;
|
|
4
|
+
export declare function areAppConfigsEqual(config1?: AppConfig, config2?: AppConfig): boolean;
|
|
5
|
+
export declare function areChatOptionsEqual(options1?: ChatOptions, options2?: ChatOptions): boolean;
|
|
6
|
+
export declare function areChatOptionsListEqual(options1?: ChatOptions[], options2?: ChatOptions[]): boolean;
|
|
7
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAmB,MAAM,UAAU,CAAC;AAGhF,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAQ5E;AAoBD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,GACnB,OAAO,CAkCT;AAED,wBAAgB,kBAAkB,CAChC,OAAO,CAAC,EAAE,SAAS,EACnB,OAAO,CAAC,EAAE,SAAS,GAClB,OAAO,CAwBT;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,CAAC,EAAE,WAAW,EACtB,QAAQ,CAAC,EAAE,WAAW,GACrB,OAAO,CAmBT;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,CAAC,EAAE,WAAW,EAAE,EACxB,QAAQ,CAAC,EAAE,WAAW,EAAE,GACvB,OAAO,CAoBT"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { AppConfig, ChatOptions, MLCEngineConfig } from "./config";
|
|
2
|
+
import { MLCEngineInterface, InitProgressCallback, LogLevel, LogitProcessor } from "./types";
|
|
3
|
+
import { ChatCompletionRequestBase, ChatCompletionRequestStreaming, ChatCompletionRequestNonStreaming, ChatCompletion, ChatCompletionChunk, Completion, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, CompletionCreateParamsBase, CreateEmbeddingResponse, EmbeddingCreateParams } from "./openai_api_protocols/index";
|
|
4
|
+
import * as API from "./openai_api_protocols/index";
|
|
5
|
+
import { MessageContent, WorkerRequest } from "./message";
|
|
6
|
+
import { MLCEngine } from "./engine";
|
|
7
|
+
/**
|
|
8
|
+
* Worker handler that can be used in a WebWorker
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
*
|
|
12
|
+
* // setup a chat worker handler that routes
|
|
13
|
+
* // requests to the chat
|
|
14
|
+
* const engine = new MLCEngine();
|
|
15
|
+
* cont handler = new WebWorkerMLCEngineHandler(engine);
|
|
16
|
+
* onmessage = handler.onmessage;
|
|
17
|
+
*/
|
|
18
|
+
export declare class WebWorkerMLCEngineHandler {
|
|
19
|
+
/**
|
|
20
|
+
* The modelId and chatOpts that the underlying engine (backend) is currently loaded with.
|
|
21
|
+
* An engine can be loaded with multiple models, so modelId and chatOpts are lists.
|
|
22
|
+
*
|
|
23
|
+
* TODO(webllm-team): This is always in-sync with `this.engine` unless device is lost due to
|
|
24
|
+
* unexpected reason. Therefore, we should get it from `this.engine` directly and make handler
|
|
25
|
+
* stateless. Besides, consider if we should add appConfig, or use engine's API to find the
|
|
26
|
+
* corresponding model record rather than relying on just the modelId.
|
|
27
|
+
*/
|
|
28
|
+
modelId?: string[];
|
|
29
|
+
chatOpts?: ChatOptions[];
|
|
30
|
+
engine: MLCEngine;
|
|
31
|
+
/** ChatCompletion and Completion share the same chunk generator. Each loaded model has its own. */
|
|
32
|
+
protected loadedModelIdToAsyncGenerator: Map<string, AsyncGenerator<ChatCompletionChunk | Completion, void, void>>;
|
|
33
|
+
/**
|
|
34
|
+
* @param engine A concrete implementation of MLCEngineInterface
|
|
35
|
+
*/
|
|
36
|
+
constructor();
|
|
37
|
+
postMessage(msg: any): void;
|
|
38
|
+
setLogitProcessorRegistry(logitProcessorRegistry?: Map<string, LogitProcessor>): void;
|
|
39
|
+
handleTask<T extends MessageContent>(uuid: string, task: () => Promise<T>): Promise<void>;
|
|
40
|
+
onmessage(event: any, onComplete?: (value: any) => void, onError?: () => void): void;
|
|
41
|
+
/** Check whether frontend expectation matches with backend (modelId and chatOpts). If not (due
|
|
42
|
+
* to possibly killed service worker), we reload here.
|
|
43
|
+
* For more, see https://github.com/mlc-ai/web-llm/pull/533
|
|
44
|
+
*/
|
|
45
|
+
reloadIfUnmatched(expectedModelId: string[], expectedChatOpts?: ChatOptions[]): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
export interface ChatWorker {
|
|
48
|
+
onmessage: any;
|
|
49
|
+
postMessage: (message: any) => void;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Creates `WebWorkerMLCEngine`, a client that holds the same interface as `MLCEngine`.
|
|
53
|
+
*
|
|
54
|
+
* Equivalent to `new webllm.WebWorkerMLCEngine(worker).reload(...)`.
|
|
55
|
+
*
|
|
56
|
+
* @param worker The worker that holds the actual MLCEngine, initialized with `new Worker()`.
|
|
57
|
+
* @param modelId model_id of the model to load, either string or string[]. When multiple models
|
|
58
|
+
* are provided, we load all models sequentially. Each modelId needs to either be in
|
|
59
|
+
* `webllm.prebuiltAppConfig`, or in `engineCOnfig.appConfig`.
|
|
60
|
+
* @param engineConfig Optionally configures the engine, see `webllm.MLCEngineConfig` for more.
|
|
61
|
+
* @param chatOpts Extra options to optionally override the `mlc-chat-config.json` of `modelId`.
|
|
62
|
+
* The size of which needs to match that of `modelId`; chatOpts[i] will be used for modelId[i].
|
|
63
|
+
* @returns An initialized `WebLLM.WebWorkerMLCEngine` with `modelId` loaded.
|
|
64
|
+
*
|
|
65
|
+
* @note engineConfig.logitProcessorRegistry is ignored for `CreateWebWorkMLCEngine()`.
|
|
66
|
+
*/
|
|
67
|
+
export declare function CreateWebWorkerMLCEngine(worker: any, modelId: string | string[], engineConfig?: MLCEngineConfig, chatOpts?: ChatOptions | ChatOptions[]): Promise<WebWorkerMLCEngine>;
|
|
68
|
+
/**
|
|
69
|
+
* A client of MLCEngine that exposes the same interface
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
*
|
|
73
|
+
* const chat = new webllm.WebWorkerMLCEngine(new Worker(
|
|
74
|
+
* new URL('./worker.ts', import.meta.url),
|
|
75
|
+
* {type: 'module'}
|
|
76
|
+
* ));
|
|
77
|
+
*/
|
|
78
|
+
export declare class WebWorkerMLCEngine implements MLCEngineInterface {
|
|
79
|
+
worker: ChatWorker;
|
|
80
|
+
/** For chat.completions.create() */
|
|
81
|
+
chat: API.Chat;
|
|
82
|
+
/** For completions.create() */
|
|
83
|
+
completions: API.Completions;
|
|
84
|
+
/** For embeddings.create() */
|
|
85
|
+
embeddings: API.Embeddings;
|
|
86
|
+
/**
|
|
87
|
+
* The modelId and chatOpts that the frontend expects the backend engine is currently loaded
|
|
88
|
+
* with. Needed for service worker. It is the backend and handler's job to match up with the
|
|
89
|
+
* expectation despite the web/service worker possibly being killed.
|
|
90
|
+
* Since an engine can load multiple models, both modelId and chatOpts are lists.
|
|
91
|
+
*/
|
|
92
|
+
modelId?: string[];
|
|
93
|
+
chatOpts?: ChatOptions[];
|
|
94
|
+
private initProgressCallback?;
|
|
95
|
+
private pendingPromise;
|
|
96
|
+
constructor(worker: ChatWorker, engineConfig?: MLCEngineConfig);
|
|
97
|
+
setInitProgressCallback(initProgressCallback?: InitProgressCallback): void;
|
|
98
|
+
getInitProgressCallback(): InitProgressCallback | undefined;
|
|
99
|
+
setAppConfig(appConfig: AppConfig): void;
|
|
100
|
+
setLogLevel(logLevel: LogLevel): void;
|
|
101
|
+
protected getPromise<T extends MessageContent>(msg: WorkerRequest): Promise<T>;
|
|
102
|
+
reload(modelId: string | string[], chatOpts?: ChatOptions | ChatOptions[]): Promise<void>;
|
|
103
|
+
getMaxStorageBufferBindingSize(): Promise<number>;
|
|
104
|
+
getGPUVendor(): Promise<string>;
|
|
105
|
+
getMessage(modelId?: string): Promise<string>;
|
|
106
|
+
runtimeStatsText(modelId?: string): Promise<string>;
|
|
107
|
+
interruptGenerate(): void;
|
|
108
|
+
unload(): Promise<void>;
|
|
109
|
+
resetChat(keepStats?: boolean, modelId?: string): Promise<void>;
|
|
110
|
+
forwardTokensAndSample(inputIds: Array<number>, isPrefill: boolean, modelId?: string): Promise<number>;
|
|
111
|
+
/**
|
|
112
|
+
* Every time the generator is called, we post a message to the worker asking it to
|
|
113
|
+
* decode one step, and we expect to receive a message of `ChatCompletionChunk` from
|
|
114
|
+
* the worker which we yield. The last message is `void`, meaning the generator has nothing
|
|
115
|
+
* to yield anymore.
|
|
116
|
+
*
|
|
117
|
+
* @param selectedModelId: The model of whose async generator to call next() to get next chunk.
|
|
118
|
+
* Needed because an engine can load multiple models.
|
|
119
|
+
*
|
|
120
|
+
* @note ChatCompletion and Completion share the same chunk generator.
|
|
121
|
+
*/
|
|
122
|
+
asyncGenerate(selectedModelId: string): AsyncGenerator<ChatCompletionChunk | Completion, void, void>;
|
|
123
|
+
chatCompletion(request: ChatCompletionRequestNonStreaming): Promise<ChatCompletion>;
|
|
124
|
+
chatCompletion(request: ChatCompletionRequestStreaming): Promise<AsyncIterable<ChatCompletionChunk>>;
|
|
125
|
+
chatCompletion(request: ChatCompletionRequestBase): Promise<AsyncIterable<ChatCompletionChunk> | ChatCompletion>;
|
|
126
|
+
completion(request: CompletionCreateParamsNonStreaming): Promise<Completion>;
|
|
127
|
+
completion(request: CompletionCreateParamsStreaming): Promise<AsyncIterable<Completion>>;
|
|
128
|
+
completion(request: CompletionCreateParamsBase): Promise<AsyncIterable<Completion> | Completion>;
|
|
129
|
+
embedding(request: EmbeddingCreateParams): Promise<CreateEmbeddingResponse>;
|
|
130
|
+
onmessage(event: any): void;
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=web_worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web_worker.d.ts","sourceRoot":"","sources":["../src/web_worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EAEpB,QAAQ,EACR,cAAc,EACf,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,yBAAyB,EACzB,8BAA8B,EAC9B,iCAAiC,EACjC,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,kCAAkC,EAClC,+BAA+B,EAC/B,0BAA0B,EAE1B,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,GAAG,MAAM,8BAA8B,CAAC;AACpD,OAAO,EACL,cAAc,EAOd,aAAa,EAOd,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAQrC;;;;;;;;;;GAUG;AACH,qBAAa,yBAAyB;IACpC;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IAElB,MAAM,EAAE,SAAS,CAAC;IACzB,mGAAmG;IACnG,SAAS,CAAC,6BAA6B,EAAE,GAAG,CAC1C,MAAM,EACN,cAAc,CAAC,mBAAmB,GAAG,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAC7D,CAAC;IAEF;;OAEG;;IAiBH,WAAW,CAAC,GAAG,EAAE,GAAG;IAKpB,yBAA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,CAAC,mBAAmB,CAAC,CAAC;IACxC,cAAc,CAClB,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,aAAa,CAAC,mBAAmB,CAAC,GAAG,cAAc,CAAC;IAmDzD,UAAU,CACd,OAAO,EAAE,kCAAkC,GAC1C,OAAO,CAAC,UAAU,CAAC;IAChB,UAAU,CACd,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC/B,UAAU,CACd,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;IAmD5C,SAAS,CACb,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,uBAAuB,CAAC;IAgBnC,SAAS,CAAC,KAAK,EAAE,GAAG;CAsCrB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class WebLLM {
|
|
2
|
+
private engine;
|
|
3
|
+
private worker;
|
|
4
|
+
private messages;
|
|
5
|
+
downloadProgress: Record<string, string>;
|
|
6
|
+
constructor();
|
|
7
|
+
get models_available(): string[];
|
|
8
|
+
local_model_available(model_id: string): Promise<boolean>;
|
|
9
|
+
download_model(model_id: string, workerUrl?: string | URL): Promise<void>;
|
|
10
|
+
progress(model_id: string): string;
|
|
11
|
+
delete_model(model_id: string): Promise<void>;
|
|
12
|
+
chat_stream(prompt: string): AsyncGenerator<string, void, unknown>;
|
|
13
|
+
chat_no_stream(prompt: string): Promise<string>;
|
|
14
|
+
reset_chat(): void;
|
|
15
|
+
generate_stream(prompt: string): AsyncGenerator<string, void, unknown>;
|
|
16
|
+
generate_no_stream(prompt: string): Promise<string>;
|
|
17
|
+
private loadContext;
|
|
18
|
+
private saveContext;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=WebLLMWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebLLMWrapper.d.ts","sourceRoot":"","sources":["../../src/wrapper/WebLLMWrapper.ts"],"names":[],"mappings":"AASA,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,QAAQ,CAAoC;IAC7C,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;;IAOrD,IAAW,gBAAgB,IAAI,MAAM,EAAE,CAEtC;IAEY,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIzD,cAAc,CACzB,QAAQ,EAAE,MAAM,EAEhB,SAAS,GAAE,MAAM,GAAG,GAAiD,GACpE,OAAO,CAAC,IAAI,CAAC;IAYT,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAI5B,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5C,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC;IAqBnE,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAiBrD,UAAU,IAAI,IAAI;IAMX,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC;IAavE,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAWhE,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,WAAW;CASpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-worker.d.ts","sourceRoot":"","sources":["../../src/wrapper/llm-worker.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "web-llm-runner",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Hardware accelerated language model chats on browsers",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "rollup -c && ./cleanup-index-js.sh",
|
|
10
|
+
"lint": "npx eslint ./src/ ./tests/ ./examples/ && npx prettier ./src/ ./tests/ ./examples/ --check",
|
|
11
|
+
"test": "jest --coverage",
|
|
12
|
+
"format": "prettier --write \"./src/\" \"./examples/\" \"./tests/\"",
|
|
13
|
+
"prepare": "husky"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"lib"
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"llm",
|
|
20
|
+
"large language model",
|
|
21
|
+
"machine learning"
|
|
22
|
+
],
|
|
23
|
+
"license": "Apache-2.0",
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
26
|
+
"@eslint/js": "^9.9.0",
|
|
27
|
+
"@mlc-ai/web-runtime": "^0.24.0-dev2",
|
|
28
|
+
"@mlc-ai/web-tokenizers": "^0.1.6",
|
|
29
|
+
"@mlc-ai/web-xgrammar": "0.1.27",
|
|
30
|
+
"@next/eslint-plugin-next": "^16.0.0",
|
|
31
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
32
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
33
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
34
|
+
"@types/chrome": "^0.0.266",
|
|
35
|
+
"@types/jest": "^30.0.0",
|
|
36
|
+
"@types/serviceworker": "^0.0.86",
|
|
37
|
+
"@webgpu/types": "^0.1.24",
|
|
38
|
+
"buffer": "^5.7.1",
|
|
39
|
+
"eslint": "^9.39.1",
|
|
40
|
+
"eslint-config-prettier": "^10.1.8",
|
|
41
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
42
|
+
"husky": "^9.0.11",
|
|
43
|
+
"jest": "^30.2.0",
|
|
44
|
+
"prettier": "3.6.2",
|
|
45
|
+
"process": "^0.11.10",
|
|
46
|
+
"rollup": "^4.53.3",
|
|
47
|
+
"rollup-plugin-ignore": "^1.0.10",
|
|
48
|
+
"ts-jest": "^29.4.6",
|
|
49
|
+
"tslib": "^2.3.1",
|
|
50
|
+
"typescript": "^5.9.3",
|
|
51
|
+
"typescript-eslint": "^8.47.0"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"loglevel": "^1.9.1"
|
|
55
|
+
},
|
|
56
|
+
"overrides": {
|
|
57
|
+
"test-exclude": "^7.0.1",
|
|
58
|
+
"glob": "^13.0.0"
|
|
59
|
+
}
|
|
60
|
+
}
|