webslm 0.2.0 → 0.2.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/README.md +1 -1
- package/package.json +1 -1
- package/wasm/relaxed/webslm_wasm.js +6 -6
- package/wasm/relaxed/webslm_wasm_bg.wasm +0 -0
- package/wasm/simd/webslm_wasm.js +6 -6
- package/wasm/simd/webslm_wasm_bg.wasm +0 -0
- package/wasm/threads/webslm_wasm.js +8 -8
- package/wasm/threads/webslm_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -361,7 +361,7 @@ export default defineConfig({
|
|
|
361
361
|
});
|
|
362
362
|
```
|
|
363
363
|
|
|
364
|
-
Server code that imports webslm must not be bundled: webslm runs from its own files in `node_modules` (Next.js: `serverExternalPackages: ["webslm"]`). Without a bundler, a page can import it from jsDelivr (`https://cdn.jsdelivr.net/npm/webslm@0.2.
|
|
364
|
+
Server code that imports webslm must not be bundled: webslm runs from its own files in `node_modules` (Next.js: `serverExternalPackages: ["webslm"]`). Without a bundler, a page can import it from jsDelivr (`https://cdn.jsdelivr.net/npm/webslm@0.2.1/dist/index.js`); webslm starts its workers through same-origin `blob:` workers when its files come from another origin. Guides for Next.js, Vite, webpack, Node servers, Bun, Deno and CDNs, each with a tested example: <https://github.com/maxgfr/webslm#frameworks-bundlers-and-runtimes>.
|
|
365
365
|
|
|
366
366
|
## Errors
|
|
367
367
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webslm",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Run small language models in the browser and in Node, straight from their original Hugging Face checkpoints: a Rust engine compiled to WebAssembly, in a worker, with an offline cache.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Maxime Golfier",
|
|
@@ -1371,32 +1371,32 @@ function __wbg_get_imports() {
|
|
|
1371
1371
|
arg0.writeBuffer(arg1, arg2, getArrayU8FromWasm0(arg3, arg4), arg5, arg6);
|
|
1372
1372
|
}, arguments); },
|
|
1373
1373
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
1374
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1374
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 282, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1375
1375
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true_);
|
|
1376
1376
|
return ret;
|
|
1377
1377
|
},
|
|
1378
1378
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
1379
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx:
|
|
1379
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 226, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1380
1380
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true_);
|
|
1381
1381
|
return ret;
|
|
1382
1382
|
},
|
|
1383
1383
|
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
1384
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx:
|
|
1384
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 230, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1385
1385
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_);
|
|
1386
1386
|
return ret;
|
|
1387
1387
|
},
|
|
1388
1388
|
__wbindgen_generic_0000000000000004: function(arg0, arg1) {
|
|
1389
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx:
|
|
1389
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 230, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1390
1390
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__36);
|
|
1391
1391
|
return ret;
|
|
1392
1392
|
},
|
|
1393
1393
|
__wbindgen_generic_0000000000000005: function(arg0, arg1) {
|
|
1394
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx:
|
|
1394
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 226, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1395
1395
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__37);
|
|
1396
1396
|
return ret;
|
|
1397
1397
|
},
|
|
1398
1398
|
__wbindgen_generic_0000000000000006: function(arg0, arg1) {
|
|
1399
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx:
|
|
1399
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 226, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1400
1400
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__38);
|
|
1401
1401
|
return ret;
|
|
1402
1402
|
},
|
|
Binary file
|
package/wasm/simd/webslm_wasm.js
CHANGED
|
@@ -1371,32 +1371,32 @@ function __wbg_get_imports() {
|
|
|
1371
1371
|
arg0.writeBuffer(arg1, arg2, getArrayU8FromWasm0(arg3, arg4), arg5, arg6);
|
|
1372
1372
|
}, arguments); },
|
|
1373
1373
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
1374
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1374
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 273, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1375
1375
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true_);
|
|
1376
1376
|
return ret;
|
|
1377
1377
|
},
|
|
1378
1378
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
1379
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx:
|
|
1379
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 217, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1380
1380
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true_);
|
|
1381
1381
|
return ret;
|
|
1382
1382
|
},
|
|
1383
1383
|
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
1384
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx:
|
|
1384
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 221, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1385
1385
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_);
|
|
1386
1386
|
return ret;
|
|
1387
1387
|
},
|
|
1388
1388
|
__wbindgen_generic_0000000000000004: function(arg0, arg1) {
|
|
1389
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx:
|
|
1389
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 221, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1390
1390
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__36);
|
|
1391
1391
|
return ret;
|
|
1392
1392
|
},
|
|
1393
1393
|
__wbindgen_generic_0000000000000005: function(arg0, arg1) {
|
|
1394
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx:
|
|
1394
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 217, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1395
1395
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__37);
|
|
1396
1396
|
return ret;
|
|
1397
1397
|
},
|
|
1398
1398
|
__wbindgen_generic_0000000000000006: function(arg0, arg1) {
|
|
1399
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx:
|
|
1399
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 217, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1400
1400
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__38);
|
|
1401
1401
|
return ret;
|
|
1402
1402
|
},
|
|
Binary file
|
|
@@ -1531,42 +1531,42 @@ function __wbg_get_imports(memory) {
|
|
|
1531
1531
|
arg0.writeBuffer(arg1, arg2, getArrayU8FromWasm0(arg3, arg4), arg5, arg6);
|
|
1532
1532
|
}, arguments); },
|
|
1533
1533
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
1534
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1534
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 346, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1535
1535
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true_);
|
|
1536
1536
|
return ret;
|
|
1537
1537
|
},
|
|
1538
1538
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
1539
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1539
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 865, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1540
1540
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue__core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true_);
|
|
1541
1541
|
return ret;
|
|
1542
1542
|
},
|
|
1543
1543
|
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
1544
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1544
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 867, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1545
1545
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___js_sys_b608be85a12bc1d0___futures__task__wait_async_polyfill__MessageEvent______true_);
|
|
1546
1546
|
return ret;
|
|
1547
1547
|
},
|
|
1548
1548
|
__wbindgen_generic_0000000000000004: function(arg0, arg1) {
|
|
1549
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx:
|
|
1549
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 344, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1550
1550
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true_);
|
|
1551
1551
|
return ret;
|
|
1552
1552
|
},
|
|
1553
1553
|
__wbindgen_generic_0000000000000005: function(arg0, arg1) {
|
|
1554
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx:
|
|
1554
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 346, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1555
1555
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true__43);
|
|
1556
1556
|
return ret;
|
|
1557
1557
|
},
|
|
1558
1558
|
__wbindgen_generic_0000000000000006: function(arg0, arg1) {
|
|
1559
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx:
|
|
1559
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 346, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1560
1560
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true__44);
|
|
1561
1561
|
return ret;
|
|
1562
1562
|
},
|
|
1563
1563
|
__wbindgen_generic_0000000000000007: function(arg0, arg1) {
|
|
1564
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx:
|
|
1564
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 344, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1565
1565
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true__45);
|
|
1566
1566
|
return ret;
|
|
1567
1567
|
},
|
|
1568
1568
|
__wbindgen_generic_0000000000000008: function(arg0, arg1) {
|
|
1569
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx:
|
|
1569
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 344, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1570
1570
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true__46);
|
|
1571
1571
|
return ret;
|
|
1572
1572
|
},
|
|
Binary file
|